summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/Render.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2015-08-26 00:09:32 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2015-08-26 17:57:51 -0500
commit447b1b09e3e141003d0170cb5c51e3e32f1ddb00 (patch)
tree90bf656b537d0c0c7919dcfe930f28f2aa902366 /Source/Core/VideoBackends/OGL/Render.cpp
parent6015e2d812db80557810aaa39ce473bb1af21056 (diff)
Support OpenGL ES 3.2.
OpenGL ES 3.2 adds a few things we care about supporting in core. In particular: - GL_{ARB,EXT,OES}_draw_elements_base_vertex - KHR_Debug - Sample Shading - GL_{ARB,EXT,OES,NV}_copy_image - Geometry shaders - Geometry shader instancing (If they support GL_{EXT,OES}_geometry_point_size) Nvidia was the first to release an OpenGL ES 3.2 driver which I uesd to test this on. This also enables GS Instancing on GLES 3.1 hardware if it supports all of the required extensions.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/Render.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/Render.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index e0d48b52e2..7245290f92 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -150,7 +150,7 @@ static void ApplySSAASettings()
{
glEnable(GL_SAMPLE_SHADING_ARB);
GLfloat min_sample_shading_value = static_cast<GLfloat>(s_MSAASamples);
- glMinSampleShadingARB(min_sample_shading_value);
+ glMinSampleShading(min_sample_shading_value);
}
else
{
@@ -491,25 +491,42 @@ Renderer::Renderer()
g_ogl_config.bSupportSampleShading = GLExtensions::Supports("GL_ARB_sample_shading");
g_ogl_config.bSupportOGL31 = GLExtensions::Version() >= 310;
g_ogl_config.bSupportViewportFloat = GLExtensions::Supports("GL_ARB_viewport_array");
- g_ogl_config.bSupportsDebug = GLExtensions::Supports("GL_KHR_debug") || GLExtensions::Supports("GL_ARB_debug_output");
+ g_ogl_config.bSupportsDebug = GLExtensions::Supports("GL_KHR_debug") ||
+ GLExtensions::Supports("GL_ARB_debug_output");
if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGLES3)
{
+ g_ogl_config.SupportedESPointSize = GLExtensions::Supports("GL_OES_geometry_point_size") ? 1 : GLExtensions::Supports("GL_EXT_geometry_point_size") ? 2 : 0;
+
if (strstr(g_ogl_config.glsl_version, "3.0") || DriverDetails::HasBug(DriverDetails::BUG_BROKENGLES31))
{
g_ogl_config.eSupportedGLSLVersion = GLSLES_300;
g_ogl_config.bSupportsAEP = false;
g_Config.backend_info.bSupportsGeometryShaders = false;
}
- else
+ else if (strstr(g_ogl_config.glsl_version, "3.1"))
{
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.bSupportsGeometryShaders = g_ogl_config.bSupportsAEP;
+ g_Config.backend_info.bSupportsGSInstancing = g_Config.backend_info.bSupportsGeometryShaders && g_ogl_config.SupportedESPointSize > 0;
//g_Config.backend_info.bSupportsPaletteConversion = GLExtensions::Supports("GL_EXT_texture_buffer");
}
+ else
+ {
+ g_ogl_config.eSupportedGLSLVersion = GLSLES_320;
+ 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.bSupportsGeometryShaders = true;
+ g_Config.backend_info.bSupportsGSInstancing = g_ogl_config.SupportedESPointSize > 0;
+ g_ogl_config.bSupportsCopySubImage = true;
+ g_ogl_config.bSupportsGLBaseVertex = true;
+ g_ogl_config.bSupportSampleShading = true;
+ g_ogl_config.bSupportsDebug = true;
+ }
}
else
{