Setting default output values for pixel shaders.

This commit is contained in:
Ben Vanik 2014-07-08 16:01:57 -07:00
parent 2a68a1b35b
commit eb7987a634
1 changed files with 5 additions and 2 deletions

View File

@ -274,8 +274,11 @@ int D3D11ShaderTranslator::TranslatePixelShader(
// Pixel shader main() header.
append(
"PS_OUTPUT main(VS_OUTPUT i) {\n"
" PS_OUTPUT o;\n"
" o.oC0 = float4(1.0, 0.0, 0.0, 1.0);\n");
" PS_OUTPUT o;\n");
for (uint32_t n = 0; n < alloc_counts.params; n++) {
append(
" o.oC%d = float4(1.0, 0.0, 0.0, 1.0);\n", n);
}
// Add temporary registers.
uint32_t temp_regs = program_cntl.vs_regs + program_cntl.ps_regs;