Skip to content
Permalink
Browse files

GSdx-hw: SwSpriteRender, fix drawing region

  • Loading branch information...
AlessandroVetere authored and lightningterror committed Aug 10, 2019
1 parent 1f6b44d commit dfa4680547fec877fdc9be1e7012192be4f89ca8
Showing with 6 additions and 13 deletions.
  1. +6 −13 plugins/GSdx/Renderers/HW/GSRendererHW.cpp
@@ -754,19 +754,12 @@ void GSRendererHW::SwSpriteRender()

GIFRegTRXREG trxreg;

if (texture_mapping_enabled)
{
trxreg.RRW = m_context->TEX0.TW * 4;
trxreg.RRH = m_context->TEX0.TH * 4;
// Check drawing region
ASSERT((GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(m_context->scissor.in)) == GSVector4i(0, 0, trxreg.RRW, trxreg.RRH)).alltrue());
}
else
{
GSVector4i r = GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(m_context->scissor.in));
trxreg.RRW = r.width();
trxreg.RRH = r.height();
}
GSVector4i r = m_r; // Rectangle of the draw
ASSERT(r.x == 0 && r.y == 0); // No offset
ASSERT(!texture_mapping_enabled || (r.z <= (1 << m_context->TEX0.TW)) && (r.w <= (1 << m_context->TEX0.TH))); // Input texture is big enough, if any

trxreg.RRW = r.width();
trxreg.RRH = r.height();

// SW rendering code, mainly taken from GSState::Move(), TRXPOS.DIR{X,Y} management excluded

0 comments on commit dfa4680

Please sign in to comment.
You can’t perform that action at this time.