From 20e882360f9726dd25ab863e3bc51833fa63d7ba Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Thu, 11 Feb 2016 17:57:25 -0800 Subject: [PATCH] Bug 1247804 - Enable seamless cubemaps where available. - r=jrmuizel --- dom/canvas/WebGLContextValidate.cpp | 4 ++++ gfx/gl/GLContext.cpp | 1 + gfx/gl/GLContext.h | 2 ++ gfx/gl/GLContextFeatures.cpp | 9 +++++++++ 4 files changed, 16 insertions(+) diff --git a/dom/canvas/WebGLContextValidate.cpp b/dom/canvas/WebGLContextValidate.cpp index 6c3b4ec41f22..6b7c4986f054 100644 --- a/dom/canvas/WebGLContextValidate.cpp +++ b/dom/canvas/WebGLContextValidate.cpp @@ -911,6 +911,10 @@ WebGLContext::InitAndValidateGL() } #endif + if (gl->IsSupported(gl::GLFeature::seamless_cube_map_opt_in)) { + gl->fEnable(LOCAL_GL_TEXTURE_CUBE_MAP_SEAMLESS); + } + // Check the shader validator pref mBypassShaderValidation = gfxPrefs::WebGLBypassShaderValidator(); diff --git a/gfx/gl/GLContext.cpp b/gfx/gl/GLContext.cpp index 2fc629466b60..0a904bfb6c9e 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_seamless_cube_map", "GL_ARB_sync", "GL_ARB_texture_compression", "GL_ARB_texture_float", diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h index f2ffc7b27e52..0d23261b552c 100644 --- a/gfx/gl/GLContext.h +++ b/gfx/gl/GLContext.h @@ -126,6 +126,7 @@ enum class GLFeature { sRGB_framebuffer, sRGB_texture, sampler_objects, + seamless_cube_map_opt_in, split_framebuffer, standard_derivatives, sync, @@ -420,6 +421,7 @@ public: ARB_pixel_buffer_object, ARB_robustness, ARB_sampler_objects, + ARB_seamless_cube_map, ARB_sync, ARB_texture_compression, ARB_texture_float, diff --git a/gfx/gl/GLContextFeatures.cpp b/gfx/gl/GLContextFeatures.cpp index 39a5714e4485..0bc9cb63621e 100644 --- a/gfx/gl/GLContextFeatures.cpp +++ b/gfx/gl/GLContextFeatures.cpp @@ -547,6 +547,15 @@ static const FeatureInfo sFeatureInfoArr[] = { GLContext::Extensions_End } }, + { + "seamless_cube_map_opt_in", + GLVersion::GL3_2, + GLESVersion::NONE, + GLContext::ARB_seamless_cube_map, + { + GLContext::Extensions_End + } + }, { // Do we have separate DRAW and READ framebuffer bind points? "split_framebuffer",