Commit 1f931caa authored by eric@webkit.org's avatar eric@webkit.org

2010-05-19 Sheriff Bot <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r59758.
        http://trac.webkit.org/changeset/59758
        https://bugs.webkit.org/show_bug.cgi?id=39361

        This patch adds a test that fails on Leopard (Requested by
        abarth on #webkit).

        * fast/canvas/webgl/texture-npot-expected.txt:
        * fast/canvas/webgl/texture-npot.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ffa75e6f
2010-05-19 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r59758.
http://trac.webkit.org/changeset/59758
https://bugs.webkit.org/show_bug.cgi?id=39361
This patch adds a test that fails on Leopard (Requested by
abarth on #webkit).
* fast/canvas/webgl/texture-npot-expected.txt:
* fast/canvas/webgl/texture-npot.html:
2010-05-19 Zhenyao Mo <zmo@google.com>
Reviewed by Darin Adler.
......@@ -3,9 +3,6 @@ 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
......
......@@ -101,23 +101,26 @@
var loc = gl.getUniformLocation(gl.program, "tex");
gl.uniform1i(loc, 0);
// FIXME: uncomment the three chechBuffer calls once we figure out why they fail on the Leopard bot.
// https://bugs.webkit.org/show_bug.cgi?id=39128
// Check that nothing is drawn if filtering is not correct for NPOT
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
checkBuffer(0,0,0,255, "NPOT texture with TEXTURE_WRAP set to REPEAT should draw with 0,0,0,255");
// checkBuffer(0,0,0,255, "NPOT texture with TEXTURE_WRAP set to REPEAT should draw with 0,0,0,255");
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_LINEAR);
checkBuffer(0,0,0,255, "NPOT texture with TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255");
// checkBuffer(0,0,0,255, "NPOT texture with TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255");
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
checkBuffer(0,192,128,255, "NPOT texture with TEXTURE_MIN_FILTER set to LINEAR should draw with 0,192,128,255");
// checkBuffer(0,192,128,255, "NPOT texture with TEXTURE_MIN_FILTER set to LINEAR should draw.");
function checkBuffer(r, g, b, a, msg) {
gl.clearColor(1,1,1,1);
......@@ -126,17 +129,12 @@
gl.flush();
var buf = gl.readPixels(0, 0, 4, 4, gl.RGBA, gl.UNSIGNED_BYTE);
for (var i = 0; i < 4 * 4; ++i) {
// We skip the (0, 0) pixel due to a possible bug on the Leopard bot.
// https://bugs.webkit.org/show_bug.cgi?id=39128.
if (i == 0)
continue;
var offset = i * 4;
if (buf[offset + 0] != r ||
buf[offset + 1] != g ||
buf[offset + 2] != b ||
buf[offset + 3] != a) {
testFailed(msg + ', read back color is ' + buf[offset + 0] + ',' + buf[offset + 1]
+ ',' + buf[offset + 2] + ',' + buf[offset + 3]);
testFailed(msg);
return;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment