From 4d0c7fef1468b094efc6bdba779b0791cd4abc7d Mon Sep 17 00:00:00 2001 From: Milan Sreckovic Date: Mon, 9 Feb 2015 17:53:38 +0800 Subject: [PATCH] Bug 1111689 - Part 1: Let EXT_shader_texture_lod play when ARB_shader_texture_lod can play. r=jgilbert --- dom/canvas/WebGLContextExtensions.cpp | 2 +- gfx/gl/GLContext.cpp | 1 + gfx/gl/GLContext.h | 2 ++ gfx/gl/GLContextFeatures.cpp | 11 +++++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dom/canvas/WebGLContextExtensions.cpp b/dom/canvas/WebGLContextExtensions.cpp index c620e6beefe..257e5f01b59 100644 --- a/dom/canvas/WebGLContextExtensions.cpp +++ b/dom/canvas/WebGLContextExtensions.cpp @@ -116,7 +116,7 @@ WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const case WebGLExtensionID::EXT_frag_depth: return WebGLExtensionFragDepth::IsSupported(this); case WebGLExtensionID::EXT_shader_texture_lod: - return gl->IsExtensionSupported(gl::GLContext::EXT_shader_texture_lod); + return gl->IsSupported(gl::GLFeature::shader_texture_lod); case WebGLExtensionID::EXT_sRGB: return WebGLExtensionSRGB::IsSupported(this); case WebGLExtensionID::EXT_texture_filter_anisotropic: diff --git a/gfx/gl/GLContext.cpp b/gfx/gl/GLContext.cpp index 2031b832559..ef77451e83b 100644 --- a/gfx/gl/GLContext.cpp +++ b/gfx/gl/GLContext.cpp @@ -99,6 +99,7 @@ static const char *sExtensionNames[] = { "GL_ARB_pixel_buffer_object", "GL_ARB_robustness", "GL_ARB_sampler_objects", + "GL_ARB_shader_texture_lod", "GL_ARB_sync", "GL_ARB_texture_compression", "GL_ARB_texture_float", diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h index a8636b1c6c1..994f15d34d0 100644 --- a/gfx/gl/GLContext.h +++ b/gfx/gl/GLContext.h @@ -122,6 +122,7 @@ enum class GLFeature { robustness, sRGB_framebuffer, sRGB_texture, + shader_texture_lod, sampler_objects, standard_derivatives, sync, @@ -410,6 +411,7 @@ public: ARB_pixel_buffer_object, ARB_robustness, ARB_sampler_objects, + ARB_shader_texture_lod, ARB_sync, ARB_texture_compression, ARB_texture_float, diff --git a/gfx/gl/GLContextFeatures.cpp b/gfx/gl/GLContextFeatures.cpp index 780a9950169..2820ff4fae3 100644 --- a/gfx/gl/GLContextFeatures.cpp +++ b/gfx/gl/GLContextFeatures.cpp @@ -538,6 +538,17 @@ static const FeatureInfo sFeatureInfoArr[] = { GLContext::Extensions_End } }, + { + "shader_texture_lod", + GLVersion::NONE, + GLESVersion::NONE, + GLContext::Extension_None, + { + GLContext::ARB_shader_texture_lod, + GLContext::EXT_shader_texture_lod, + GLContext::Extensions_End + } + }, { "sampler_objects", GLVersion::GL3_3,