From 5fa4c8d930a8085286a6e29f2a1729fc9710dd3f Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 4 Sep 2015 20:25:59 -0500 Subject: [PATCH] Support EXT_blend_func_extended in GLES. This lets us get dual source blending on GLES targets. --- Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp | 4 ++++ Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp | 2 ++ Source/Core/VideoBackends/OGL/Render.cpp | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp index 89f84cdd85..e6b74762ef 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp +++ b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp @@ -1299,6 +1299,10 @@ const GLFunc gl_function_array[] = // EXT_texture_buffer GLFUNC_SUFFIX(glTexBuffer, EXT, "GL_EXT_texture_buffer !GL_OES_texture_buffer !VERSION_GLES_3_2"), + // EXT_blend_func_extended + GLFUNC_SUFFIX(glBindFragDataLocationIndexed, EXT, "GL_EXT_blend_func_extended"), + GLFUNC_SUFFIX(glGetFragDataIndex, EXT, "GL_EXT_blend_func_extended"), + // GLES 3.2 GLFUNC_REQUIRES(glMinSampleShading, "VERSION_GLES_3_2"), GLFUNC_REQUIRES(glDebugMessageCallback, "VERSION_GLES_3_2"), diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp index 8b60fe069e..f54d69b95c 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp @@ -560,6 +560,7 @@ void ProgramShaderCache::CreateHeader() "%s\n" // AEP "%s\n" // texture buffer "%s\n" // ES texture buffer + "%s\n" // ES dual source blend // Precision defines for GLSL ES "%s\n" @@ -599,6 +600,7 @@ void ProgramShaderCache::CreateHeader() , g_ogl_config.bSupportsAEP ? "#extension GL_ANDROID_extension_pack_es31a : enable" : "" , v= 310) || GLExtensions::Supports("GL_NV_primitive_restart")); g_Config.backend_info.bSupportsEarlyZ = GLExtensions::Supports("GL_ARB_shader_image_load_store");