ShaderGen: Handle ShaderCode objects directly.

ShaderGeneratorInterface does not have virtual function members, so we have to implement each type explicitly.
This commit is contained in:
Jules Blok
2014-10-29 13:16:24 +01:00
parent b236c363de
commit fa32f751d3
6 changed files with 12 additions and 14 deletions

View File

@ -277,11 +277,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
);
}
ShaderCode code;
char buf[16384];
code.SetBuffer(buf);
GenerateVSOutputStructForGS(code, ApiType);
out.Write(code.GetBuffer());
GenerateVSOutputStruct(out, ApiType);
const bool forced_early_z = g_ActiveConfig.backend_info.bSupportsEarlyZ && bpmem.UseEarlyDepthTest() && (g_ActiveConfig.bFastDepthCalc || bpmem.alpha_test.TestResult() == AlphaTest::UNDETERMINED);
const bool per_pixel_depth = (bpmem.ztex2.op != ZTEXTURE_DISABLE && bpmem.UseLateDepthTest()) || (!g_ActiveConfig.bFastDepthCalc && bpmem.zmode.testenable && !forced_early_z);