GS/HW: Always calculate valid area + end block on new targets

This commit is contained in:
refractionpcsx2 2023-08-27 21:57:38 +01:00
parent 0678bb03d7
commit 43335cd729
1 changed files with 4 additions and 4 deletions

View File

@ -2218,10 +2218,8 @@ bool GSTextureCache::PreloadTarget(GIFRegTEX0 TEX0, const GSVector2i& size, cons
AddDirtyRectTarget(dst, newrect, TEX0.PSM, TEX0.TBW, rgba, GSLocalMemory::m_psm[TEX0.PSM].trbpp >= 16); AddDirtyRectTarget(dst, newrect, TEX0.PSM, TEX0.TBW, rgba, GSLocalMemory::m_psm[TEX0.PSM].trbpp >= 16);
} }
} }
else
{
dst->UpdateValidity(GSVector4i::loadh(valid_size)); dst->UpdateValidity(GSVector4i::loadh(valid_size));
}
for (int type = 0; type < 2; type++) for (int type = 0; type < 2; type++)
{ {
@ -2262,6 +2260,8 @@ bool GSTextureCache::PreloadTarget(GIFRegTEX0 TEX0, const GSVector2i& size, cons
const int old_height = (dst->m_valid.w - y_reduction) * dst->m_scale; const int old_height = (dst->m_valid.w - y_reduction) * dst->m_scale;
GL_INS("RT double buffer copy from FBP 0x%x, %dx%d => %d,%d", t->m_TEX0.TBP0, copy_width, copy_height, 0, old_height); GL_INS("RT double buffer copy from FBP 0x%x, %dx%d => %d,%d", t->m_TEX0.TBP0, copy_width, copy_height, 0, old_height);
pxAssert(old_height > 0);
// Clear the dirty first // Clear the dirty first
dst->Update(); dst->Update();
// Invalidate has been moved to after DrawPrims(), because we might kill the current sources' backing. // Invalidate has been moved to after DrawPrims(), because we might kill the current sources' backing.