GS: skip no output draws.

This commit is contained in:
iMineLink 2022-02-05 13:55:41 +01:00 committed by refractionpcsx2
parent 01079f5162
commit d6f1291c0b
1 changed files with 12 additions and 0 deletions

View File

@ -1252,6 +1252,12 @@ void GSRendererHW::Draw()
GSDrawingContext* context = m_context;
const GSLocalMemory::psm_t& tex_psm = GSLocalMemory::m_psm[m_context->TEX0.PSM];
if (!context->FRAME.FBW)
{
GL_CACHE("Skipping draw with FRAME.FBW = 0.");
return;
}
// Fix TEX0 size
if (PRIM->TME && !IsMipMapActive())
m_context->ComputeFixedTEX0(m_vt.m_min.t.xyxy(m_vt.m_max.t));
@ -1290,6 +1296,12 @@ void GSRendererHW::Draw()
(context->FRAME.FBP == context->ZBUF.ZBP && !PRIM->TME && zm == 0 && fm == 0 && context->TEST.ZTE)
);
if (no_rt && no_ds)
{
GL_CACHE("Skipping draw with no color nor depth output.");
return;
}
const bool draw_sprite_tex = PRIM->TME && (m_vt.m_primclass == GS_SPRITE_CLASS);
const GSVector4 delta_p = m_vt.m_max.p - m_vt.m_min.p;
const bool single_page = (delta_p.x <= 64.0f) && (delta_p.y <= 64.0f);