GS: Unset scanmsk_used after 2 frames

This commit is contained in:
refractionpcsx2 2022-06-19 19:07:42 +01:00
parent 3377de1fe3
commit eb9507707d
3 changed files with 6 additions and 5 deletions

View File

@ -42,7 +42,7 @@ GSState::GSState()
, m_skip(0)
, m_skip_offset(0)
, m_q(1.0f)
, m_scanmask_used(false)
, m_scanmask_used(0)
, tex_flushed(true)
, m_vt(this, IsFirstProvokingVertex())
, m_regs(NULL)
@ -182,7 +182,7 @@ void GSState::Reset(bool hardware_reset)
m_vertex.tail = 0;
m_vertex.next = 0;
m_index.tail = 0;
m_scanmask_used = false;
m_scanmask_used = 0;
m_dirty_gs_regs = 0;
m_backed_up_ctx = -1;
@ -1271,7 +1271,7 @@ void GSState::GIFRegHandlerSCANMSK(const GIFReg* RESTRICT r)
m_env.SCANMSK = (GSVector4i)r->SCANMSK;
if (m_env.SCANMSK.MSK & 2)
m_scanmask_used = true;
m_scanmask_used = 2;
if (m_prev_env.SCANMSK.MSK != m_env.SCANMSK.MSK)
m_dirty_gs_regs |= (1 << DIRTY_REG_SCANMSK);

View File

@ -161,7 +161,7 @@ protected:
GSVector4i m_scissor;
GSVector4i m_ofxy;
bool m_scanmask_used;
u8 m_scanmask_used;
bool tex_flushed;
struct

View File

@ -388,7 +388,8 @@ bool GSRenderer::Merge(int field)
}
}
m_scanmask_used = false;
if (m_scanmask_used)
m_scanmask_used--;
return true;
}