gsdx-ogl: GL_ARB_texture_barrier is now mandatory

(GL4.5 extension)
This commit is contained in:
Gregory Hainaut 2016-04-07 21:51:37 +02:00
parent 1208dbe8c7
commit dfb4b5a339
4 changed files with 4 additions and 21 deletions

View File

@ -497,7 +497,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");
status &= status_and_override(found_GL_ARB_texture_barrier, "GL_ARB_texture_barrier", true);
if (!found_GL_ARB_direct_state_access) {
Emulate_DSA::Init();
@ -507,12 +507,6 @@ namespace GLLoader {
status = false;
}
if (!found_GL_ARB_texture_barrier) {
fprintf(stderr, "Error GL_ARB_texture_barrier is not supported by your driver. You can't emulate correctly the GS blending unit! Sorry!\n");
theApp.SetConfig("accurate_blending_unit", 0);
theApp.SetConfig("accurate_date", 0);
}
#ifdef _WIN32
if (status) {
if (intel_buggy_driver) {

View File

@ -365,6 +365,5 @@ namespace GLLoader {
extern bool found_GL_ARB_buffer_storage;
extern bool found_GL_ARB_clip_control;
extern bool found_GL_ARB_direct_state_access;
extern bool found_GL_ARB_texture_barrier;
extern bool found_GL_EXT_texture_filter_anisotropic;
}

View File

@ -55,14 +55,6 @@ bool GSRendererOGL::CreateDevice(GSDevice* dev)
if (!GSRenderer::CreateDevice(dev))
return false;
// No sw blending if not supported (Intel GPU)
if (!GLLoader::found_GL_ARB_texture_barrier) {
fprintf(stderr, "Error GL_ARB_texture_barrier is not supported by your driver. You can't emulate correctly the GS blending unit! Sorry!\n");
m_accurate_date = false;
m_sw_blending = 0;
}
return true;
}
@ -592,13 +584,11 @@ void GSRendererOGL::SendDraw(bool require_barrier)
if (!require_barrier && m_unsafe_fbmask) {
// Not safe but still worth to take some precautions.
ASSERT(GLLoader::found_GL_ARB_texture_barrier);
glTextureBarrier();
dev->DrawIndexedPrimitive();
} else if (!require_barrier) {
dev->DrawIndexedPrimitive();
} else if (m_prim_overlap == PRIM_OVERLAP_NO) {
ASSERT(GLLoader::found_GL_ARB_texture_barrier);
glTextureBarrier();
dev->DrawIndexedPrimitive();
} else if (m_vt.m_primclass == GS_SPRITE_CLASS) {
@ -682,7 +672,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
GSDeviceOGL* dev = (GSDeviceOGL*)m_dev;
dev->s_n = s_n;
if ((DATE || m_sw_blending) && GLLoader::found_GL_ARB_texture_barrier && (m_vt.m_primclass == GS_SPRITE_CLASS)) {
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 {
@ -698,7 +688,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
// DATE: selection of the algorithm. Must be done before blending because GL42 is not compatible with blending
if (DATE && GLLoader::found_GL_ARB_texture_barrier) {
if (DATE) {
if (m_prim_overlap == PRIM_OVERLAP_NO || m_texture_shuffle) {
// It is way too complex to emulate texture shuffle with DATE. So just use
// the slow but accurate algo

View File

@ -169,7 +169,7 @@ void GSWndGL::PopulateGlFunction()
GL_EXT_LOAD_OPT(glCreateProgramPipelines);
GL_EXT_LOAD_OPT(glClipControl);
GL_EXT_LOAD_OPT(glTextureBarrier);
GL_EXT_LOAD(glTextureBarrier);
if (glCreateFramebuffers == NULL) {
Emulate_DSA::Init();