GS/TC: Use proper alpha min max for palettes.

If it's an old source made from target make sure it isn't a palette, alphas need to be used from the palette then.
This commit is contained in:
lightningterror 2024-12-11 22:39:35 +01:00
parent 65748351c7
commit ecc24ce2e9
1 changed files with 5 additions and 2 deletions

View File

@ -1742,9 +1742,12 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const bool is_color, const
TEX0.TBP0, psm_s.pal > 0 ? TEX0.CBP : 0, TEX0.TBP0, psm_s.pal > 0 ? TEX0.CBP : 0,
psm_str(TEX0.PSM)); psm_str(TEX0.PSM));
// If it's from a target, we need to make sure the alpha information is up to date, especially in 16/24 bit formats where it can change draw to draw. // If it's an old source made from target make sure it isn't a palette,
// alphas need to be used from the palette then.
// If it's from a target, we need to make sure the alpha information is up to date,
// especially in 16/24 bit formats where it can change draw to draw.
// Guard against merged targets which don't actually link. // Guard against merged targets which don't actually link.
if (src->m_target && src->m_from_target) if (!src->m_palette && src->m_target && src->m_from_target)
{ {
src->m_valid_alpha_minmax = true; src->m_valid_alpha_minmax = true;
if (src->m_target_direct) if (src->m_target_direct)