From 1f67602b98afdaef5660632d38f3d2cce6568e82 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Thu, 6 Feb 2020 22:37:38 +0000 Subject: [PATCH] [d3d9] Check correct sampler bitfield when applying/capturing sampler state --- src/d3d9/d3d9_stateblock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3d9/d3d9_stateblock.h b/src/d3d9/d3d9_stateblock.h index 5895e6f1..5f84b247 100644 --- a/src/d3d9/d3d9_stateblock.h +++ b/src/d3d9/d3d9_stateblock.h @@ -202,7 +202,7 @@ namespace dxvk { for (uint32_t sampler = m_captures.samplers.dword(0); sampler; sampler &= sampler - 1) { uint32_t samplerIdx = bit::tzcnt(sampler); - for (uint32_t state = m_captures.samplerStates[0].dword(0); state; state &= state - 1) { + for (uint32_t state = m_captures.samplerStates[samplerIdx].dword(0); state; state &= state - 1) { uint32_t stateIdx = bit::tzcnt(state); dst->SetStateSamplerState(samplerIdx, D3DSAMPLERSTATETYPE(stateIdx), src->samplerStates[samplerIdx][stateIdx]);