Skip to content

Commit

Permalink
[d3d9] Skip recording MultiplyTransform calls in state blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterSnowfall committed Nov 25, 2024
1 parent 5515b9d commit 31f2a79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2033,9 +2033,9 @@ namespace dxvk {

const uint32_t idx = GetTransformIndex(TransformState);

// D3D8 state blocks ignore capturing calls to MultiplyTransform().
if (unlikely(!m_isD3D8Compatible && ShouldRecord()))
return m_recorder->MultiplyStateTransform(idx, pMatrix);
// State blocks ignore capturing calls to MultiplyTransform().
if (unlikely(ShouldRecord()))
Logger::debug("D3D9DeviceEx::MultiplyTransform: Called during state block recording, but will apply directly.");

m_state.transforms[idx] = m_state.transforms[idx] * ConvertMatrix(pMatrix);

Expand Down
9 changes: 0 additions & 9 deletions src/d3d9/d3d9_stateblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,6 @@ namespace dxvk {
}


HRESULT D3D9StateBlock::MultiplyStateTransform(uint32_t idx, const D3DMATRIX* pMatrix) {
m_state.transforms[idx] = m_state.transforms[idx] * ConvertMatrix(pMatrix);

m_captures.flags.set(D3D9CapturedStateFlag::Transforms);
m_captures.transforms.set(idx, true);
return D3D_OK;
}


HRESULT D3D9StateBlock::SetViewport(const D3DVIEWPORT9* pViewport) {
m_state.viewport = *pViewport;

Expand Down
2 changes: 0 additions & 2 deletions src/d3d9/d3d9_stateblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ namespace dxvk {
D3D9TextureStageStateTypes Type,
DWORD Value);

HRESULT MultiplyStateTransform(uint32_t idx, const D3DMATRIX* pMatrix);

HRESULT SetViewport(const D3DVIEWPORT9* pViewport);

HRESULT SetScissorRect(const RECT* pRect);
Expand Down

0 comments on commit 31f2a79

Please sign in to comment.