From 7936fa2dbdf554817cab60fcab82222cf16a0113 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Fri, 20 Jun 2014 20:44:39 -0700 Subject: [PATCH] Fix constants in pixel shaders. --- src/xenia/gpu/d3d11/d3d11_shader_translator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/gpu/d3d11/d3d11_shader_translator.cc b/src/xenia/gpu/d3d11/d3d11_shader_translator.cc index dde024356..ef8b75650 100644 --- a/src/xenia/gpu/d3d11/d3d11_shader_translator.cc +++ b/src/xenia/gpu/d3d11/d3d11_shader_translator.cc @@ -275,7 +275,7 @@ int D3D11ShaderTranslator::TranslatePixelShader( uint32_t temp_regs = program_cntl.vs_regs + program_cntl.ps_regs; for (uint32_t n = 0; n <= MAX(15, temp_regs); n++) { append( - " float4 r%d = c[%d];\n", n, n); + " float4 r%d = c[%d];\n", n, n + 256); } append(" float4 t;\n"); @@ -365,7 +365,7 @@ void D3D11ShaderTranslator::AppendSrcReg(uint32_t num, uint32_t type, append("r%u", num); } else { // Constant. - append("c[%u]", num); + append("c[%u]", type_ == XE_GPU_SHADER_TYPE_PIXEL ? num + 256 : num); } if (swiz) { append(".");