Title: [156373] trunk/LayoutTests
Revision
156373
Author
[email protected]
Date
2013-09-24 16:47:57 -0700 (Tue, 24 Sep 2013)

Log Message

webgl/conformance/extensions/oes-element-index-uint.html failing after r156351 or 156352
https://bugs.webkit.org/show_bug.cgi?id=121863
<rdar://problem/15069481>

Reviewed by Beth Dakin.

This test was not querying the vertex attribute locations
before binding data to them. When we enabled symbol mangling
we started seeing attributes appear in a different order
than the order defined in the shader source. Update this test
to ask getAttribLocation first.

Note that there are two important issues.

Firstly, this is updating our local copy of the Khronos test.
I've opened pull request #377 to get it addressed in the source.
https://github.com/KhronosGroup/WebGL/pull/377

Secondly, this indicates that we might have a lot of problems
with existing content that does not expect the order of
attributes to change.

* webgl/resources/webgl_test_files/conformance/extensions/oes-element-index-uint.html:
* TestExpectations: Unskip test.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (156372 => 156373)


--- trunk/LayoutTests/ChangeLog	2013-09-24 23:39:51 UTC (rev 156372)
+++ trunk/LayoutTests/ChangeLog	2013-09-24 23:47:57 UTC (rev 156373)
@@ -63,6 +63,33 @@
         https://bugs.webkit.org/show_bug.cgi?id=121863
         <rdar://problem/15069481>
 
+        Reviewed by Beth Dakin.
+
+        This test was not querying the vertex attribute locations
+        before binding data to them. When we enabled symbol mangling
+        we started seeing attributes appear in a different order
+        than the order defined in the shader source. Update this test
+        to ask getAttribLocation first.
+
+        Note that there are two important issues.
+
+        Firstly, this is updating our local copy of the Khronos test.
+        I've opened pull request #377 to get it addressed in the source.
+        https://github.com/KhronosGroup/WebGL/pull/377
+
+        Secondly, this indicates that we might have a lot of problems
+        with existing content that does not expect the order of
+        attributes to change.
+
+        * webgl/resources/webgl_test_files/conformance/extensions/oes-element-index-uint.html:
+        * TestExpectations: Unskip test.
+
+2013-09-24  Dean Jackson  <[email protected]>
+
+        webgl/conformance/extensions/oes-element-index-uint.html failing after r156351 or 156352
+        https://bugs.webkit.org/show_bug.cgi?id=121863
+        <rdar://problem/15069481>
+
         Temporarily skipped while investigating.
 
         * TestExpectations:

Modified: trunk/LayoutTests/TestExpectations (156372 => 156373)


--- trunk/LayoutTests/TestExpectations	2013-09-24 23:39:51 UTC (rev 156372)
+++ trunk/LayoutTests/TestExpectations	2013-09-24 23:47:57 UTC (rev 156373)
@@ -50,6 +50,3 @@
 
 # The test frequently times out, and is just unsuccessful at detecting incorrect behavior when it passes.
 webkit.org/b/72698 media/audio-garbage-collect.html [ Skip ]
-
-# Temporarily skipping this test
-webkit.org/b/121863 webgl/conformance/extensions/oes-element-index-uint.html [ Skip ]

Modified: trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/oes-element-index-uint.html (156372 => 156373)


--- trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/oes-element-index-uint.html	2013-09-24 23:39:51 UTC (rev 156372)
+++ trunk/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/oes-element-index-uint.html	2013-09-24 23:47:57 UTC (rev 156373)
@@ -1,7 +1,7 @@
 <!--
 
 /*
-** Copyright (c) 2012 The Khronos Group Inc.
+** Copyright (c) 2012, 2013 The Khronos Group Inc.
 **
 ** Permission is hereby granted, free of charge, to any person obtaining a
 ** copy of this software and/or associated documentation files (the
@@ -315,13 +315,15 @@
 
     var program = wtu.loadStandardProgram(gl);
 
+    var vertexLoc = gl.getAttribLocation(program, "a_vertex");
+
     gl.useProgram(program);
     var vertexObject = gl.createBuffer();
-    gl.enableVertexAttribArray(0);
+    gl.enableVertexAttribArray(vertexLoc);
     gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
     // 4 vertices -> 2 triangles
     gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0,0, 0,1,0, 1,0,0, 1,1,0 ]), gl.STATIC_DRAW);
-    gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+    gl.vertexAttribPointer(vertexLoc, 3, gl.FLOAT, false, 0, 0);
 
     var indexObject = gl.createBuffer();
 
@@ -344,13 +346,16 @@
     var program = wtu.setupProgram(gl, ["vs", "fs"], ["vPosition", "vColor"]);
     glErrorShouldBe(gl, gl.NO_ERROR, "after initialization");
 
+    var vertexLoc = gl.getAttribLocation(program, "vPosition");
+    var colorLoc = gl.getAttribLocation(program, "vColor");
+
     var vertexObject = gl.createBuffer();
     gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
     gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
         [-1,1,0, 1,1,0, -1,-1,0,
          -1,-1,0, 1,1,0, 1,-1,0]), gl.STATIC_DRAW);
-    gl.enableVertexAttribArray(0);
-    gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+    gl.enableVertexAttribArray(vertexLoc);
+    gl.vertexAttribPointer(vertexLoc, 3, gl.FLOAT, false, 0, 0);
     glErrorShouldBe(gl, gl.NO_ERROR, "after vertex setup");
 
     var texCoordObject = gl.createBuffer();
@@ -358,8 +363,8 @@
     gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
         [0,0, 1,0, 0,1,
          0,1, 1,0, 1,1]), gl.STATIC_DRAW);
-    gl.enableVertexAttribArray(1);
-    gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+    gl.enableVertexAttribArray(colorLoc);
+    gl.vertexAttribPointer(colorLoc, 2, gl.FLOAT, false, 0, 0);
     glErrorShouldBe(gl, gl.NO_ERROR, "after texture coord setup");
 
     // Now resize these buffers because we want to change what we're drawing.
@@ -378,7 +383,7 @@
         0, 255, 0, 255,
         0, 255, 0, 255,
         0, 255, 0, 255]), gl.STATIC_DRAW);
-    gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, false, 0, 0);
+    gl.vertexAttribPointer(colorLoc, 4, gl.UNSIGNED_BYTE, false, 0, 0);
     glErrorShouldBe(gl, gl.NO_ERROR, "after texture coordinate / color redefinition");
 
     var numQuads = 2;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to