Replace empty VertexShaders with a dummy shader

This commit is contained in:
Luke Usher 2017-07-30 21:48:27 +01:00 committed by PatrickvL
parent c4f2a548f2
commit aaafcb4f77
1 changed files with 10 additions and 6 deletions

View File

@ -2213,14 +2213,18 @@ extern HRESULT XTL::EmuRecompileVshFunction
// HACK: Azurik. Prevent Direct3D from trying to assemble this.
if(!strcmp(pShaderDisassembly, "vs.1.1\n"))
{
EmuWarning("Cannot assemble empty vertex shader!");
EmuWarning("Attempting to use vertex declaration instead...");
EmuWarning("Replacing empty vertex shader with fallback");
// Attempt to use the vertex declaration for a fixed pipeline
// vertex shader instead...
*pbUseDeclarationOnly = 1;
static const char dummy[] =
"vs.1.1\n"
"mov oPos, v0\n";
hRet = S_OK;
hRet = D3DXAssembleShader(dummy,
strlen(dummy),
D3DXASM_SKIPVALIDATION,
NULL,
ppRecompiled,
NULL);
}
else
{