mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-17 11:34:18 +01:00
GS/HW: Invalidate single columns on small writes when formats mismatch
This commit is contained in:
1 parent
6c8b37d7ca
commit
d9b58ec3ce
1 file changed
+7
-1
@@ -621,9 +621,12 @@ void GSTextureCache::DirtyRectByPage(u32 sbp, u32 spsm, u32 sbw, Target* t, GSVe
|
||||
if (!(src_info->bpp == dst_info->bpp))
|
||||
{
|
||||
const int src_bpp = src_info->bpp;
|
||||
const bool column_align = !block_offset && src_r.z <= src_info->cs.x && src_r.w <= src_info->cs.y && src_info->depth == dst_info->depth;
|
||||
|
||||
if (block_offset)
|
||||
in_rect = in_rect.ralign<Align_Outside>(src_info->bs);
|
||||
else if (column_align)
|
||||
in_rect = in_rect.ralign<Align_Outside>(src_info->cs);
|
||||
else
|
||||
in_rect = in_rect.ralign<Align_Outside>(src_info->pgs);
|
||||
|
||||
@@ -639,7 +642,10 @@ void GSTextureCache::DirtyRectByPage(u32 sbp, u32 spsm, u32 sbw, Target* t, GSVe
|
||||
|
||||
// Translate back to the new(dst) format.
|
||||
in_rect = GSVector4i(in_pages.x * src_info->pgs.x, in_pages.y * src_info->pgs.y, in_pages.z * src_info->pgs.x, in_pages.w * src_info->pgs.y);
|
||||
in_rect += GSVector4i(in_blocks.x * src_info->bs.x, in_blocks.y * src_info->bs.y, in_blocks.z * src_info->bs.x, in_blocks.w * src_info->bs.y);
|
||||
if (column_align)
|
||||
in_rect += GSVector4i(in_blocks.x * src_info->cs.x, in_blocks.y * src_info->cs.y, in_blocks.z * src_info->cs.x, in_blocks.w * src_info->cs.y);
|
||||
else
|
||||
in_rect += GSVector4i(in_blocks.x * src_info->bs.x, in_blocks.y * src_info->bs.y, in_blocks.z * src_info->bs.x, in_blocks.w * src_info->bs.y);
|
||||
|
||||
if (in_rect.rempty())
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user