Bug 1105535 - Move color_buffer_[half_]float out from draft status. r=kamidphish, a=sledru
authorJeff Gilbert <jgilbert@mozilla.com>
Wed, 07 Jan 2015 16:28:05 -0800
changeset 242790 e8ed3409602e7ed165511083499dbbf7d387451e
parent 242789 5f1898b95939675ff46b1af5180909c749fe9135
child 242791 7a6a5ab9060446b8c769beda2b244d69d2a9a775
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskamidphish, sledru
bugs1105535
milestone36.0a2
Bug 1105535 - Move color_buffer_[half_]float out from draft status. r=kamidphish, a=sledru
dom/canvas/WebGLContextExtensions.cpp
dom/canvas/test/_webgl-conformance.ini
dom/canvas/test/webgl-conformance/generate-wrappers-and-manifest.py
dom/canvas/test/webgl-conformance/mochitest-errata.ini
--- a/dom/canvas/WebGLContextExtensions.cpp
+++ b/dom/canvas/WebGLContextExtensions.cpp
@@ -28,18 +28,18 @@ WebGLContext::GetExtensionString(WebGLEx
 
 #define WEBGL_EXTENSION_IDENTIFIER(x) \
         sExtensionNamesEnumeratedArray[WebGLExtensionID::x] = #x;
 
         WEBGL_EXTENSION_IDENTIFIER(ANGLE_instanced_arrays)
         WEBGL_EXTENSION_IDENTIFIER(EXT_blend_minmax)
         WEBGL_EXTENSION_IDENTIFIER(EXT_color_buffer_half_float)
         WEBGL_EXTENSION_IDENTIFIER(EXT_frag_depth)
+        WEBGL_EXTENSION_IDENTIFIER(EXT_shader_texture_lod)
         WEBGL_EXTENSION_IDENTIFIER(EXT_sRGB)
-        WEBGL_EXTENSION_IDENTIFIER(EXT_shader_texture_lod)
         WEBGL_EXTENSION_IDENTIFIER(EXT_texture_filter_anisotropic)
         WEBGL_EXTENSION_IDENTIFIER(OES_element_index_uint)
         WEBGL_EXTENSION_IDENTIFIER(OES_standard_derivatives)
         WEBGL_EXTENSION_IDENTIFIER(OES_texture_float)
         WEBGL_EXTENSION_IDENTIFIER(OES_texture_float_linear)
         WEBGL_EXTENSION_IDENTIFIER(OES_texture_half_float)
         WEBGL_EXTENSION_IDENTIFIER(OES_texture_half_float_linear)
         WEBGL_EXTENSION_IDENTIFIER(OES_vertex_array_object)
@@ -90,99 +90,107 @@ bool WebGLContext::IsExtensionSupported(
             // For warnings-as-errors.
             break;
         }
     }
 
     return IsExtensionSupported(ext);
 }
 
-bool WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
+bool
+WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
 {
     if (mDisableExtensions)
         return false;
 
+    // In alphabetical order
     switch (ext) {
-    case WebGLExtensionID::OES_vertex_array_object:
-    case WebGLExtensionID::WEBGL_lose_context:
-        // Always supported.
-        return true;
+    // ANGLE_
+    case WebGLExtensionID::ANGLE_instanced_arrays:
+        return WebGLExtensionInstancedArrays::IsSupported(this);
 
+    // EXT_
     case WebGLExtensionID::EXT_blend_minmax:
         return WebGLExtensionBlendMinMax::IsSupported(this);
+    case WebGLExtensionID::EXT_color_buffer_half_float:
+        return WebGLExtensionColorBufferHalfFloat::IsSupported(this);
+    case WebGLExtensionID::EXT_frag_depth:
+        return WebGLExtensionFragDepth::IsSupported(this);
+    case WebGLExtensionID::EXT_shader_texture_lod:
+        return gl->IsExtensionSupported(gl::GLContext::EXT_shader_texture_lod);
+    case WebGLExtensionID::EXT_sRGB:
+        return WebGLExtensionSRGB::IsSupported(this);
+    case WebGLExtensionID::EXT_texture_filter_anisotropic:
+        return gl->IsExtensionSupported(gl::GLContext::EXT_texture_filter_anisotropic);
+
+    // OES_
     case WebGLExtensionID::OES_element_index_uint:
         return gl->IsSupported(gl::GLFeature::element_index_uint);
     case WebGLExtensionID::OES_standard_derivatives:
         return gl->IsSupported(gl::GLFeature::standard_derivatives);
-
     case WebGLExtensionID::OES_texture_float:
         return gl->IsSupported(gl::GLFeature::texture_float);
     case WebGLExtensionID::OES_texture_float_linear:
         return gl->IsSupported(gl::GLFeature::texture_float_linear);
     case WebGLExtensionID::OES_texture_half_float:
         // If we have Feature::texture_half_float, we must not be on ES2
         // and need to translate HALF_FLOAT_OES -> HALF_FLOAT.  We do that
         // right before making the relevant calls.
         return gl->IsExtensionSupported(gl::GLContext::OES_texture_half_float) ||
                gl->IsSupported(gl::GLFeature::texture_half_float);
 
     case WebGLExtensionID::OES_texture_half_float_linear:
         return gl->IsSupported(gl::GLFeature::texture_half_float_linear);
-    case WebGLExtensionID::EXT_texture_filter_anisotropic:
-        return gl->IsExtensionSupported(gl::GLContext::EXT_texture_filter_anisotropic);
+    case WebGLExtensionID::OES_vertex_array_object:
+        return true;
+
+    // WEBGL_
+    case WebGLExtensionID::WEBGL_color_buffer_float:
+        return WebGLExtensionColorBufferFloat::IsSupported(this);
+    case WebGLExtensionID::WEBGL_compressed_texture_atc:
+        return gl->IsExtensionSupported(gl::GLContext::AMD_compressed_ATC_texture);
+    case WebGLExtensionID::WEBGL_compressed_texture_etc1:
+        return gl->IsExtensionSupported(gl::GLContext::OES_compressed_ETC1_RGB8_texture);
+    case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
+        return gl->IsExtensionSupported(gl::GLContext::IMG_texture_compression_pvrtc);
     case WebGLExtensionID::WEBGL_compressed_texture_s3tc:
         if (gl->IsExtensionSupported(gl::GLContext::EXT_texture_compression_s3tc))
             return true;
 
         return gl->IsExtensionSupported(gl::GLContext::EXT_texture_compression_dxt1) &&
                gl->IsExtensionSupported(gl::GLContext::ANGLE_texture_compression_dxt3) &&
                gl->IsExtensionSupported(gl::GLContext::ANGLE_texture_compression_dxt5);
-
-    case WebGLExtensionID::WEBGL_compressed_texture_atc:
-        return gl->IsExtensionSupported(gl::GLContext::AMD_compressed_ATC_texture);
-    case WebGLExtensionID::WEBGL_compressed_texture_etc1:
-        return gl->IsExtensionSupported(gl::GLContext::OES_compressed_ETC1_RGB8_texture);
-    case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
-        return gl->IsExtensionSupported(gl::GLContext::IMG_texture_compression_pvrtc);
     case WebGLExtensionID::WEBGL_depth_texture:
         // WEBGL_depth_texture supports DEPTH_STENCIL textures
         if (!gl->IsSupported(gl::GLFeature::packed_depth_stencil))
             return false;
 
         return gl->IsSupported(gl::GLFeature::depth_texture) ||
                gl->IsExtensionSupported(gl::GLContext::ANGLE_depth_texture);
-
-    case WebGLExtensionID::ANGLE_instanced_arrays:
-        return WebGLExtensionInstancedArrays::IsSupported(this);
-    case WebGLExtensionID::EXT_sRGB:
-        return WebGLExtensionSRGB::IsSupported(this);
     case WebGLExtensionID::WEBGL_draw_buffers:
         return WebGLExtensionDrawBuffers::IsSupported(this);
-    case WebGLExtensionID::EXT_frag_depth:
-        return WebGLExtensionFragDepth::IsSupported(this);
-    case WebGLExtensionID::EXT_shader_texture_lod:
-        return gl->IsExtensionSupported(gl::GLContext::EXT_shader_texture_lod);
+    case WebGLExtensionID::WEBGL_lose_context:
+        // We always support this extension.
+        return true;
 
     default:
         // For warnings-as-errors.
         break;
     }
 
     if (Preferences::GetBool("webgl.enable-draft-extensions", false) ||
         IsWebGL2())
     {
+        /* None for now.
         switch (ext) {
-        case WebGLExtensionID::EXT_color_buffer_half_float:
-            return WebGLExtensionColorBufferHalfFloat::IsSupported(this);
-        case WebGLExtensionID::WEBGL_color_buffer_float:
-            return WebGLExtensionColorBufferFloat::IsSupported(this);
         default:
             // For warnings-as-errors.
             break;
         }
+        */
     }
 
     return false;
 }
 
 static bool
 CompareWebGLExtensionName(const nsACString& name, const char* other)
 {
@@ -287,91 +295,98 @@ WebGLContext::GetExtension(JSContext* cx
 
 void
 WebGLContext::EnableExtension(WebGLExtensionID ext)
 {
     MOZ_ASSERT(IsExtensionEnabled(ext) == false);
 
     WebGLExtensionBase* obj = nullptr;
     switch (ext) {
+    // ANGLE_
+    case WebGLExtensionID::ANGLE_instanced_arrays:
+        obj = new WebGLExtensionInstancedArrays(this);
+        break;
+
+    // EXT_
+    case WebGLExtensionID::EXT_blend_minmax:
+        obj = new WebGLExtensionBlendMinMax(this);
+        break;
+    case WebGLExtensionID::EXT_color_buffer_half_float:
+        obj = new WebGLExtensionColorBufferHalfFloat(this);
+        break;
+    case WebGLExtensionID::EXT_frag_depth:
+        obj = new WebGLExtensionFragDepth(this);
+        break;
+    case WebGLExtensionID::EXT_shader_texture_lod:
+        obj = new WebGLExtensionShaderTextureLod(this);
+        break;
+    case WebGLExtensionID::EXT_sRGB:
+        obj = new WebGLExtensionSRGB(this);
+        break;
+    case WebGLExtensionID::EXT_texture_filter_anisotropic:
+        obj = new WebGLExtensionTextureFilterAnisotropic(this);
+        break;
+
+    // OES_
     case WebGLExtensionID::OES_element_index_uint:
         obj = new WebGLExtensionElementIndexUint(this);
         break;
     case WebGLExtensionID::OES_standard_derivatives:
         obj = new WebGLExtensionStandardDerivatives(this);
         break;
-    case WebGLExtensionID::EXT_texture_filter_anisotropic:
-        obj = new WebGLExtensionTextureFilterAnisotropic(this);
-        break;
-    case WebGLExtensionID::WEBGL_lose_context:
-        obj = new WebGLExtensionLoseContext(this);
-        break;
-    case WebGLExtensionID::WEBGL_compressed_texture_s3tc:
-        obj = new WebGLExtensionCompressedTextureS3TC(this);
-        break;
-    case WebGLExtensionID::WEBGL_compressed_texture_atc:
-        obj = new WebGLExtensionCompressedTextureATC(this);
-        break;
-    case WebGLExtensionID::WEBGL_compressed_texture_etc1:
-        obj = new WebGLExtensionCompressedTextureETC1(this);
-        break;
-    case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
-        obj = new WebGLExtensionCompressedTexturePVRTC(this);
-        break;
-    case WebGLExtensionID::WEBGL_debug_renderer_info:
-        obj = new WebGLExtensionDebugRendererInfo(this);
-        break;
-    case WebGLExtensionID::WEBGL_debug_shaders:
-        obj = new WebGLExtensionDebugShaders(this);
-        break;
-    case WebGLExtensionID::WEBGL_depth_texture:
-        obj = new WebGLExtensionDepthTexture(this);
-        break;
     case WebGLExtensionID::OES_texture_float:
         obj = new WebGLExtensionTextureFloat(this);
         break;
     case WebGLExtensionID::OES_texture_float_linear:
         obj = new WebGLExtensionTextureFloatLinear(this);
         break;
     case WebGLExtensionID::OES_texture_half_float:
         obj = new WebGLExtensionTextureHalfFloat(this);
         break;
     case WebGLExtensionID::OES_texture_half_float_linear:
         obj = new WebGLExtensionTextureHalfFloatLinear(this);
         break;
+    case WebGLExtensionID::OES_vertex_array_object:
+        obj = new WebGLExtensionVertexArray(this);
+        break;
+
+    // WEBGL_
     case WebGLExtensionID::WEBGL_color_buffer_float:
         obj = new WebGLExtensionColorBufferFloat(this);
         break;
-    case WebGLExtensionID::EXT_color_buffer_half_float:
-        obj = new WebGLExtensionColorBufferHalfFloat(this);
+    case WebGLExtensionID::WEBGL_compressed_texture_atc:
+        obj = new WebGLExtensionCompressedTextureATC(this);
+        break;
+    case WebGLExtensionID::WEBGL_compressed_texture_etc1:
+        obj = new WebGLExtensionCompressedTextureETC1(this);
+        break;
+    case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
+        obj = new WebGLExtensionCompressedTexturePVRTC(this);
+        break;
+    case WebGLExtensionID::WEBGL_compressed_texture_s3tc:
+        obj = new WebGLExtensionCompressedTextureS3TC(this);
+        break;
+    case WebGLExtensionID::WEBGL_debug_renderer_info:
+        obj = new WebGLExtensionDebugRendererInfo(this);
+        break;
+    case WebGLExtensionID::WEBGL_debug_shaders:
+        obj = new WebGLExtensionDebugShaders(this);
+        break;
+    case WebGLExtensionID::WEBGL_depth_texture:
+        obj = new WebGLExtensionDepthTexture(this);
         break;
     case WebGLExtensionID::WEBGL_draw_buffers:
         obj = new WebGLExtensionDrawBuffers(this);
         break;
-    case WebGLExtensionID::OES_vertex_array_object:
-        obj = new WebGLExtensionVertexArray(this);
-        break;
-    case WebGLExtensionID::ANGLE_instanced_arrays:
-        obj = new WebGLExtensionInstancedArrays(this);
-        break;
-    case WebGLExtensionID::EXT_sRGB:
-        obj = new WebGLExtensionSRGB(this);
+    case WebGLExtensionID::WEBGL_lose_context:
+        obj = new WebGLExtensionLoseContext(this);
         break;
-    case WebGLExtensionID::EXT_frag_depth:
-        obj = new WebGLExtensionFragDepth(this);
-        break;
-    case WebGLExtensionID::EXT_blend_minmax:
-        obj = new WebGLExtensionBlendMinMax(this);
-        break;
-    case WebGLExtensionID::EXT_shader_texture_lod:
-        obj = new WebGLExtensionShaderTextureLod(this);
-        break;
+
     default:
         MOZ_ASSERT(false, "should not get there.");
-        break;
     }
 
     mExtensions[ext] = obj;
 }
 
 void
 WebGLContext::GetSupportedExtensions(JSContext* cx,
                                      Nullable< nsTArray<nsString> >& retval)
--- a/dom/canvas/test/_webgl-conformance.ini
+++ b/dom/canvas/test/_webgl-conformance.ini
@@ -494,17 +494,16 @@ support-files = webgl-conformance/../web
 [webgl-conformance/_wrappers/test_conformance__buffers__buffer-bind-test.html]
 [webgl-conformance/_wrappers/test_conformance__buffers__buffer-data-array-buffer.html]
 [webgl-conformance/_wrappers/test_conformance__buffers__index-validation-copies-indices.html]
 [webgl-conformance/_wrappers/test_conformance__buffers__index-validation-crash-with-buffer-sub-data.html]
 [webgl-conformance/_wrappers/test_conformance__buffers__index-validation-verifies-too-many-indices.html]
 [webgl-conformance/_wrappers/test_conformance__buffers__index-validation-with-resized-buffer.html]
 [webgl-conformance/_wrappers/test_conformance__buffers__index-validation.html]
 [webgl-conformance/_wrappers/test_conformance__canvas__buffer-offscreen-test.html]
-skip-if = os == 'android' # Bug 1102402 - It fails intermittently and causes a lot of retried jobs
 [webgl-conformance/_wrappers/test_conformance__canvas__buffer-preserve-test.html]
 [webgl-conformance/_wrappers/test_conformance__canvas__canvas-test.html]
 [webgl-conformance/_wrappers/test_conformance__canvas__canvas-zero-size.html]
 [webgl-conformance/_wrappers/test_conformance__canvas__drawingbuffer-static-canvas-test.html]
 skip-if = os == 'mac'
 [webgl-conformance/_wrappers/test_conformance__canvas__drawingbuffer-test.html]
 [webgl-conformance/_wrappers/test_conformance__canvas__viewport-unchanged-upon-resize.html]
 [webgl-conformance/_wrappers/test_conformance__context__constants.html]
@@ -515,16 +514,17 @@ skip-if = (os == 'b2g')
 [webgl-conformance/_wrappers/test_conformance__context__context-type-test.html]
 [webgl-conformance/_wrappers/test_conformance__context__incorrect-context-object-behaviour.html]
 [webgl-conformance/_wrappers/test_conformance__context__methods.html]
 [webgl-conformance/_wrappers/test_conformance__context__premultiplyalpha-test.html]
 [webgl-conformance/_wrappers/test_conformance__context__resource-sharing-test.html]
 [webgl-conformance/_wrappers/test_conformance__extensions__oes-standard-derivatives.html]
 [webgl-conformance/_wrappers/test_conformance__extensions__ext-texture-filter-anisotropic.html]
 [webgl-conformance/_wrappers/test_conformance__extensions__oes-texture-float.html]
+fail-if = (os == 'linux')
 [webgl-conformance/_wrappers/test_conformance__extensions__oes-vertex-array-object.html]
 [webgl-conformance/_wrappers/test_conformance__extensions__webgl-debug-renderer-info.html]
 [webgl-conformance/_wrappers/test_conformance__extensions__webgl-debug-shaders.html]
 [webgl-conformance/_wrappers/test_conformance__extensions__webgl-compressed-texture-etc1.html]
 [webgl-conformance/_wrappers/test_conformance__extensions__webgl-compressed-texture-s3tc.html]
 [webgl-conformance/_wrappers/test_conformance__extensions__ext-sRGB.html]
 [webgl-conformance/_wrappers/test_conformance__extensions__ext-shader-texture-lod.html]
 [webgl-conformance/_wrappers/test_conformance__glsl__functions__glsl-function.html]
@@ -763,17 +763,17 @@ skip-if = (os == 'android') || (os == 'b
 [webgl-conformance/_wrappers/test_conformance__textures__tex-sub-image-2d.html]
 [webgl-conformance/_wrappers/test_conformance__textures__texparameter-test.html]
 [webgl-conformance/_wrappers/test_conformance__textures__texture-active-bind-2.html]
 [webgl-conformance/_wrappers/test_conformance__textures__texture-active-bind.html]
 [webgl-conformance/_wrappers/test_conformance__textures__texture-complete.html]
 [webgl-conformance/_wrappers/test_conformance__textures__texture-formats-test.html]
 [webgl-conformance/_wrappers/test_conformance__textures__texture-mips.html]
 [webgl-conformance/_wrappers/test_conformance__textures__texture-npot-video.html]
-skip-if = os == 'win' || buildapp == 'mulet' # Mulet - bug 1089453 (crashes in libLLVM-3.0.so)
+skip-if = os == 'win'
 [webgl-conformance/_wrappers/test_conformance__textures__texture-npot.html]
 [webgl-conformance/_wrappers/test_conformance__textures__texture-size.html]
 skip-if = os == 'android'
 [webgl-conformance/_wrappers/test_conformance__textures__texture-size-cube-maps.html]
 skip-if = os == 'android'
 [webgl-conformance/_wrappers/test_conformance__textures__texture-transparent-pixels-initialized.html]
 [webgl-conformance/_wrappers/test_conformance__typedarrays__array-buffer-crash.html]
 [webgl-conformance/_wrappers/test_conformance__typedarrays__array-buffer-view-crash.html]
--- a/dom/canvas/test/webgl-conformance/generate-wrappers-and-manifest.py
+++ b/dom/canvas/test/webgl-conformance/generate-wrappers-and-manifest.py
@@ -26,16 +26,17 @@ EXTRA_SUPPORT_FILES = [
     'always-fail.html',
     'iframe-autoresize.js',
     'mochi-single.html',
     '../webgl-mochitest/driver-info.js',
 ]
 
 ACCEPTABLE_ERRATA_KEYS = set([
   'skip-if',
+  'fail-if',
 ])
 
 GENERATED_HEADER = '''
 # This is a GENERATED FILE. Do not edit it directly.
 # Regenerated it by using `python generate-wrapper-and-manifest.py`.
 # Mark skipped tests in mochitest-errata.ini.
 # Mark failing tests in mochi-single.html.
 '''.strip()
--- a/dom/canvas/test/webgl-conformance/mochitest-errata.ini
+++ b/dom/canvas/test/webgl-conformance/mochitest-errata.ini
@@ -73,16 +73,22 @@ skip-if = os == 'android'
 [_wrappers/test_conformance__context__context-attributes-alpha-depth-stencil-antialias.html]
 # Asserts on 'B2G ICS Emulator Debug'.
 skip-if = (os == 'b2g')
 [_wrappers/test_conformance__textures__tex-image-and-uniform-binding-bugs.html]
 # Intermittently asserts on 'B2G ICS Emulator Debug'.
 skip-if = (os == 'b2g')
 
 ########################################################################
+# Linux
+[_wrappers/test_conformance__extensions__oes-texture-float.html]
+# Failures after enabling color_buffer_[half_]float.
+fail-if = (os == 'linux')
+
+########################################################################
 # Mac
 [_wrappers/test_conformance__canvas__drawingbuffer-static-canvas-test.html]
 # Intermittent crash on OSX.
 skip-if = os == 'mac'
 
 ########################################################################
 # Win
 [_wrappers/test_conformance__textures__texture-npot-video.html]