From 4f0c217633c5b4a2c7257ba552485ce416dceb93 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 8 Aug 2022 03:53:25 +0100 Subject: [PATCH] [d3d9] Fix recording MultiplyTransform --- src/d3d9/d3d9_device.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 56f1206ba..74a8e5b0e 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -1606,10 +1606,10 @@ namespace dxvk { HRESULT STDMETHODCALLTYPE D3D9DeviceEx::MultiplyTransform(D3DTRANSFORMSTATETYPE TransformState, const D3DMATRIX* pMatrix) { D3D9DeviceLock lock = LockDevice(); - if (unlikely(ShouldRecord())) - return m_recorder->MultiplyStateTransform(TransformState, pMatrix); + const uint32_t idx = GetTransformIndex(TransformState); - uint32_t idx = GetTransformIndex(TransformState); + if (unlikely(ShouldRecord())) + return m_recorder->MultiplyStateTransform(idx, pMatrix); m_state.transforms[idx] = m_state.transforms[idx] * ConvertMatrix(pMatrix);