Skip to content

Commit

Permalink
GS/HW: Fix drawing with mismatched target sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jan 12, 2024
1 parent deb39cc commit d427db4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pcsx2/GS/Renderers/HW/GSRendererHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2799,6 +2799,16 @@ void GSRendererHW::Draw()
}
}
}
else
{
// RT and DS sizes need to match, even if we're not doing any resizing.
const int new_w = std::max(rt ? rt->m_unscaled_size.x : 0, ds ? ds->m_unscaled_size.x : 0);
const int new_h = std::max(rt ? rt->m_unscaled_size.y : 0, ds ? ds->m_unscaled_size.y : 0);
if (rt)
rt->ResizeTexture(new_w, new_h);
if (ds)
ds->ResizeTexture(new_w, new_h);
}

if (rt)
{
Expand Down

0 comments on commit d427db4

Please sign in to comment.