diff --git a/plugins/GSdx/GLLoader.cpp b/plugins/GSdx/GLLoader.cpp index e41d346f4f..49b85e299d 100644 --- a/plugins/GSdx/GLLoader.cpp +++ b/plugins/GSdx/GLLoader.cpp @@ -207,6 +207,7 @@ namespace GLLoader { bool found_GL_ARB_shader_image_load_store = false; // GLES3.1 bool found_GL_ARB_shader_subroutine = false; bool found_GL_ARB_bindless_texture = false; // GL5 GPU? + bool found_GL_ARB_texture_barrier = false; // Well maybe supported by older hardware I don't know // GL4.5 for the future (dx10/dx11 compatibility) bool found_GL_ARB_clip_control = false; @@ -342,6 +343,7 @@ namespace GLLoader { // GL4.5 if (ext.compare("GL_ARB_direct_state_access") == 0) found_GL_ARB_direct_state_access = true; if (ext.compare("GL_ARB_clip_control") == 0) found_GL_ARB_clip_control = true; + if (ext.compare("GL_ARB_texture_barrier") == 0) found_GL_ARB_texture_barrier = true; #else // ENABLE_GLES if (ext.compare("GL_EXT_shader_io_blocks") == 0) found_GL_EXT_shader_io_blocks = true; #endif @@ -372,6 +374,7 @@ namespace GLLoader { // GL4.5 status &= status_and_override(found_GL_ARB_clip_control, "GL_ARB_clip_control"); status &= status_and_override(found_GL_ARB_direct_state_access, "GL_ARB_direct_state_access"); + status &= status_and_override(found_GL_ARB_texture_barrier, "GL_ARB_texture_barrier"); #else // ENABLE_GLES status &= status_and_override(found_GL_EXT_shader_io_blocks, "GL_EXT_shader_io_blocks", true); #endif diff --git a/plugins/GSdx/GLLoader.h b/plugins/GSdx/GLLoader.h index 080279a65b..25f3295527 100644 --- a/plugins/GSdx/GLLoader.h +++ b/plugins/GSdx/GLLoader.h @@ -433,4 +433,5 @@ namespace GLLoader { extern bool found_GL_ARB_explicit_uniform_location; extern bool found_GL_ARB_clip_control; extern bool found_GL_ARB_direct_state_access; + extern bool found_GL_ARB_texture_barrier; } diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 8f949bdd52..168b6b4959 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -243,7 +243,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour om_bsel.wrgba = ~GSVector4i::load((int)context->FRAME.FBMSK).eq8(GSVector4i::xffffffff()).mask(); if (DATE) { - if (gl_TextureBarrier && !PrimitiveOverlap()) { + if (GLLoader::found_GL_ARB_texture_barrier && !PrimitiveOverlap()) { DATE_GL45 = true; DATE = false; } else if (om_bsel.wa && (!context->TEST.ATE || context->TEST.ATST == ATST_ALWAYS)) {