From 1d97fe7d539012b247489f19b94262e4c7bcb2fd Mon Sep 17 00:00:00 2001 From: Triang3l Date: Fri, 19 Oct 2018 12:30:01 +0300 Subject: [PATCH] [D3D12] ROV: Declare SV_IsFrontFace in the depth-only shader --- src/xenia/gpu/dxbc_shader_translator.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xenia/gpu/dxbc_shader_translator.cc b/src/xenia/gpu/dxbc_shader_translator.cc index 476877557..1ff173aaa 100644 --- a/src/xenia/gpu/dxbc_shader_translator.cc +++ b/src/xenia/gpu/dxbc_shader_translator.cc @@ -11919,8 +11919,12 @@ void DxbcShaderTranslator::WriteInputSignature() { shader_object_.push_back(9); shader_object_.push_back(1); shader_object_.push_back(kPSInFrontFaceRegister); - shader_object_.push_back(0x1 | - (is_depth_only_pixel_shader_ ? 0 : (0x1 << 8))); + if (edram_rov_used_) { + shader_object_.push_back(0x1 | (0x1 << 8)); + } else { + shader_object_.push_back(0x1 | + (is_depth_only_pixel_shader_ ? 0 : (0x1 << 8))); + } // Write the semantic names. new_offset = (uint32_t(shader_object_.size()) - chunk_position_dwords) * @@ -12329,7 +12333,7 @@ void DxbcShaderTranslator::WriteShaderCode() { shader_object_.push_back(kPSInPositionRegister); shader_object_.push_back(ENCODE_D3D10_SB_NAME(D3D10_SB_NAME_POSITION)); ++stat_.dcl_count; - if (!is_depth_only_pixel_shader_) { + if (edram_rov_used_ || !is_depth_only_pixel_shader_) { // Is front face. shader_object_.push_back( ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_DCL_INPUT_PS_SGV) |