diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 2572e342..92d77561 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -3760,6 +3760,10 @@ namespace dxvk { DWORD oldUsage = oldTexture != nullptr ? oldTexture->Desc()->Usage : 0; DWORD newUsage = newTexture != nullptr ? newTexture->Desc()->Usage : 0; + DWORD combinedUsage = oldUsage | newUsage; + TextureChangePrivate(m_state.textures[StateSampler], pTexture); + m_dirtyTextures |= 1u << StateSampler; + UpdateActiveTextures(StateSampler, combinedUsage); if (newTexture != nullptr) { const bool oldDepth = m_depthTextures & (1u << StateSampler); @@ -3780,14 +3784,6 @@ namespace dxvk { UpdateActiveFetch4(StateSampler); } - DWORD combinedUsage = oldUsage | newUsage; - - TextureChangePrivate(m_state.textures[StateSampler], pTexture); - - m_dirtyTextures |= 1u << StateSampler; - - UpdateActiveTextures(StateSampler, combinedUsage); - return D3D_OK; }