Permalink
Browse files

gsdx ogl: allow to start without GL_ARB_texture_barrier

Rendering will be corrupted (for advance effects) if the driver doesn't support it.
However it allow to run with Mesa software emulation (or inside a virtual machine)

Note: mesa still requires an override of the buffer storage extension
MESA_EXTENSION_OVERRIDE=GL_ARB_buffer_storage
  • Loading branch information...
1 parent 35ed991 commit 63944e8c43471237cd2971594207ed8c381ae87f @gregory38 gregory38 committed Feb 3, 2017
Showing with 13 additions and 2 deletions.
  1. +13 −2 plugins/GSdx/GLLoader.cpp
@@ -178,6 +178,11 @@ namespace ReplaceGL {
{
glViewport(GLint(x), GLint(y), GLsizei(w), GLsizei(h));
}
+
+ void APIENTRY TextureBarrier()
+ {
+ }
+
}
namespace GLLoader {
@@ -326,7 +331,6 @@ namespace GLLoader {
}
bool status = true;
- bool mandatory_hw = static_cast<GSRendererType>(theApp.GetConfigI("Renderer")) == GSRendererType::OGL_HW;
// Bonus
status &= status_and_override(found_GL_EXT_texture_filter_anisotropic, "GL_EXT_texture_filter_anisotropic");
@@ -348,7 +352,9 @@ namespace GLLoader {
// GL4.5
status &= status_and_override(found_GL_ARB_clip_control, "GL_ARB_clip_control", true);
status &= status_and_override(found_GL_ARB_direct_state_access, "GL_ARB_direct_state_access", true);
- status &= status_and_override(found_GL_ARB_texture_barrier, "GL_ARB_texture_barrier", mandatory_hw);
+ // Mandatory for the advance HW renderer effect. Unfortunately Mesa LLVMPIPE/SWR renderers doesn't support this extension.
+ // Rendering might be corrupted but it could be good enough for test/virtual machine.
+ status &= status_and_override(found_GL_ARB_texture_barrier, "GL_ARB_texture_barrier");
status &= status_and_override(found_GL_ARB_get_texture_sub_image, "GL_ARB_get_texture_sub_image");
#ifdef _WIN32
@@ -370,6 +376,11 @@ namespace GLLoader {
glViewportIndexedf = ReplaceGL::ViewportIndexedf;
}
+ if (!found_GL_ARB_texture_barrier) {
+ fprintf(stderr, "GL_ARB_texture_barrier: not supported ! Rendering will be corrupted\n");
+ glTextureBarrier = ReplaceGL::TextureBarrier;
+ }
+
fprintf(stdout, "\n");
return status;

0 comments on commit 63944e8

Please sign in to comment.