gs-hw-tc: add some assertions on source scale.

This commit is contained in:
iMineLink 2022-05-22 12:15:23 +02:00 committed by lightningterror
parent 110b7df4d5
commit c45cc6928d
1 changed files with 6 additions and 0 deletions

View File

@ -185,6 +185,9 @@ GSTextureCache::Source* GSTextureCache::LookupDepthSource(const GIFRegTEX0& TEX0
throw GSRecoverableError();
}
ASSERT(src->m_texture);
ASSERT(src->m_texture->GetScale() == (dst ? dst->m_texture->GetScale() : GSVector2(1, 1)));
return src;
}
@ -1532,6 +1535,9 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
}
ASSERT(src->m_texture);
ASSERT(src->m_target == (dst != nullptr));
ASSERT(src->m_from_target == (dst ? &dst->m_texture : nullptr));
ASSERT(src->m_texture->GetScale() == ((!dst || TEX0.PSM == PSM_PSMT8) ? GSVector2(1, 1) : dst->m_texture->GetScale()));
m_src.Add(src, TEX0, g_gs_renderer->m_context->offset.tex);