Bug 911394 - arrayless drawElements works on ANGLE. - r=bustage on a CLOSED TREE
☠☠ backed out by 2def80d5a106 ☠ ☠
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 17 Oct 2013 18:48:42 -0700
changeset 164997 15418b394a64450cecaa03d72f10d508fc6bc43e
parent 164996 7349a4fc4d5801341c564c00bbd902e18f91d402
child 164998 2def80d5a106187ddd2d19bcd8efe975edd46e7f
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs911394
milestone27.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 911394 - arrayless drawElements works on ANGLE. - r=bustage on a CLOSED TREE
content/canvas/test/webgl/non-conf-tests/driver-info.js
content/canvas/test/webgl/non-conf-tests/test_no_arr_points.html
--- a/content/canvas/test/webgl/non-conf-tests/driver-info.js
+++ b/content/canvas/test/webgl/non-conf-tests/driver-info.js
@@ -53,16 +53,17 @@ DriverInfo = (function() {
     ANDROID: 'android',
     B2G: 'b2g',
   };
 
   var DRIVER = {
     MESA: 'mesa',
     NVIDIA: 'nvidia',
     ANDROID_X86_EMULATOR: 'android x86 emulator',
+    ANGLE: 'angle',
   };
 
   var kOS = null;
   var kOSVersion = null;
   var kDriver = null;
 
   // From reftest.js:
   var runtime = Cc['@mozilla.org/xre/app-info;1'].getService(Ci.nsIXULRuntime);
@@ -99,16 +100,18 @@ DriverInfo = (function() {
     [glVendor, glRenderer] = detectDriverInfo();
     info('GL vendor: ' + glVendor);
     info('GL renderer: ' + glRenderer);
 
     if (glRenderer.contains('llvmpipe')) {
       kDriver = DRIVER.MESA;
     } else if (glRenderer.contains('Android Emulator')) {
       kDriver = DRIVER.ANDROID_X86_EMULATOR;
+    } else if (glRenderer.contains('ANGLE')) {
+      kDriver = DRIVER.ANGLE;
     } else if (glVendor.contains('NVIDIA')) {
       kDriver = DRIVER.NVIDIA;
     }
   } catch (e) {
     // detectDriverInfo is fallible where WebGL fails.
   }
 
   if (kOS) {
--- a/content/canvas/test/webgl/non-conf-tests/test_no_arr_points.html
+++ b/content/canvas/test/webgl/non-conf-tests/test_no_arr_points.html
@@ -110,33 +110,39 @@ void main(void) {
     ok(!isScreenBlack(), '[' + info + '] drawArrays should color pixels.');
 
     gl.clear(gl.COLOR_BUFFER_BIT);
     gl.drawArrays(gl.POINTS, hugeFirst, 1);
     ok(!isScreenBlack(), '[' + info + '] drawArrays[huge first] should color pixels.');
 
     checkGLError(ok, info);
 
+    var elemTestFunc = todo; // We fail on most implementations.
+    if (DriverInfo.getDriver() == DriverInfo.DRIVER.ANGLE) {
+      // ANGLE seems to work fine.
+      elemTestFunc = ok;
+    }
+
     // Now for drawElements:
     gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, gl.createBuffer());
     gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indexArr, gl.STATIC_DRAW);
 
     gl.clear(gl.COLOR_BUFFER_BIT);
     gl.drawElements(gl.POINTS, 1, indexType, 0);
-    todo(!isScreenBlack(), '[' + info + '] drawElements[0] should color pixels.');
+    elemTestFunc(!isScreenBlack(), '[' + info + '] drawElements[0] should color pixels.');
 
     gl.clear(gl.COLOR_BUFFER_BIT);
     gl.drawElements(gl.POINTS, 1, indexType, 1*indexStride);
-    todo(!isScreenBlack(), '[' + info + '] drawElements[1] should color pixels.');
+    elemTestFunc(!isScreenBlack(), '[' + info + '] drawElements[1] should color pixels.');
 
     gl.clear(gl.COLOR_BUFFER_BIT);
     gl.drawElements(gl.POINTS, 1, indexType, 2*indexStride);
-    todo(!isScreenBlack(), '[' + info + '] drawElements[huge offset] should color pixels.');
+    elemTestFunc(!isScreenBlack(), '[' + info + '] drawElements[huge offset] should color pixels.');
 
-    checkGLError(todo, info);
+    checkGLError(elemTestFunc, info);
   }
 
   // Begin drawing
   gl.clearColor(0.0, 0.0, 0.0, 1.0);
   gl.disable(gl.DEPTH_TEST);
 
   // No-attrib prog:
   gl.useProgram(noAttribProg);