Skip to content

Commit

Permalink
gsdx-ogl: Minor adjustments to DATE code.
Browse files Browse the repository at this point in the history
Don't set DATE true when Accurate Date is off, DATE is true anyway so
no need to set it again.

Don't call full barrier for DATE 45 at the date selection, do it
at the shader call check. It's the same, plus we avoid extra checks.
  • Loading branch information
lightningterror committed Mar 4, 2019
1 parent 46e63c1 commit e48ce1b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp
Expand Up @@ -1040,7 +1040,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
// It is way too complex to emulate texture shuffle with DATE. So just use // It is way too complex to emulate texture shuffle with DATE. So just use
// the slow but accurate algo // the slow but accurate algo
GL_PERF("DATE with %s", m_texture_shuffle ? "texture shuffle" : "no prim overlap"); GL_PERF("DATE with %s", m_texture_shuffle ? "texture shuffle" : "no prim overlap");
m_require_full_barrier = true;
DATE_GL45 = true; DATE_GL45 = true;
DATE = false; DATE = false;
} else if (m_om_csel.wa && !m_context->TEST.ATE) { } else if (m_om_csel.wa && !m_context->TEST.ATE) {
Expand All @@ -1060,7 +1059,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
// texture barrier will split the draw call into n draw call. It is very efficient for // texture barrier will split the draw call into n draw call. It is very efficient for
// few primitive draws. Otherwise it sucks. // few primitive draws. Otherwise it sucks.
GL_PERF("Slower DATE with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max); GL_PERF("Slower DATE with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max);
m_require_full_barrier = true;
DATE_GL45 = true; DATE_GL45 = true;
DATE = false; DATE = false;
} else { } else {
Expand All @@ -1070,7 +1068,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
if (GLLoader::found_GL_ARB_shader_image_load_store && GLLoader::found_GL_ARB_clear_texture) { if (GLLoader::found_GL_ARB_shader_image_load_store && GLLoader::found_GL_ARB_clear_texture) {
DATE_GL42 = true; DATE_GL42 = true;
} else { } else {
m_require_full_barrier = true;
DATE_GL45 = true; DATE_GL45 = true;
DATE = false; DATE = false;
} }
Expand All @@ -1082,7 +1079,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
case ACC_DATE_NONE: case ACC_DATE_NONE:
default: default:
GL_PERF("Inaccurate DATE with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max); GL_PERF("Inaccurate DATE with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max);
DATE = true;
break; break;
} }
} }
Expand Down Expand Up @@ -1180,6 +1176,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
m_ps_sel.iip = (m_vt.m_primclass == GS_SPRITE_CLASS) ? 1 : PRIM->IIP; m_ps_sel.iip = (m_vt.m_primclass == GS_SPRITE_CLASS) ? 1 : PRIM->IIP;


if (DATE_GL45) { if (DATE_GL45) {
m_require_full_barrier = true;

This comment has been minimized.

Copy link
@gregory38

gregory38 Mar 4, 2019

Contributor

I'm not sure it is good idea. Maybe a future optimization could do date45 without the barrier. Mixing shader selection and barrier isn't a good thing because the barrier isn't related to shader but how we use the shader.

This comment has been minimized.

Copy link
@lightningterror

lightningterror Mar 4, 2019

Author Contributor

I see, what about date one then ? Well if date45 is doable without barrier then we can remove it when that time comes, if you prefer I can dial it back to how it was.

This comment has been minimized.

Copy link
@gregory38

gregory38 Mar 5, 2019

Contributor

What do you mean by date_one ? Yeah better revert.

Honestly you should stop those optimizations commit.
Even if you did 1 million of those, fps will be exactly the same. It can only introduces regression. If you have free time, you can either work toward a 1.6 release, or you can try to really understand something (code, GS, whatever).

m_ps_sel.date = 5 + m_context->TEST.DATM; m_ps_sel.date = 5 + m_context->TEST.DATM;
} else if (DATE_one) { } else if (DATE_one) {
m_require_one_barrier = true; m_require_one_barrier = true;
Expand Down

0 comments on commit e48ce1b

Please sign in to comment.