GS-hw: define some consts only in debug mode.

This commit is contained in:
iMineLink 2021-12-12 15:28:39 +01:00 committed by lightningterror
parent 80d3a8a757
commit 7d8377b133
1 changed files with 2 additions and 0 deletions

View File

@ -863,12 +863,14 @@ void GSRendererHW::SwSpriteRender()
const GSVector4i r = m_r;
#ifndef NDEBUG
const int tw = 1 << m_context->TEX0.TW;
const int th = 1 << m_context->TEX0.TH;
const float meas_tw = m_vt.m_max.t.x - m_vt.m_min.t.x;
const float meas_th = m_vt.m_max.t.y - m_vt.m_min.t.y;
ASSERT(!PRIM->TME || (abs(meas_tw - r.width()) <= SSR_UV_TOLERANCE && abs(meas_th - r.height()) <= SSR_UV_TOLERANCE)); // No input texture min/mag, if any.
ASSERT(!PRIM->TME || (abs(m_vt.m_min.t.x) <= SSR_UV_TOLERANCE && abs(m_vt.m_min.t.y) <= SSR_UV_TOLERANCE && abs(meas_tw - tw) <= SSR_UV_TOLERANCE && abs(meas_th - th) <= SSR_UV_TOLERANCE)); // No texture UV wrap, if any.
#endif
GIFRegTRXPOS trxpos = {};