[D3D12] ROV: Don't mark Z of PS SV_Position as used in dcl

This commit is contained in:
Triang3l 2018-11-26 20:53:29 +03:00
parent b56f8f9c7c
commit f634e94227
1 changed files with 4 additions and 4 deletions

View File

@ -14051,15 +14051,15 @@ void DxbcShaderTranslator::WriteShaderCode() {
shader_object_.push_back(uint32_t(InOutRegister::kPSInClipSpaceZW)); shader_object_.push_back(uint32_t(InOutRegister::kPSInClipSpaceZW));
++stat_.dcl_count; ++stat_.dcl_count;
} }
// Position input (only XY needed for ps_param_gen, but for ROV access, XYZ // Position input (only XY needed for ps_param_gen, and the ROV depth code
// are needed). // calculates the depth from clip space Z and W).
shader_object_.push_back( shader_object_.push_back(
ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_DCL_INPUT_PS_SIV) | ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_DCL_INPUT_PS_SIV) |
ENCODE_D3D10_SB_INPUT_INTERPOLATION_MODE( ENCODE_D3D10_SB_INPUT_INTERPOLATION_MODE(
D3D10_SB_INTERPOLATION_LINEAR_NOPERSPECTIVE) | D3D10_SB_INTERPOLATION_LINEAR_NOPERSPECTIVE) |
ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(4)); ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(4));
shader_object_.push_back(EncodeVectorMaskedOperand( shader_object_.push_back(
D3D10_SB_OPERAND_TYPE_INPUT, edram_rov_used_ ? 0b0111 : 0b0011, 1)); EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_INPUT, 0b0011, 1));
shader_object_.push_back(uint32_t(InOutRegister::kPSInPosition)); shader_object_.push_back(uint32_t(InOutRegister::kPSInPosition));
shader_object_.push_back(ENCODE_D3D10_SB_NAME(D3D10_SB_NAME_POSITION)); shader_object_.push_back(ENCODE_D3D10_SB_NAME(D3D10_SB_NAME_POSITION));
++stat_.dcl_count; ++stat_.dcl_count;