GS-tc: Fix condition is always true warning.

Codacy.
This commit is contained in:
lightningterror 2022-07-15 02:40:22 +02:00
parent 498eb9330b
commit 9f8f2f6730
1 changed files with 4 additions and 4 deletions

View File

@ -965,12 +965,12 @@ void GSTextureCache::InvalidateVideoMem(const GSOffset& off, const GSVector4i& r
// (128 pixels) target
if (bw > 2 && t->m_TEX0.TBW == bw && t->Inside(bp, bw, psm, rect) && GSUtil::HasCompatibleBits(psm, t->m_TEX0.PSM))
{
u32 rowsize = bw * 8192u;
u32 offset = (u32)((bp - t->m_TEX0.TBP0) * 256);
const u32 rowsize = bw * 8192u;
const u32 offset = (u32)((bp - t->m_TEX0.TBP0) * 256);
if (rowsize > 0 && offset % rowsize == 0)
if (offset % rowsize == 0)
{
int y = GSLocalMemory::m_psm[psm].pgs.y * offset / rowsize;
const int y = GSLocalMemory::m_psm[psm].pgs.y * offset / rowsize;
GL_CACHE("TC: Dirty in the middle of Target(%s) %d (0x%x->0x%x) pos(%d,%d => %d,%d) bw:%u", to_string(type),
t->m_texture ? t->m_texture->GetID() : 0,