Skip to content

Commit

Permalink
GS/HW: Always calculate valid area + end block on new targets
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Aug 27, 2023
1 parent 0678bb0 commit 43335cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pcsx2/GS/Renderers/HW/GSTextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
else
{
dst->UpdateValidity(GSVector4i::loadh(valid_size));
}

dst->UpdateValidity(GSVector4i::loadh(valid_size));

for (int type = 0; type < 2; type++)
{
Expand Down Expand Up @@ -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;
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
dst->Update();
// Invalidate has been moved to after DrawPrims(), because we might kill the current sources' backing.
Expand Down

0 comments on commit 43335cd

Please sign in to comment.