From 4effc70792d387189b7e7cb4c2cce12ead75b6de Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Mon, 9 May 2016 09:43:24 +0200 Subject: [PATCH] gsdx hw: Fix regression on align sprite The hack also updates position of not texture mapped sprite. Unlike the 2nd hack (round sprite) which can be skipped if TME is disabled --- plugins/GSdx/GSRendererHW.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index 4164e9a774..950c78b465 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -583,7 +583,9 @@ void GSRendererHW::Draw() context->ZBUF.ZMSK = zm != 0; // A couple of hack to avoid upscaling issue. So far it seems to impacts mostly sprite - if ((m_upscale_multiplier > 1) && draw_sprite_tex) { + // Note: first hack corrects both position and texture coordinate + // Note: second hack corrects only the texture coordinate + if ((m_upscale_multiplier > 1) && (m_vt.m_primclass == GS_SPRITE_CLASS)) { size_t count = m_vertex.next; GSVertex* v = &m_vertex.buff[0]; @@ -608,7 +610,8 @@ void GSRendererHW::Draw() } } - if (PRIM->FST) { + // Noting to do if no texture is sampled + if (PRIM->FST && draw_sprite_tex) { if ((m_userhacks_round_sprite_offset > 1) || (m_userhacks_round_sprite_offset == 1 && !m_vt.IsLinear())) { if (m_vt.IsLinear()) RoundSpriteOffset();