From b183b13868f18d9fca824b0746d727977e85bf69 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sun, 21 Oct 2018 15:33:51 +0300 Subject: [PATCH] [D3D12] ROV: Fix 7e3 alpha converted twice --- src/xenia/gpu/dxbc_shader_translator.cc | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/xenia/gpu/dxbc_shader_translator.cc b/src/xenia/gpu/dxbc_shader_translator.cc index de917f537..bcc3a4328 100644 --- a/src/xenia/gpu/dxbc_shader_translator.cc +++ b/src/xenia/gpu/dxbc_shader_translator.cc @@ -2240,18 +2240,6 @@ void DxbcShaderTranslator::CompletePixelShader_WriteToROV_LoadColor( // Release f10_mantissa_temp, f10_exponent_temp and f10_denormalized_temp. PopSystemTemp(3); - // Convert alpha from fixed-point. - shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_UTOF) | - ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(5)); - shader_code_.push_back( - EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1000, 1)); - shader_code_.push_back(target_temp); - shader_code_.push_back( - EncodeVectorSelectOperand(D3D10_SB_OPERAND_TYPE_TEMP, 3, 1)); - shader_code_.push_back(target_temp); - ++stat_.instruction_count; - ++stat_.conversion_instruction_count; - // 7e3 conversion done. shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_ENDIF) | ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(1)); @@ -3245,18 +3233,6 @@ void DxbcShaderTranslator::CompletePixelShader_WriteToROV_StoreColor( // Release f10_temp1 and f10_temp2. PopSystemTemp(2); - // Convert alpha to fixed-point. - shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_FTOU) | - ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(5)); - shader_code_.push_back( - EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1000, 1)); - shader_code_.push_back(source_and_scratch_temp); - shader_code_.push_back( - EncodeVectorSelectOperand(D3D10_SB_OPERAND_TYPE_TEMP, 3, 1)); - shader_code_.push_back(source_and_scratch_temp); - ++stat_.instruction_count; - ++stat_.conversion_instruction_count; - // 7e3 conversion done. shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_ENDIF) | ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(1));