Bug 1102667 - Fix our copy of OES_texture_float test. - r=kamidphish
authorjdashg <jdashg+github@gmail.com>
Fri, 21 Nov 2014 19:10:32 -0800
changeset 241609 d95090fbf3dc7d2830e6f022dee1dc982561e759
parent 241608 e8fb97477d9ef999141b764dd4dd8828f5d3c4d6
child 241610 6a871ae07d1fc0293f5635b921366b07bddc4e1a
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
bugs1102667
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1102667 - Fix our copy of OES_texture_float test. - r=kamidphish
dom/canvas/test/webgl-conformance/conformance/extensions/oes-texture-float.html
--- a/dom/canvas/test/webgl-conformance/conformance/extensions/oes-texture-float.html
+++ b/dom/canvas/test/webgl-conformance/conformance/extensions/oes-texture-float.html
@@ -151,24 +151,26 @@ function runRenderTargetTest(testProgram
     gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.FLOAT, null);
     glErrorShouldBe(gl, gl.NO_ERROR, "floating-point texture allocation should succeed if OES_texture_float is enabled");
 
     // Use this texture as a render target.
     var fbo = gl.createFramebuffer();
     gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
     gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
     gl.bindTexture(gl.TEXTURE_2D, null);
+
+    // Enabling OES_texture_float will either implicitly enable the entirety of
+    // WEBGL_color_buffer_float, or it will not enable any of it. If it is not
+    // enabled, we'll get an FB_INCOMPLETE_ATTACHMENT here.
+    if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+        shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT");
+        return;
+    }
+
     shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
-    // While strictly speaking it is probably legal for a WebGL implementation to support
-    // floating-point textures but not as attachments to framebuffer objects, any such
-    // implementation is so poor that it arguably should not advertise support for the
-    // OES_texture_float extension. For this reason the conformance test requires that the
-    // framebuffer is complete here.
-    if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE)
-        return;
 
     var renderProgram =
         wtu.setupProgram(gl,
                          ["positionVertexShader", "floatingPointFragmentShader"],
                          ['vPosition'],
                          [0]);
     wtu.drawQuad(gl);
     glErrorShouldBe(gl, gl.NO_ERROR, "rendering to floating-point texture should succeed");