gsdx: invalid alpha after an EE write

Typical wrong draw:
1/ draw in 32 bits
2/ draw in 24 bits
3/ Use alpha as a texure. (Must reuse the GPU data)
4/ Write alpha from EE
5/ Use alpha as a texure. (Must upload new data)

This commit fixes the step 5.

Fix #917 (Conflict - Desert Storm)
This commit is contained in:
Gregory Hainaut 2015-10-24 16:19:21 +02:00
parent 286769dc03
commit 295f867118
1 changed files with 6 additions and 0 deletions

View File

@ -629,6 +629,12 @@ void GSTextureCache::InvalidateVideoMem(GSOffset* off, const GSVector4i& rect, b
delete t;
continue;
}
} else if (GSUtil::HasSharedBits(bp, t->m_TEX0.TBP0)) {
// EE writes the ALPHA channel. Mark it as invalid for
// the texture cache. Otherwise it will generate a wrong
// hit on the texture cache.
// Game: Conflict - Desert Storm (flickering)
t->m_dirty_alpha = false;
}
// GH: Try to detect texture write that will overlap with a target buffer