Skip to content

Commit

Permalink
gs-tc: propagate texture shuffle format on readback
Browse files Browse the repository at this point in the history
  • Loading branch information
tadanokojin committed Oct 9, 2021
1 parent 575b88a commit ef2c7ac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pcsx2/GS/Renderers/HW/GSTextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,16 @@ void GSTextureCache::InvalidateLocalMem(GSOffset* off, const GSVector4i& r)

// note: r.rintersect breaks Wizardry and Chaos Legion
// Read(t, t->m_valid) works in all tested games but is very slow in GUST titles ><

// propagate the format from the result of a channel effect
// texture is 16/8 bit but the real data is 32
// common use for shuffling is moving data into the alpha channel
// the game can then draw using 8H format
// in the case of silent hill blit 8H -> 8P
// this will matter later when the data ends up in GS memory in the wrong format
if (t->m_32_bits_fmt)
t->m_TEX0.PSM = PSM_PSMCT32;

if (GSTextureCache::m_disable_partial_invalidation)
{
Read(t, r.rintersect(t->m_valid));
Expand Down

0 comments on commit ef2c7ac

Please sign in to comment.