[D3D12] DXBC: Don't update coverage in the depth-only pixel shader
This commit is contained in:
parent
75ec48d225
commit
77e9ab342c
|
@ -2392,21 +2392,23 @@ void DxbcShaderTranslator::CompletePixelShader_WriteToROV_DepthStencil(
|
||||||
ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(1));
|
ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(1));
|
||||||
++stat_.instruction_count;
|
++stat_.instruction_count;
|
||||||
|
|
||||||
// Update the coverage according to the depth/stencil test result (0 or
|
if (!is_depth_only_pixel_shader_) {
|
||||||
// 0xFFFFFFFF) after writing the new depth/stencil if stencil is enabled.
|
// Update the coverage according to the depth/stencil test result (0 or
|
||||||
shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_AND) |
|
// 0xFFFFFFFF) after writing the new depth/stencil if stencil is enabled.
|
||||||
ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(7));
|
shader_code_.push_back(ENCODE_D3D10_SB_OPCODE_TYPE(D3D10_SB_OPCODE_AND) |
|
||||||
shader_code_.push_back(
|
ENCODE_D3D10_SB_TOKENIZED_INSTRUCTION_LENGTH(7));
|
||||||
EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1));
|
shader_code_.push_back(
|
||||||
shader_code_.push_back(coverage_out_temp);
|
EncodeVectorMaskedOperand(D3D10_SB_OPERAND_TYPE_TEMP, 0b1111, 1));
|
||||||
shader_code_.push_back(
|
shader_code_.push_back(coverage_out_temp);
|
||||||
EncodeVectorSwizzledOperand(D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1));
|
shader_code_.push_back(EncodeVectorSwizzledOperand(
|
||||||
shader_code_.push_back(coverage_out_temp);
|
D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1));
|
||||||
shader_code_.push_back(
|
shader_code_.push_back(coverage_out_temp);
|
||||||
EncodeVectorSwizzledOperand(D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1));
|
shader_code_.push_back(EncodeVectorSwizzledOperand(
|
||||||
shader_code_.push_back(depth_test_results_temp);
|
D3D10_SB_OPERAND_TYPE_TEMP, kSwizzleXYZW, 1));
|
||||||
++stat_.instruction_count;
|
shader_code_.push_back(depth_test_results_temp);
|
||||||
++stat_.uint_instruction_count;
|
++stat_.instruction_count;
|
||||||
|
++stat_.uint_instruction_count;
|
||||||
|
}
|
||||||
|
|
||||||
// Release depth_new_values_temp (if allocated), depth_values_temp,
|
// Release depth_new_values_temp (if allocated), depth_values_temp,
|
||||||
// stencil_values_temp and depth_test_results_temp.
|
// stencil_values_temp and depth_test_results_temp.
|
||||||
|
|
Loading…
Reference in New Issue