gsdx: better detection of texture shuffle

Some effects were missed on Wallace & Gromit
This commit is contained in:
Gregory Hainaut 2015-07-09 23:05:07 +02:00
parent ad86bb5faa
commit 22f11958e9
1 changed files with 6 additions and 2 deletions

View File

@ -401,11 +401,15 @@ void GSRendererHW::Draw()
m_mem.m_clut.Read32(context->TEX0, env.TEXA);
}
bool not_really_16_bits;
if (rt) {
rt->m_32_bits_fmt |= tex->m_32_bits_fmt;
not_really_16_bits = rt->m_32_bits_fmt;
} else {
not_really_16_bits = tex->m_32_bits_fmt;
}
// Both input and output are 16 bits but texture was initially 32 bits!
m_texture_shuffle = ((context->FRAME.PSM & 0x2) && ((context->TEX0.PSM & 3) == 2) && (m_vt.m_primclass == GS_SPRITE_CLASS) && tex->m_32_bits_fmt);
// Both input and output are 16 bits but either texture or RT was initially 32 bits!
m_texture_shuffle = (context->FRAME.PSM & 0x2) && ((context->TEX0.PSM & 3) == 2) && (m_vt.m_primclass == GS_SPRITE_CLASS) && not_really_16_bits;
ASSERT(!m_texture_shuffle || (context->CLAMP.WMS < 3 && context->CLAMP.WMT < 3));
}