mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[d3d9] Avoid unnecessary state block constant bits when not SWVPing
This commit is contained in:
parent
312905e8a3
commit
78e4816fc0
@ -462,9 +462,14 @@ namespace dxvk {
|
|||||||
m_captures.flags.set(D3D9CapturedStateFlag::VertexShader);
|
m_captures.flags.set(D3D9CapturedStateFlag::VertexShader);
|
||||||
m_captures.flags.set(D3D9CapturedStateFlag::VsConstants);
|
m_captures.flags.set(D3D9CapturedStateFlag::VsConstants);
|
||||||
|
|
||||||
m_captures.vsConsts.fConsts.setAll();
|
for (uint32_t i = 0; i < m_parent->GetVertexConstantLayout().floatCount / 32; i++)
|
||||||
m_captures.vsConsts.iConsts.setAll();
|
m_captures.vsConsts.fConsts.dword(i) = std::numeric_limits<uint32_t>::max();
|
||||||
m_captures.vsConsts.bConsts.setAll();
|
|
||||||
|
for (uint32_t i = 0; i < m_parent->GetVertexConstantLayout().intCount / 32; i++)
|
||||||
|
m_captures.vsConsts.iConsts.dword(i) = std::numeric_limits<uint32_t>::max();
|
||||||
|
|
||||||
|
for (uint32_t i = 0; i < m_parent->GetVertexConstantLayout().bitmaskCount; i++)
|
||||||
|
m_captures.vsConsts.bConsts.dword(i) = std::numeric_limits<uint32_t>::max();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -309,8 +309,10 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint32_t i = 0; i < m_captures.vsConsts.bConsts.dwordCount(); i++)
|
if (m_captures.vsConsts.bConsts.any()) {
|
||||||
dst->SetVertexBoolBitfield(i, m_captures.vsConsts.bConsts.dword(i), src->vsConsts.bConsts[i]);
|
for (uint32_t i = 0; i < m_captures.vsConsts.bConsts.dwordCount(); i++)
|
||||||
|
dst->SetVertexBoolBitfield(i, m_captures.vsConsts.bConsts.dword(i), src->vsConsts.bConsts[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_captures.flags.test(D3D9CapturedStateFlag::PsConstants)) {
|
if (m_captures.flags.test(D3D9CapturedStateFlag::PsConstants)) {
|
||||||
@ -330,8 +332,10 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint32_t i = 0; i < m_captures.psConsts.bConsts.dwordCount(); i++)
|
if (m_captures.psConsts.bConsts.any()) {
|
||||||
dst->SetPixelBoolBitfield(i, m_captures.psConsts.bConsts.dword(i), src->psConsts.bConsts[i]);
|
for (uint32_t i = 0; i < m_captures.psConsts.bConsts.dwordCount(); i++)
|
||||||
|
dst->SetPixelBoolBitfield(i, m_captures.psConsts.bConsts.dword(i), src->psConsts.bConsts[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user