From bd6ea17bdc04117c8dd571baed00381ccee21410 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Wed, 22 Apr 2015 00:36:34 +0200 Subject: [PATCH] gsdx-ogl: speed improvement for DATE DATE is implemented in 2 ways. 1/ with stencil 2/ purely in FS (sw) I kept method 1 to reduce the work on method 2. It sucks for performance. So it would be either 1 or 2. Note: DATE has a big impact on higher upscaling Note2: you can disable the 2nd method with this configuration parameter override_GL_ARB_shader_image_load_store = 0 --- plugins/GSdx/GSRendererOGL.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 10706ffd84..097569cdc3 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -217,7 +217,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour if(DATE) { // Note at the moment OGL has always stencil. Rt can be disabled - if(dev->HasStencil()) + if(dev->HasStencil() && !advance_DATE) { GSVector4 s = GSVector4(rtscale.x / rtsize.x, rtscale.y / rtsize.y); GSVector4 o = GSVector4(-1.0f, 1.0f); @@ -342,9 +342,10 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour if(DATE) { - om_dssel.date = 1; if (advance_DATE) ps_sel.date = 1 + context->TEST.DATM; + else + om_dssel.date = 1; } if(env.COLCLAMP.CLAMP == 0 && /* hack */ !tex && PRIM->PRIM != GS_POINTLIST)