Bug 834814 - allow for webgl tests to support mesa llvm driver. r=bjacob

--HG--
rename : content/canvas/test/webgl/failing_tests_linux.txt => content/canvas/test/webgl/failing_tests_linux_nvidia.txt
This commit is contained in:
Joel Maher 2013-01-27 08:01:19 -05:00
parent f0feebae11
commit 7766f6b4e8
5 changed files with 69 additions and 3 deletions

View File

@ -14,6 +14,9 @@ MOCHITEST_FILES = \
test_webgl_conformance_test_suite.html \
00_test_list.txt \
failing_tests_linux.txt \
failing_tests_linux_mesa.txt \
skipped_tests_linux_mesa.txt \
failing_tests_linux_nvidia.txt \
failing_tests_windows.txt \
failing_tests_mac.txt \
failing_tests_mac_mtnlion.txt \

View File

@ -0,0 +1,5 @@
conformance/textures/texture-mips.html
conformance/textures/texture-size-cube-maps.html
conformance/extensions/oes-texture-float.html
conformance/glsl/functions/glsl-function-sin.html

View File

@ -0,0 +1,5 @@
conformance/misc/uninitialized-test.html
conformance/programs/gl-get-active-attribute.html
conformance/textures/texture-mips.html
conformance/uniforms/gl-uniform-bool.html
conformance/renderbuffers/framebuffer-object-attachment.html

View File

@ -0,0 +1,2 @@
conformance/misc/type-conversion-test.html

View File

@ -44,17 +44,58 @@ var OPTIONS = {
SimpleTest.waitForExplicitFinish();
function detectDriverType() {
const Cc = SpecialPowers.wrap(Components).classes;
const Ci = SpecialPowers.wrap(Components).interfaces;
var doc = Cc["@mozilla.org/xmlextras/domparser;1"].createInstance(Ci.nsIDOMParser).parseFromString("<html/>", "text/html");
var canvas = doc.createElement("canvas");
canvas.width = 1;
canvas.height = 1;
var type = "";
var gl;
try {
gl = canvas.getContext("experimental-webgl");
} catch(e) {}
if (gl) {
var ext = gl.getExtension("WEBGL_debug_renderer_info");
// this extension is unconditionally available to chrome. No need to check.
var webglRenderer = gl.getParameter(ext.UNMASKED_RENDERER_WEBGL);
var webglVendor = gl.getParameter(ext.UNMASKED_VENDOR_WEBGL);
if (webglRenderer.contains('llvmpipe')) {
type = "mesa";
} else if (webglVendor.contains('NVIDIA')) {
type = "nvidia";
}
}
return type;
}
function start() {
var kIsWindows = false;
var kIsLinux = false;
var kIsAndroid = false;
var kIsLinux = false;
var kIsLinuxNVidia = false;
var kIsLinuxMesa = false;
if (navigator.platform.indexOf("Win") == 0)
kIsWindows = true;
else if (navigator.appVersion.indexOf("Android") != -1)
kIsAndroid = true;
else if (navigator.platform.indexOf("Linux") == 0) // must be checked after android, as android also has a 'Linux' platform string
kIsLinux = true;
else if (navigator.platform.indexOf("Linux") == 0) {
// must be checked after android, as android also has a 'Linux' platform string
var type = detectDriverType();
if (type == "mesa") {
kIsLinuxMesa = true;
} else if (type == "nvidia") {
kIsLinuxNVidia = true;
} else {
kIsLinux = true;
}
}
// Set kMacVersion to the OS X version for Mac, and 0 otherwise.
var osxmatch = /Mac OS X (\d+.\d+)/.exec(navigator.userAgent);
@ -418,6 +459,10 @@ function start() {
failingTestsFilename = 'failing_tests_windows.txt';
else if (kIsLinux)
failingTestsFilename = 'failing_tests_linux.txt';
else if (kIsLinuxMesa)
failingTestsFilename = 'failing_tests_linux_mesa.txt';
else if (kIsLinuxNVidia)
failingTestsFilename = 'failing_tests_linux_nvidia.txt';
else if (kMacVersion == 10.8)
failingTestsFilename = 'failing_tests_mac_mtnlion.txt';
else if (kMacVersion)
@ -446,6 +491,12 @@ function start() {
.split('\n');
}
if (kIsLinuxMesa) {
var testsToSkip = loadTextFileSynchronous('skipped_tests_linux_mesa.txt')
.replace(/\r/g, '') // convert to unix line breaks
.split('\n');
}
runTestSuite();
}