Bug 1325685 - Ensure the cube attachment is complete. r=jgilbert a=jcristau
authorkvark <kvark@mozilla.com>
Tue, 10 Jan 2017 09:32:00 -0500
changeset 353537 6a1390959835e2840f140c6f91740085d6fea340
parent 353536 41e715615d9cf50da5473d50b64a4a800d457cea
child 353538 55b4f54b20c6ca9cbe5fbdb5189ff2381b5486f6
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert, jcristau
bugs1325685
milestone52.0a2
Bug 1325685 - Ensure the cube attachment is complete. r=jgilbert a=jcristau
dom/canvas/WebGLFramebuffer.cpp
dom/canvas/test/webgl-conf/generated-mochitest.ini
dom/canvas/test/webgl-conf/mochitest-errata.ini
--- a/dom/canvas/WebGLFramebuffer.cpp
+++ b/dom/canvas/WebGLFramebuffer.cpp
@@ -282,16 +282,24 @@ WebGLFBAttachPoint::IsComplete(WebGLCont
         AttachmentName(&attachName);
 
         *out_info = nsPrintfCString("%s has an effective format of %s, which is not"
                                     " renderable",
                                     attachName.BeginReading(), formatUsage->format->name);
         return false;
     }
 
+    if (webgl->IsWebGL2() && Texture() &&
+        Texture()->IsCubeMap() && !Texture()->IsCubeComplete())
+    {
+        AttachmentName(out_info);
+        out_info->AppendLiteral(" is not cube complete");
+        return false;
+    }
+
     const auto format = formatUsage->format;
 
     bool hasRequiredBits;
 
     switch (mAttachmentPoint) {
     case LOCAL_GL_DEPTH_ATTACHMENT:
         hasRequiredBits = format->d;
         break;
--- a/dom/canvas/test/webgl-conf/generated-mochitest.ini
+++ b/dom/canvas/test/webgl-conf/generated-mochitest.ini
@@ -5813,18 +5813,17 @@ skip-if = (os == 'android' || os == 'lin
 skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
 [generated/test_2_conformance__textures__misc__copy-tex-image-2d-formats.html]
 skip-if = (os == 'mac') || (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
 [generated/test_2_conformance__textures__misc__copy-tex-image-and-sub-image-2d.html]
 skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
 [generated/test_2_conformance__textures__misc__copy-tex-sub-image-2d-partial-texture.html]
 skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
 [generated/test_2_conformance__textures__misc__cube-incomplete-fbo.html]
-skip-if = (os == 'win') || (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
-fail-if = (os == 'mac')
+skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
 [generated/test_2_conformance__textures__misc__default-texture.html]
 skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
 [generated/test_2_conformance__textures__misc__gl-pixelstorei.html]
 skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
 [generated/test_2_conformance__textures__misc__gl-teximage.html]
 skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
 [generated/test_2_conformance__textures__misc__mipmap-fbo.html]
 skip-if = (os == 'android' || os == 'linux' || (os == 'win' && os_version == '5.1'))
--- a/dom/canvas/test/webgl-conf/mochitest-errata.ini
+++ b/dom/canvas/test/webgl-conf/mochitest-errata.ini
@@ -142,19 +142,16 @@ skip-if = (os == 'android' && debug)
 [generated/test_conformance__extensions__oes-vertex-array-object.html]
 # 10.6 crash:
 # PROCESS-CRASH | dom/canvas/test/webgl-conf/generated/test_conformance__extensions__oes-vertex-array-object.html | application crashed [@ gleRunVertexSubmitImmediate + 0xf24]
 skip-if = (os == 'mac' && os_version == '10.6')
 [generated/test_conformance__textures__misc__texture-size.html]
 # application crashed [@ mozilla::gl::GLContext::AfterGLCall]
 skip-if = (os == 'android') || (os == 'win')
 
-[generated/test_2_conformance__textures__misc__cube-incomplete-fbo.html]
-fail-if = (os == 'mac')
-skip-if = (os == 'win')
 [generated/test_2_conformance2__rendering__draw-buffers.html]
 fail-if = (os == 'mac') || (os == 'win')
 [generated/test_2_conformance__textures__misc__tex-image-with-format-and-type.html]
 fail-if = (os == 'mac')
 [generated/test_2_conformance__attribs__gl-vertexattribpointer.html]
 fail-if = (os == 'mac') || (os == 'win')
 [generated/test_2_conformance2__vertex_arrays__vertex-array-object.html]
 fail-if = (os == 'mac') || (os == 'win')