Leave depth/stencil testing enabled for quad overdraw pipeline

This commit is contained in:
baldurk
2018-11-01 12:23:11 +00:00
parent b0a18d16ed
commit 60316c0ffd
2 changed files with 7 additions and 8 deletions
+6 -2
View File
@@ -145,8 +145,12 @@ struct D3D12QuadOverdrawCallback : public D3D12DrawcallCallback
// disable depth/stencil writes
pipeDesc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ZERO;
pipeDesc.DepthStencilState.FrontFace.StencilFunc = D3D12_COMPARISON_FUNC_ALWAYS;
pipeDesc.DepthStencilState.BackFace.StencilFunc = D3D12_COMPARISON_FUNC_ALWAYS;
pipeDesc.DepthStencilState.FrontFace.StencilPassOp = D3D12_STENCIL_OP_KEEP;
pipeDesc.DepthStencilState.FrontFace.StencilFailOp = D3D12_STENCIL_OP_KEEP;
pipeDesc.DepthStencilState.FrontFace.StencilDepthFailOp = D3D12_STENCIL_OP_KEEP;
pipeDesc.DepthStencilState.BackFace.StencilPassOp = D3D12_STENCIL_OP_KEEP;
pipeDesc.DepthStencilState.BackFace.StencilFailOp = D3D12_STENCIL_OP_KEEP;
pipeDesc.DepthStencilState.BackFace.StencilDepthFailOp = D3D12_STENCIL_OP_KEEP;
pipeDesc.DepthStencilState.StencilWriteMask = 0;
pipeDesc.PS = m_QuadWritePS;
+1 -6
View File
@@ -126,15 +126,10 @@ struct VulkanQuadOverdrawCallback : public VulkanDrawcallCallback
att->colorWriteMask = 0x0;
}
// disable depth/stencil writes
// disable depth/stencil writes but keep any tests enabled
VkPipelineDepthStencilStateCreateInfo *ds =
(VkPipelineDepthStencilStateCreateInfo *)pipeCreateInfo.pDepthStencilState;
ds->depthWriteEnable = false;
ds->stencilTestEnable = false;
ds->depthBoundsTestEnable = false;
ds->front.compareOp = ds->back.compareOp = VK_COMPARE_OP_ALWAYS;
ds->front.compareMask = ds->back.compareMask = ds->front.writeMask = ds->back.writeMask = 0xff;
ds->front.reference = ds->back.reference = 0;
ds->front.passOp = ds->front.failOp = ds->front.depthFailOp = VK_STENCIL_OP_KEEP;
ds->back.passOp = ds->back.failOp = ds->back.depthFailOp = VK_STENCIL_OP_KEEP;