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
This commit is contained in:
Gregory Hainaut 2017-02-03 17:33:07 +01:00
parent 35ed991abe
commit 63944e8c43
1 changed files with 13 additions and 2 deletions

View File

@ -178,6 +178,11 @@ namespace ReplaceGL {
{ {
glViewport(GLint(x), GLint(y), GLsizei(w), GLsizei(h)); glViewport(GLint(x), GLint(y), GLsizei(w), GLsizei(h));
} }
void APIENTRY TextureBarrier()
{
}
} }
namespace GLLoader { namespace GLLoader {
@ -326,7 +331,6 @@ namespace GLLoader {
} }
bool status = true; bool status = true;
bool mandatory_hw = static_cast<GSRendererType>(theApp.GetConfigI("Renderer")) == GSRendererType::OGL_HW;
// Bonus // Bonus
status &= status_and_override(found_GL_EXT_texture_filter_anisotropic, "GL_EXT_texture_filter_anisotropic"); status &= status_and_override(found_GL_EXT_texture_filter_anisotropic, "GL_EXT_texture_filter_anisotropic");
@ -348,7 +352,9 @@ namespace GLLoader {
// GL4.5 // GL4.5
status &= status_and_override(found_GL_ARB_clip_control, "GL_ARB_clip_control", true); 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_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"); status &= status_and_override(found_GL_ARB_get_texture_sub_image, "GL_ARB_get_texture_sub_image");
#ifdef _WIN32 #ifdef _WIN32
@ -370,6 +376,11 @@ namespace GLLoader {
glViewportIndexedf = ReplaceGL::ViewportIndexedf; 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"); fprintf(stdout, "\n");
return status; return status;