gsdx-tc: Add some code for the future

Partially invalidate RT when there is a write in the middle of it (actually 2 pages below)

Code is not yet enabled because
1/ I want to stabilize latest update
2/ not sure of the impact of the code
3/ maybe it need a more generic version
This commit is contained in:
Gregory Hainaut 2015-07-10 22:33:30 +02:00
parent 5888913052
commit ec61ad3667
1 changed files with 21 additions and 0 deletions

View File

@ -637,6 +637,27 @@ void GSTextureCache::InvalidateVideoMem(GSOffset* off, const GSVector4i& rect, b
} }
} }
} }
// FIXME: this code "fixes" black FMV issue with rule of rose.
// Code is completely hardcoded so maybe not the best solution. Besides I don't
// know the full impact of it.
// Let's keep this code for the future
#if 0
if(GSUtil::HasSharedBits(psm, t->m_TEX0.PSM) && (t->m_TEX0.TBP0 + 0x200 == bp))
{
GL_CACHE("TC: Dirty in the middle of Target(%s) %d (0x%x)", to_string(type),
t->m_texture ? t->m_texture->GetID() : 0,
t->m_TEX0.TBP0);
uint32 rowsize = bw * 8192u;
uint32 offset = 0x200 * 256u;
int y = GSLocalMemory::m_psm[psm].pgs.y * offset / rowsize;
t->m_dirty.push_back(GSDirtyRect(GSVector4i(r.left, r.top + y, r.right, r.bottom + y), psm));
t->m_TEX0.TBW = bw;
continue;
}
#endif
} }
} }
} }