From 920704c71a1b662c77759989459b08ebdaec8cc9 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Tue, 22 Mar 2022 21:39:06 +0300 Subject: [PATCH] [D3D12] RT transfer: Same front/back stencil ops --- .../gpu/d3d12/d3d12_render_target_cache.cc | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc index 61b8bb83f..8ce62e9a9 100644 --- a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc +++ b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc @@ -4388,14 +4388,8 @@ D3D12RenderTargetCache::GetOrCreateTransferPipelines(TransferShaderKey key) { D3D12_STENCIL_OP_REPLACE; pipeline_desc.DepthStencilState.FrontFace.StencilFunc = D3D12_COMPARISON_FUNC_ALWAYS; - pipeline_desc.DepthStencilState.BackFace.StencilFailOp = - D3D12_STENCIL_OP_KEEP; - pipeline_desc.DepthStencilState.BackFace.StencilDepthFailOp = - D3D12_STENCIL_OP_KEEP; - pipeline_desc.DepthStencilState.BackFace.StencilPassOp = - D3D12_STENCIL_OP_REPLACE; - pipeline_desc.DepthStencilState.BackFace.StencilFunc = - D3D12_COMPARISON_FUNC_ALWAYS; + pipeline_desc.DepthStencilState.BackFace = + pipeline_desc.DepthStencilState.FrontFace; pipeline_desc.DSVFormat = GetDepthDSVDXGIFormat(dest_depth_format); // Even if creation fails, still store the null pointers not to try to // create again. @@ -4448,14 +4442,8 @@ D3D12RenderTargetCache::GetOrCreateTransferPipelines(TransferShaderKey key) { // stencil being different. pipeline_desc.DepthStencilState.FrontFace.StencilFunc = D3D12_COMPARISON_FUNC_ALWAYS; - pipeline_desc.DepthStencilState.BackFace.StencilFailOp = - D3D12_STENCIL_OP_KEEP; - pipeline_desc.DepthStencilState.BackFace.StencilDepthFailOp = - D3D12_STENCIL_OP_REPLACE; - pipeline_desc.DepthStencilState.BackFace.StencilPassOp = - D3D12_STENCIL_OP_REPLACE; - pipeline_desc.DepthStencilState.BackFace.StencilFunc = - D3D12_COMPARISON_FUNC_ALWAYS; + pipeline_desc.DepthStencilState.BackFace = + pipeline_desc.DepthStencilState.FrontFace; } pipeline_desc.DSVFormat = GetDepthDSVDXGIFormat(dest_depth_format); }