diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp index b5e45a16c0..bd11c6f67e 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp +++ b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp @@ -1576,6 +1576,9 @@ const GLFunc gl_function_array[] = // ARB_buffer_storage GLFUNC_REQUIRES(glBufferStorage, "GL_ARB_buffer_storage"), GLFUNC_REQUIRES(glNamedBufferStorageEXT, "GL_ARB_buffer_storage GL_EXT_direct_state_access"), + + // EXT_geometry_shader + GLFUNC_SUFFIX(glFramebufferTexture, EXT, "GL_EXT_geometry_shader !VERSION_3_2"), }; namespace GLExtensions diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp index 0249ce3c95..cb0ba569ba 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp @@ -505,6 +505,7 @@ void ProgramShaderCache::Shutdown() void ProgramShaderCache::CreateHeader() { GLSL_VERSION v = g_ogl_config.eSupportedGLSLVersion; + snprintf(s_glsl_header, sizeof(s_glsl_header), "%s\n" "%s\n" // ubo @@ -515,6 +516,7 @@ void ProgramShaderCache::CreateHeader() "%s\n" // Sampler binding "%s\n" // storage buffer "%s\n" // shader5 + "%s\n" // AEP // Precision defines for GLSL ES "%s\n" @@ -549,6 +551,7 @@ void ProgramShaderCache::CreateHeader() , g_ActiveConfig.backend_info.bSupportsBindingLayout ? "#define SAMPLER_BINDING(x) layout(binding = x)" : "#define SAMPLER_BINDING(x)" , g_ActiveConfig.backend_info.bSupportsBBox ? "#extension GL_ARB_shader_storage_buffer_object : enable" : "" , g_ActiveConfig.backend_info.bSupportsGSInstancing ? "#extension GL_ARB_gpu_shader5 : enable" : "" + , g_ogl_config.bSupportsAEP ? "#extension GL_ANDROID_extension_pack_es31a : enable" : "" , v>=GLSLES_300 ? "precision highp float;" : "" , v>=GLSLES_300 ? "precision highp int;" : "" diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index f33c59899c..dc8cfa8075 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -497,15 +497,17 @@ Renderer::Renderer() if (strstr(g_ogl_config.glsl_version, "3.0")) { g_ogl_config.eSupportedGLSLVersion = GLSLES_300; + g_ogl_config.bSupportsAEP = false; + g_Config.backend_info.bSupportsStereoscopy = false; } else { g_ogl_config.eSupportedGLSLVersion = GLSLES_310; + g_ogl_config.bSupportsAEP = GLExtensions::Supports("GL_ANDROID_extension_pack_es31a"); g_Config.backend_info.bSupportsBindingLayout = true; g_Config.backend_info.bSupportsEarlyZ = true; + g_Config.backend_info.bSupportsStereoscopy = g_ogl_config.bSupportsAEP; } - // TODO: OpenGL ES 3.1 provides the necessary features as extensions. - g_Config.backend_info.bSupportsStereoscopy = false; } else { @@ -532,6 +534,9 @@ Renderer::Renderer() { g_ogl_config.eSupportedGLSLVersion = GLSL_150; } + + // Desktop OpenGL can't have the Android Extension Pack + g_ogl_config.bSupportsAEP = false; } if (GLExtensions::Supports("GL_KHR_debug")) diff --git a/Source/Core/VideoBackends/OGL/Render.h b/Source/Core/VideoBackends/OGL/Render.h index f35487a373..98bd424257 100644 --- a/Source/Core/VideoBackends/OGL/Render.h +++ b/Source/Core/VideoBackends/OGL/Render.h @@ -30,6 +30,7 @@ struct VideoConfig GLSL_VERSION eSupportedGLSLVersion; bool bSupportOGL31; bool bSupportViewportFloat; + bool bSupportsAEP; const char* gl_vendor; const char* gl_renderer;