From 82060320efd5d9b8e2fa66727ab34e069de54b8b Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 15 May 2016 15:00:52 +0200 Subject: [PATCH] gsdx ogl: use draw list size for sprite instead of vertex number to select date algo Latest overlap detection allow to draw multiple sprite instead of 1, so the limit based on vertex number is too conservative. --- plugins/GSdx/GSRendererOGL.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 1e26df6e03..fa5f0ae643 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -800,12 +800,8 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour } } - if ((DATE || m_sw_blending) && (m_vt.m_primclass == GS_SPRITE_CLASS)) { - // Except 2D games, sprites are often use for special post-processing effect - m_prim_overlap = PrimitiveOverlap(); - } else { - m_prim_overlap = PRIM_OVERLAP_UNKNOW; - } + // Always check if primitive overlap. The function will return PRIM_OVERLAP_UNKNOW for non sprite primitive + m_prim_overlap = PrimitiveOverlap(); #ifdef ENABLE_OGL_DEBUG if (m_sw_blending && (m_prim_overlap != PRIM_OVERLAP_NO) && (m_context->FRAME.Block() == m_context->TEX0.TBP0) && (m_vertex.next > 2)) { GL_INS("ERROR: Source and Target are the same!"); @@ -827,7 +823,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour && (!m_context->TEST.ATE || m_context->TEST.ATST == ATST_ALWAYS)) { // texture barrier will split the draw call into n draw call. It is very efficient for // few primitive draws. Otherwise it sucks. - if (m_index.tail < 100) { + if ((m_vt.m_primclass == GS_SPRITE_CLASS && m_drawlist.size() < 50) || (m_index.tail < 100)) { require_barrier = true; DATE_GL45 = true; DATE = false;