From b838b65516bfb17e8ebe745f2a970e98973375b3 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 6 Dec 2022 22:15:13 +0100 Subject: [PATCH] [d3d9] Correctly mask alpha reference push constant We accidentally lost this during the rework, since the initial implementation scaled the alpha ref value on the CPU. Fixes #3123. --- src/d3d9/d3d9_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index b882fcc4..b5be3db8 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -5187,7 +5187,7 @@ namespace dxvk { auto& rs = m_state.renderStates; if constexpr (Item == D3D9RenderStateItem::AlphaRef) { - uint32_t alpha = rs[D3DRS_ALPHAREF]; + uint32_t alpha = rs[D3DRS_ALPHAREF] & 0xFF; UpdatePushConstant(&alpha); } else if constexpr (Item == D3D9RenderStateItem::FogColor) {