Skip to content

Commit

Permalink
GS/TC: Invalidate alpha on overlapping targets with no alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Oct 21, 2023
1 parent 3e4be2c commit 489fdc5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pcsx2/GS/Renderers/HW/GSTextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2847,6 +2847,13 @@ void GSTextureCache::InvalidateVideoMem(const GSOffset& off, const GSVector4i& r
}
}
}
// This is a situation where it is uploading in to the alpha channel but that is not part of the mask for the target format.
// So we need to make sure the alpha is not marked as valid. (Juiced does a shuffle on the Z24 depth, making the alpha valid data).
else if (GSUtil::GetChannelMask(psm) == 0x8 && GSUtil::GetChannelMask(t->m_TEX0.PSM) == 0x7 && t->Overlaps(bp, bw, psm, r))
{
t->m_valid_alpha_high &= !(psm == PSMT8H || psm == PSMT4HH);
t->m_valid_alpha_low &= !(psm == PSMT8H || psm == PSMT4HL);
}
}
}
}
Expand Down

0 comments on commit 489fdc5

Please sign in to comment.