summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2014-12-07 05:29:36 +0000
committerRyan Houdek <Sonicadvance1@gmail.com>2014-12-07 11:14:35 +0000
commitce7c52eca0bb54fc6b1085c329a6fd42faac3aee (patch)
treef7265898412108c08a489e9b558698505dbd5937 /Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
parent40f23331459d4d68472b5b13540dd12795da0048 (diff)
Enables stereo rendering with OpenGL ES 3.1 + AEP.
If the host device supports GLES 3.1 and AEP we can have stereo rendering. Just need to make sure to grab the correct function pointer that GL_EXT_geometry_shader provides, and enable AEP in the shaders. We can't just check if AEP is in the extension list for support because Qualcomm has failed once more. With the Nexus 6 it reports support for AEP but doesn't support OpenGL ES 3.1, which is an impossible combination. From reports on their forum it seems that attempting to use any AEP things results in nothing happening, seems like a stub implementation.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp3
1 files changed, 3 insertions, 0 deletions
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;" : ""