Bug 1319801 - Move Linux64 mochitest-gl to Ubuntu 16.04. r=jgilbert
authorJoel Maher <jmaher@mozilla.com>
Thu, 02 Feb 2017 06:33:46 -0500
changeset 332239 465c8a6fcdcb434e4fe87615e81f25421a4f0ff4
parent 332175 b4d24ef6105c8a2b380caab845f00dc08e8f2cf3
child 332240 4bfef85f7ae5921208dc2b5fb6808894dda54625
push id31300
push userkwierso@gmail.com
push dateFri, 03 Feb 2017 00:39:30 +0000
treeherdermozilla-central@c8102da699db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1319801
milestone54.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 1319801 - Move Linux64 mochitest-gl to Ubuntu 16.04. r=jgilbert This patch has a few parts to make this work: 1) more tests pass on ubuntu 16, so remove old fail-if conditions 2) no support for GL_ARB_gpu_shader5, we cherry pick from updated ANGLE code 3) disable test_capture.html as it leaks on ASAN MozReview-Commit-ID: BSSiTFvF9jN
dom/canvas/test/webgl-conf/generated-mochitest.ini
dom/canvas/test/webgl-conf/mochitest-errata.ini
dom/canvas/test/webgl-mochitest/mochitest.ini
gfx/angle/src/compiler/translator/TranslatorGLSL.cpp
gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp
taskcluster/ci/test/tests.yml
--- a/dom/canvas/test/webgl-conf/generated-mochitest.ini
+++ b/dom/canvas/test/webgl-conf/generated-mochitest.ini
@@ -8073,17 +8073,17 @@ skip-if = 1
 [generated/test_conformance__ogles__GL__any__any_001_to_004.html]
 [generated/test_conformance__ogles__GL__array__array_001_to_006.html]
 [generated/test_conformance__ogles__GL__asin__asin_001_to_006.html]
 [generated/test_conformance__ogles__GL__atan__atan_001_to_008.html]
 [generated/test_conformance__ogles__GL__atan__atan_009_to_012.html]
 [generated/test_conformance__ogles__GL__biConstants__biConstants_001_to_008.html]
 [generated/test_conformance__ogles__GL__biConstants__biConstants_009_to_016.html]
 [generated/test_conformance__ogles__GL__biuDepthRange__biuDepthRange_001_to_002.html]
-fail-if = (os == 'android') || (os == 'linux')
+fail-if = (os == 'android')
 [generated/test_conformance__ogles__GL__build__build_001_to_008.html]
 [generated/test_conformance__ogles__GL__build__build_009_to_016.html]
 [generated/test_conformance__ogles__GL__build__build_017_to_024.html]
 [generated/test_conformance__ogles__GL__build__build_025_to_032.html]
 [generated/test_conformance__ogles__GL__build__build_033_to_040.html]
 [generated/test_conformance__ogles__GL__build__build_041_to_048.html]
 [generated/test_conformance__ogles__GL__build__build_049_to_056.html]
 [generated/test_conformance__ogles__GL__build__build_057_to_064.html]
@@ -8120,34 +8120,34 @@ skip-if = (os == 'win')
 [generated/test_conformance__ogles__GL__exp2__exp2_001_to_008.html]
 [generated/test_conformance__ogles__GL__exp2__exp2_009_to_012.html]
 [generated/test_conformance__ogles__GL__exp__exp_001_to_008.html]
 [generated/test_conformance__ogles__GL__exp__exp_009_to_012.html]
 [generated/test_conformance__ogles__GL__faceforward__faceforward_001_to_006.html]
 [generated/test_conformance__ogles__GL__floor__floor_001_to_006.html]
 [generated/test_conformance__ogles__GL__fract__fract_001_to_006.html]
 [generated/test_conformance__ogles__GL__functions__functions_001_to_008.html]
-fail-if = (os == 'android') || (os == 'linux')
+fail-if = (os == 'android')
 [generated/test_conformance__ogles__GL__functions__functions_009_to_016.html]
 [generated/test_conformance__ogles__GL__functions__functions_017_to_024.html]
 [generated/test_conformance__ogles__GL__functions__functions_025_to_032.html]
 [generated/test_conformance__ogles__GL__functions__functions_033_to_040.html]
 [generated/test_conformance__ogles__GL__functions__functions_041_to_048.html]
 [generated/test_conformance__ogles__GL__functions__functions_049_to_056.html]
 [generated/test_conformance__ogles__GL__functions__functions_057_to_064.html]
 [generated/test_conformance__ogles__GL__functions__functions_065_to_072.html]
 [generated/test_conformance__ogles__GL__functions__functions_073_to_080.html]
 [generated/test_conformance__ogles__GL__functions__functions_081_to_088.html]
 [generated/test_conformance__ogles__GL__functions__functions_089_to_096.html]
 [generated/test_conformance__ogles__GL__functions__functions_097_to_104.html]
 [generated/test_conformance__ogles__GL__functions__functions_105_to_112.html]
 [generated/test_conformance__ogles__GL__functions__functions_113_to_120.html]
 [generated/test_conformance__ogles__GL__functions__functions_121_to_126.html]
 [generated/test_conformance__ogles__GL__gl_FragCoord__gl_FragCoord_001_to_003.html]
-fail-if = (os == 'android') || (os == 'linux')
+fail-if = (os == 'android')
 [generated/test_conformance__ogles__GL__gl_FrontFacing__gl_FrontFacing_001_to_001.html]
 [generated/test_conformance__ogles__GL__greaterThanEqual__greaterThanEqual_001_to_008.html]
 [generated/test_conformance__ogles__GL__greaterThan__greaterThan_001_to_008.html]
 [generated/test_conformance__ogles__GL__inversesqrt__inversesqrt_001_to_006.html]
 [generated/test_conformance__ogles__GL__length__length_001_to_006.html]
 [generated/test_conformance__ogles__GL__lessThanEqual__lessThanEqual_001_to_008.html]
 [generated/test_conformance__ogles__GL__lessThan__lessThan_001_to_008.html]
 [generated/test_conformance__ogles__GL__log2__log2_001_to_008.html]
@@ -8180,17 +8180,17 @@ skip-if = (os == 'linux')
 [generated/test_conformance__ogles__GL__pow__pow_009_to_016.html]
 [generated/test_conformance__ogles__GL__pow__pow_017_to_024.html]
 [generated/test_conformance__ogles__GL__radians__radians_001_to_006.html]
 [generated/test_conformance__ogles__GL__reflect__reflect_001_to_006.html]
 [generated/test_conformance__ogles__GL__refract__refract_001_to_006.html]
 [generated/test_conformance__ogles__GL__sign__sign_001_to_006.html]
 skip-if = (os == 'linux')
 [generated/test_conformance__ogles__GL__sin__sin_001_to_006.html]
-fail-if = (os == 'android') || (os == 'linux')
+fail-if = (os == 'android')
 [generated/test_conformance__ogles__GL__smoothstep__smoothstep_001_to_006.html]
 [generated/test_conformance__ogles__GL__sqrt__sqrt_001_to_006.html]
 [generated/test_conformance__ogles__GL__step__step_001_to_006.html]
 [generated/test_conformance__ogles__GL__struct__struct_001_to_008.html]
 [generated/test_conformance__ogles__GL__struct__struct_009_to_016.html]
 [generated/test_conformance__ogles__GL__struct__struct_017_to_024.html]
 [generated/test_conformance__ogles__GL__struct__struct_025_to_032.html]
 [generated/test_conformance__ogles__GL__struct__struct_033_to_040.html]
--- a/dom/canvas/test/webgl-conf/mochitest-errata.ini
+++ b/dom/canvas/test/webgl-conf/mochitest-errata.ini
@@ -143,19 +143,19 @@ skip-if = (os == 'android') || (os == 'w
 fail-if = (os == 'mac')
 [generated/test_2_conformance2__vertex_arrays__vertex-array-object.html]
 fail-if = (os == 'mac') || (os == 'win')
 [generated/test_conformance__extensions__oes-texture-half-float.html]
 fail-if = (os == 'mac') || (os == 'win') || (os == 'android') || (os == 'linux')
 [generated/test_conformance__attribs__gl-vertexattribpointer.html]
 fail-if = (os == 'android')
 [generated/test_conformance__ogles__GL__biuDepthRange__biuDepthRange_001_to_002.html]
-fail-if = (os == 'android') || (os == 'linux')
+fail-if = (os == 'android')
 [generated/test_conformance__ogles__GL__gl_FragCoord__gl_FragCoord_001_to_003.html]
-fail-if = (os == 'android') || (os == 'linux')
+fail-if = (os == 'android')
 
 [generated/test_conformance__textures__misc__texture-size-limit.html]
 fail-if = (os == 'linux') || (os == 'android')
 skip-if = (os == 'linux' && asan)
 [generated/test_2_conformance2__reading__read-pixels-from-fbo-test.html]
 skip-if = (os == 'mac') || (os == 'win')
 [generated/test_2_conformance2__misc__uninitialized-test-2.html]
 skip-if = (os == 'mac') || (os == 'win')
@@ -364,19 +364,19 @@ fail-if = (os == 'mac') || (os == 'win')
 [generated/test_conformance__glsl__bugs__temp-expressions-should-not-crash.html]
 # Coincidentally enough, crashes on Linux and Android 4.0.
 skip-if = (os == 'android') || (os == 'linux')
 [generated/test_conformance__misc__invalid-passed-params.html]
 # Causes consistent *blues*: "DMError: Remote Device Error: unable to
 # connect to 127.0.0.1 after 5 attempts" on 'Android 2.3 Opt'.
 skip-if = (os == 'android') || (os == 'linux')
 [generated/test_conformance__ogles__GL__functions__functions_001_to_008.html]
-fail-if = (os == 'android') || (os == 'linux')
+fail-if = (os == 'android')
 [generated/test_conformance__ogles__GL__sin__sin_001_to_006.html]
-fail-if = (os == 'android') || (os == 'linux')
+fail-if = (os == 'android')
 [generated/test_conformance__reading__read-pixels-test.html]
 # Causes consistent *blues*: "DMError: Remote Device Error: unable to
 # connect to 127.0.0.1 after 5 attempts" on 'Android 2.3 Opt'.
 # Crashes near on B2G ICS Emulator.
 skip-if = (os == 'android') || (os == 'linux')
 [generated/test_conformance__textures__misc__texture-upload-size.html]
 # application crashed [@ mozilla::WebGLTexture::TexSubImage]
 skip-if = (os == 'win') || (os == 'android')
--- a/dom/canvas/test/webgl-mochitest/mochitest.ini
+++ b/dom/canvas/test/webgl-mochitest/mochitest.ini
@@ -25,17 +25,17 @@ fail-if = (os == 'android')
 fail-if = (os == 'android') || (os == 'linux')
 [ensure-exts/test_OES_standard_derivatives.html]
 fail-if = (os == 'android')
 [ensure-exts/test_WEBGL_color_buffer_float.html]
 fail-if = (os == 'android')
 [ensure-exts/test_WEBGL_compressed_texture_atc.html]
 fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win')
 [ensure-exts/test_WEBGL_compressed_texture_es3.html]
-fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win')
+fail-if = (os == 'android') || (os == 'mac') || (os == 'win')
 [ensure-exts/test_WEBGL_compressed_texture_etc1.html]
 fail-if = (os == 'linux') || (os == 'mac') || (os == 'win')
 [ensure-exts/test_WEBGL_compressed_texture_pvrtc.html]
 fail-if = (os == 'android') || (os == 'linux') || (os == 'mac') || (os == 'win')
 [ensure-exts/test_WEBGL_compressed_texture_s3tc.html]
 fail-if = (os == 'android') || (os == 'linux')
 [ensure-exts/test_WEBGL_depth_texture.html]
 fail-if = (os == 'mac' && os_version == '10.6')
--- a/gfx/angle/src/compiler/translator/TranslatorGLSL.cpp
+++ b/gfx/angle/src/compiler/translator/TranslatorGLSL.cpp
@@ -252,30 +252,24 @@ void TranslatorGLSL::writeExtensionBehav
 
     // GLSL ES 3 explicit location qualifiers need to use an extension before GLSL 330
     if (getShaderVersion() >= 300 && getOutputType() < SH_GLSL_330_CORE_OUTPUT)
     {
         sink << "#extension GL_ARB_explicit_attrib_location : require\n";
     }
 
     // Need to enable gpu_shader5 to have index constant sampler array indexing
-    if (getOutputType() != SH_ESSL_OUTPUT && getOutputType() < SH_GLSL_400_CORE_OUTPUT)
+    if (getOutputType() != SH_ESSL_OUTPUT && getOutputType() < SH_GLSL_400_CORE_OUTPUT  &&
+        getShaderVersion() == 100)
     {
-        sink << "#extension GL_ARB_gpu_shader5 : ";
-
-        // Don't use "require" on WebGL 1 to avoid breaking WebGL on drivers that silently
-        // support index constant sampler array indexing, but don't have the extension.
-        if (getShaderVersion() >= 300)
-        {
-            sink << "require\n";
-        }
-        else
-        {
-            sink << "enable\n";
-        }
+        // Don't use "require" on to avoid breaking WebGL 1 on drivers that silently
+        // support index constant sampler array indexing, but don't have the extension or
+        // on drivers that don't have the extension at all as it would break WebGL 1 for
+        // some users.
+        sink << "#extension GL_ARB_gpu_shader5 : enable\n";
     }
 
     TExtensionGLSL extensionGLSL(getOutputType());
     root->traverse(&extensionGLSL);
 
     for (const auto &ext : extensionGLSL.getEnabledExtensions())
     {
         sink << "#extension " << ext << " : enable\n";
--- a/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp
+++ b/gfx/angle/src/libANGLE/renderer/gl/renderergl_utils.cpp
@@ -542,26 +542,21 @@ void GenerateCaps(const FunctionsGL *fun
     {
         caps->maxSamples = QuerySingleGLInt(functions, GL_MAX_SAMPLES);
     }
     else
     {
         LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
     }
 
-    // Check if index constant sampler array indexing is supported
-    if (!functions->isAtLeastGL(gl::Version(4, 0)) &&
-        !functions->isAtLeastGLES(gl::Version(2, 0)) &&
-        !functions->hasExtension("GL_ARB_gpu_shader5"))
-    {
-        // This should also be required for ES2 but there are some driver support index constant
-        // sampler array indexing without meeting the requirements above. Don't limit their ES
-        // version as it would break WebGL for some users.
-        LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
-    }
+    // Non-constant sampler array indexing is required for OpenGL ES 2 and OpenGL ES after 3.2.
+    // However having it available on OpenGL ES 2 is a specification bug, and using this
+    // indexing in WebGL is undefined. Requiring this feature would break WebGL 1 for some users
+    // so we don't check for it. (it is present with ESSL 100, ESSL >= 320, GLSL >= 400 and
+    // GL_ARB_gpu_shader5)
 
     // Check if sampler objects are supported
     if (!functions->isAtLeastGL(gl::Version(3, 3)) &&
         !functions->hasGLExtension("GL_ARB_sampler_objects") &&
         !functions->isAtLeastGLES(gl::Version(3, 0)))
     {
         // Can't support ES3 without sampler objects
         LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -799,16 +799,17 @@ mochitest-valgrind:
                     - remove_executables.py
         extra-options:
             - --mochitest-suite=valgrind-plain
 
 mochitest-webgl:
     description: "Mochitest webgl run"
     suite: mochitest/mochitest-gl
     treeherder-symbol: tc-M(gl)
+    docker-image: {"in-tree": "desktop1604-test"}
     chunks:
         by-test-platform:
             android.*: 10
             default: 3
     loopback-video: true
     max-run-time:
         by-test-platform:
             android.*: 7200