2010-05-19 Zhenyao Mo <zmo@google.com>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 May 2010 10:59:43 +0000 (10:59 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 May 2010 10:59:43 +0000 (10:59 +0000)
        Reviewed by Darin Adler.

        fast/canvas/webgl/texture-npot.html failed on leopard bot
        https://bugs.webkit.org/show_bug.cgi?id=39128

        * fast/canvas/webgl/texture-npot-expected.txt: Skip pixel (0, 0); print out actual color when failing.
        * fast/canvas/webgl/texture-npot.html: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@59758 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/texture-npot-expected.txt
LayoutTests/fast/canvas/webgl/texture-npot.html

index bb26c12..2694846 100644 (file)
@@ -1,3 +1,13 @@
+2010-05-19  Zhenyao Mo  <zmo@google.com>
+
+        Reviewed by Darin Adler.
+
+        fast/canvas/webgl/texture-npot.html failed on leopard bot
+        https://bugs.webkit.org/show_bug.cgi?id=39128
+
+        * fast/canvas/webgl/texture-npot-expected.txt: Skip pixel (0, 0); print out actual color when failing.
+        * fast/canvas/webgl/texture-npot.html: Ditto.
+
 2010-05-19  Ben Murdoch  <benm@google.com>
 
         Reviewed by Darin Adler.
index c3cc41e..5ecf02d 100644 (file)
@@ -3,6 +3,9 @@ WebGL NPOT texture conformance test
 PASS gl.texImage2D with NPOT texture with level > 0 should return INVALID_VALUE
 PASS gl.texImage2D with NPOT texture at level 0 should succeed
 PASS gl.generateMipmap with NPOT texture should return INVALID_OPERATION
+PASS NPOT texture with TEXTURE_WRAP set to REPEAT should draw with 0,0,0,255
+PASS NPOT texture with TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255
+PASS NPOT texture with TEXTURE_MIN_FILTER set to LINEAR should draw with 0,192,128,255
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 39c4f8b..42620a3 100644 (file)
             var loc = gl.getUniformLocation(gl.program, "tex");\r
             gl.uniform1i(loc, 0);\r
 \r
-            // FIXME: uncomment the three chechBuffer calls once we figure out why they fail on the Leopard bot.\r
-            // https://bugs.webkit.org/show_bug.cgi?id=39128\r
-\r
             // Check that nothing is drawn if filtering is not correct for NPOT\r
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\r
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\r
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);\r
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);\r
 \r
-            // checkBuffer(0,0,0,255, "NPOT texture with TEXTURE_WRAP set to REPEAT should draw with 0,0,0,255");\r
+            checkBuffer(0,0,0,255, "NPOT texture with TEXTURE_WRAP set to REPEAT should draw with 0,0,0,255");\r
 \r
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_LINEAR);\r
 \r
-            // checkBuffer(0,0,0,255, "NPOT texture with TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255");\r
+            checkBuffer(0,0,0,255, "NPOT texture with TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255");\r
 \r
             gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\r
 \r
-            // checkBuffer(0,192,128,255, "NPOT texture with TEXTURE_MIN_FILTER set to LINEAR should draw.");\r
+            checkBuffer(0,192,128,255, "NPOT texture with TEXTURE_MIN_FILTER set to LINEAR should draw with 0,192,128,255");\r
 \r
             function checkBuffer(r, g, b, a, msg) {\r
               gl.clearColor(1,1,1,1);\r
               gl.flush();\r
               var buf = gl.readPixels(0, 0, 4, 4, gl.RGBA, gl.UNSIGNED_BYTE);\r
               for (var i = 0; i < 4 * 4; ++i) {\r
+                // We skip the (0, 0) pixel due to a possible bug on the Leopard bot.\r
+                // https://bugs.webkit.org/show_bug.cgi?id=39128.\r
+                if (i == 0)\r
+                    continue;\r
                 var offset = i * 4;\r
                 if (buf[offset + 0] != r ||\r
                     buf[offset + 1] != g ||\r
                     buf[offset + 2] != b ||\r
                     buf[offset + 3] != a) {\r
-                  testFailed(msg);\r
+                  testFailed(msg + ', read back color is ' + buf[offset + 0] + ',' + buf[offset + 1]\r
+                             + ',' + buf[offset + 2] + ',' +  buf[offset + 3]);\r
                   return;\r
                 }\r
               }\r