From 656fe78656a99b92cfbd144a148e93e95f5dab04 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 7 Mar 2015 16:09:17 -0800 Subject: [PATCH] Check for ARM_shader_framebuffer_fetch. Also, let's combine them too. Unfortunately, the shader needs a require that matches the one they have, so we need the individual flags also. --- gfx_es2/gl_state.cpp | 2 ++ gfx_es2/gpu_features.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/gfx_es2/gl_state.cpp b/gfx_es2/gl_state.cpp index cdbd357cef..9379aa9b6c 100644 --- a/gfx_es2/gl_state.cpp +++ b/gfx_es2/gl_state.cpp @@ -266,6 +266,8 @@ void CheckGLExtensions() { gl_extensions.EXT_unpack_subimage = strstr(extString, "GL_EXT_unpack_subimage") != 0; gl_extensions.EXT_shader_framebuffer_fetch = strstr(extString, "GL_EXT_shader_framebuffer_fetch") != 0; gl_extensions.NV_shader_framebuffer_fetch = strstr(extString, "GL_NV_shader_framebuffer_fetch") != 0; + gl_extensions.ARM_shader_framebuffer_fetch = strstr(extString, "GL_ARM_shader_framebuffer_fetch") != 0; + gl_extensions.ANY_shader_framebuffer_fetch = gl_extensions.EXT_shader_framebuffer_fetch || gl_extensions.NV_shader_framebuffer_fetch || gl_extensions.ARM_shader_framebuffer_fetch; gl_extensions.NV_copy_image = strstr(extString, "GL_NV_copy_image") != 0; #if defined(ANDROID) || defined(BLACKBERRY) diff --git a/gfx_es2/gpu_features.h b/gfx_es2/gpu_features.h index 37faea8fde..79309b8b19 100644 --- a/gfx_es2/gpu_features.h +++ b/gfx_es2/gpu_features.h @@ -67,10 +67,16 @@ struct GLExtensions { bool NV_framebuffer_blit; bool PBO_NV; // GL_NV_pixel_buffer_object + // ARM + bool ARM_shader_framebuffer_fetch; + // EGL bool EGL_NV_system_time; bool EGL_NV_coverage_sample; + // Convenience (in case we need to know which, but can treat them mostly the same.) + bool ANY_shader_framebuffer_fetch; + // Bugs int bugs;