1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-04 16:24:29 +01:00

[d3d9] Don't rebind AlphaTest when changing RT if not necessary

This commit is contained in:
Joshua Ashton 2023-06-22 15:47:51 +01:00 committed by Joshie
parent c768196251
commit a791493d14

View File

@ -1439,8 +1439,6 @@ namespace dxvk {
m_flags.set(D3D9DeviceFlag::DirtyViewportScissor);
m_state.scissorRect = scissorRect;
}
m_flags.set(D3D9DeviceFlag::DirtyAlphaTestState);
}
if (m_state.renderTargets[RenderTargetIndex] == rt)
@ -1472,6 +1470,11 @@ namespace dxvk {
if (RenderTargetIndex == 0) {
if (likely(texInfo != nullptr)) {
if (IsAlphaTestEnabled()) {
// Need to recalculate the precision.
m_flags.set(D3D9DeviceFlag::DirtyAlphaTestState);
}
bool validSampleMask = texInfo->Desc()->MultiSample > D3DMULTISAMPLE_NONMASKABLE;
if (validSampleMask != m_flags.test(D3D9DeviceFlag::ValidSampleMask)) {