From 4e5778d714792d7075b0aa89e70607a096baee9a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 28 Aug 2014 01:21:29 -0700 Subject: [PATCH] d3d: Correctly disable stencil testing. --- GPU/Directx9/StateMappingDX9.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GPU/Directx9/StateMappingDX9.cpp b/GPU/Directx9/StateMappingDX9.cpp index e330aad1d6..95634b4b7c 100644 --- a/GPU/Directx9/StateMappingDX9.cpp +++ b/GPU/Directx9/StateMappingDX9.cpp @@ -231,7 +231,7 @@ void TransformDrawEngineDX9::ApplyDrawState(int prim) { dxstate.stencilOp.set(D3DSTENCILOP_REPLACE, D3DSTENCILOP_REPLACE, D3DSTENCILOP_REPLACE); dxstate.stencilFunc.set(D3DCMP_ALWAYS, 0, 0xFF); } else { - dxstate.depthTest.disable(); + dxstate.stencilTest.disable(); } } else { @@ -244,8 +244,9 @@ void TransformDrawEngineDX9::ApplyDrawState(int prim) { dxstate.depthTest.enable(); dxstate.depthFunc.set(ztests[gstate.getDepthTestFunction()]); dxstate.depthWrite.set(gstate.isDepthWriteEnabled()); - } else + } else { dxstate.depthTest.disable(); + } // PSP color/alpha mask is per bit but we can only support per byte. // But let's do that, at least. And let's try a threshold.