Prevent null/broken shaders from dying in d3dcompiler.

This commit is contained in:
Ben Vanik 2014-07-03 12:58:56 -07:00
parent 3b853f6201
commit 824d3c246f
1 changed files with 2 additions and 1 deletions

View File

@ -274,7 +274,8 @@ int D3D11ShaderTranslator::TranslatePixelShader(
// Pixel shader main() header. // Pixel shader main() header.
append( append(
"PS_OUTPUT main(VS_OUTPUT i) {\n" "PS_OUTPUT main(VS_OUTPUT i) {\n"
" PS_OUTPUT o;\n"); " PS_OUTPUT o;\n"
" o.oC0 = float4(1.0, 0.0, 0.0, 1.0);\n");
// Add temporary registers. // Add temporary registers.
uint32_t temp_regs = program_cntl.vs_regs + program_cntl.ps_regs; uint32_t temp_regs = program_cntl.vs_regs + program_cntl.ps_regs;