gsdx-ogl: add an error message when a RT is reused with a format cast

For example a 32 bits RT could be used as a 16 bits RT.

It is likely the source of various bug in HW renderer
This commit is contained in:
Gregory Hainaut 2015-05-26 11:16:49 +02:00
parent 6326f72ed4
commit 93c0d5a268
1 changed files with 7 additions and 0 deletions

View File

@ -185,6 +185,13 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
dst = t;
#ifdef ENABLE_OGL_DEBUG
// Likely the root cause of tons and tons of bug
if (dst->m_TEX0.PSM != TEX0.PSM) {
GL_INS("TC: ERROR: use a target with format 0x%x as 0x%x without any conversion", dst->m_TEX0.PSM, TEX0.PSM);
}
#endif
dst->m_TEX0 = TEX0;
break;