From 7e938b23630888aebe444dc652df39d8add141ad Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Wed, 11 Nov 2015 20:54:38 +0100 Subject: [PATCH] d3d12: Use INCR for stencil op when an unknow op is used. Fixes shadows in Jet Set Radio. --- rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp index 7242c78462..87d9a04e44 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp @@ -106,14 +106,15 @@ D3D12_STENCIL_OP get_stencil_op(u32 op) noexcept case CELL_GCM_KEEP: return D3D12_STENCIL_OP_KEEP; case CELL_GCM_ZERO: return D3D12_STENCIL_OP_ZERO; case CELL_GCM_REPLACE: return D3D12_STENCIL_OP_REPLACE; - default: // Jet Set Radio set some garbage, turns out OP_INCR is the intended behavior. case CELL_GCM_INCR: return D3D12_STENCIL_OP_INCR; case CELL_GCM_DECR: return D3D12_STENCIL_OP_DECR; case CELL_GCM_INCR_WRAP: case CELL_GCM_DECR_WRAP: unreachable("Unsupported Stencil Op %d"); } - unreachable("Wrong Stencil Op %d"); + // Jet Set Radio uses an unknow op but INCR seems to be the intended one + LOG_WARNING(RSX, "Unknow stencil op %x, fallback to INCR", op); + return D3D12_STENCIL_OP_INCR; } D3D12_COMPARISON_FUNC get_compare_func(u32 op) noexcept