From 457c0c30217993520262caa631e2c4ae59bbd16b Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 3 Apr 2020 07:52:35 +0100 Subject: [PATCH] [d3d9] Fix state sometimes not being set in SetRenderState Previously this prevented us disabling AlphaToCoverage once the application enabled it. --- src/d3d9/d3d9_device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index db7734f6..1f4b564e 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -1673,6 +1673,8 @@ namespace dxvk { const bool oldNVDB = states[D3DRS_ADAPTIVETESS_X] == uint32_t(D3D9Format::NVDB); const bool oldAlphaTest = IsAlphaTestEnabled(); + states[State] = Value; + // AMD's driver hack for ATOC and RESZ if (unlikely(State == D3DRS_POINTSIZE)) { // ATOC @@ -1731,8 +1733,6 @@ namespace dxvk { } } - states[State] = Value; - switch (State) { case D3DRS_SEPARATEALPHABLENDENABLE: case D3DRS_ALPHABLENDENABLE: