From 674f008e2385019df4e04680f2ea970cf1715c67 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 9 Aug 2021 03:20:45 +0100 Subject: [PATCH] [d3d9] Use m_activeTexture mask for SRGB check --- 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 60551b8c8..3e1d54e7b 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -3660,7 +3660,7 @@ namespace dxvk { || Type == D3DSAMP_MAXMIPLEVEL || Type == D3DSAMP_BORDERCOLOR) m_dirtySamplerStates |= 1u << StateSampler; - else if (Type == D3DSAMP_SRGBTEXTURE && m_state.textures[StateSampler] != nullptr) + else if (Type == D3DSAMP_SRGBTEXTURE && (m_activeTextures & (1u << StateSampler))) m_dirtyTextures |= 1u << StateSampler; constexpr DWORD Fetch4Enabled = MAKEFOURCC('G', 'E', 'T', '4');