D3D12/Builders: Fix incorrect depth write mask

This commit is contained in:
Connor McLaughlin 2022-03-27 17:21:33 +10:00
parent 3c2d5ae508
commit a55537ec1b

View file

@ -194,7 +194,7 @@ void GraphicsPipelineBuilder::SetNoCullRasterizationState()
void GraphicsPipelineBuilder::SetDepthState(bool depth_test, bool depth_write, D3D12_COMPARISON_FUNC compare_op)
{
m_desc.DepthStencilState.DepthEnable = depth_test;
m_desc.DepthStencilState.DepthWriteMask = depth_test ? D3D12_DEPTH_WRITE_MASK_ALL : D3D12_DEPTH_WRITE_MASK_ZERO;
m_desc.DepthStencilState.DepthWriteMask = depth_write ? D3D12_DEPTH_WRITE_MASK_ALL : D3D12_DEPTH_WRITE_MASK_ZERO;
m_desc.DepthStencilState.DepthFunc = compare_op;
}