From 824d3c246fea4a038f24004abad1ee1790a85795 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Thu, 3 Jul 2014 12:58:56 -0700 Subject: [PATCH] Prevent null/broken shaders from dying in d3dcompiler. --- src/xenia/gpu/d3d11/d3d11_shader_translator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/d3d11/d3d11_shader_translator.cc b/src/xenia/gpu/d3d11/d3d11_shader_translator.cc index 549f0c72d..5bb28c6e6 100644 --- a/src/xenia/gpu/d3d11/d3d11_shader_translator.cc +++ b/src/xenia/gpu/d3d11/d3d11_shader_translator.cc @@ -274,7 +274,8 @@ int D3D11ShaderTranslator::TranslatePixelShader( // Pixel shader main() header. append( "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. uint32_t temp_regs = program_cntl.vs_regs + program_cntl.ps_regs;