Skip to content
Permalink
Browse files

gsdx-ogl: Minor adjustments to DATE code.

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 e48ce1bc696d1935d3f066babe2a3d1471067442
Showing with 1 addition and 4 deletions.
  1. +1 −4 plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp
@@ -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
// the slow but accurate algo
GL_PERF("DATE with %s", m_texture_shuffle ? "texture shuffle" : "no prim overlap");
m_require_full_barrier = true;
DATE_GL45 = true;
DATE = false;
} else if (m_om_csel.wa && !m_context->TEST.ATE) {
@@ -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
// few primitive draws. Otherwise it sucks.
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 = false;
} else {
@@ -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) {
DATE_GL42 = true;
} else {
m_require_full_barrier = true;
DATE_GL45 = true;
DATE = false;
}
@@ -1082,7 +1079,6 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
case ACC_DATE_NONE:
default:
GL_PERF("Inaccurate DATE with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max);
DATE = true;
break;
}
}
@@ -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;

if (DATE_GL45) {
m_require_full_barrier = true;

This comment has been minimized.

@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.

@lightningterror

lightningterror Mar 4, 2019

Author Member

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.

@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;
} else if (DATE_one) {
m_require_one_barrier = true;

0 comments on commit e48ce1b

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.