From 2a5b465c441d649e29c1d9a9e073426f4cf105d4 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 18 May 2020 21:35:02 -0700 Subject: [PATCH] D3D9: Avoid clearing color on stencil upload. This makes it match Direct3D 9. We ideally want to clear alpha, but certainly not RGB. --- GPU/Directx9/StencilBufferDX9.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/Directx9/StencilBufferDX9.cpp b/GPU/Directx9/StencilBufferDX9.cpp index 78981a8969..fab9e99594 100644 --- a/GPU/Directx9/StencilBufferDX9.cpp +++ b/GPU/Directx9/StencilBufferDX9.cpp @@ -207,7 +207,7 @@ bool FramebufferManagerDX9::NotifyStencilUpload(u32 addr, int size, StencilUploa if (!tex) return false; - device_->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_STENCIL, D3DCOLOR_RGBA(0, 0, 0, 0), 0.0f, 0); + // TODO: Ideally, we should clear alpha to zero here (but not RGB.) dxstate.stencilFunc.set(D3DCMP_ALWAYS, 0xFF, 0xFF);