Bug 1371694 - Strip `invariant` on Mac. r=lsalzman
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 07 Feb 2019 18:02:54 +0000
changeset 457662 8254ca56d9f118ec48dfb6a74a6eb34723011a10
parent 457661 016e46630cea3b2e43d2ab136b20092c9548f8d2
child 457663 c7ac7a7c954266d7814f4a3b9233aed10f97e099
push id35516
push userrmaries@mozilla.com
push dateFri, 08 Feb 2019 04:23:26 +0000
treeherdermozilla-central@d599d1a73a3a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1371694
milestone67.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 1371694 - Strip `invariant` on Mac. r=lsalzman MozReview-Commit-ID: 5thQThRUBOY Differential Revision: https://phabricator.services.mozilla.com/D18902
dom/canvas/WebGLShaderValidator.cpp
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -28,17 +28,19 @@ uint64_t IdentifierHashFunc(const char* 
 
 static ShCompileOptions ChooseValidatorCompileOptions(
     const ShBuiltInResources& resources, const mozilla::gl::GLContext* gl) {
   ShCompileOptions options = SH_VARIABLES | SH_ENFORCE_PACKING_RESTRICTIONS |
                              SH_OBJECT_CODE | SH_INIT_GL_POSITION |
                              SH_INITIALIZE_UNINITIALIZED_LOCALS |
                              SH_INIT_OUTPUT_VARIABLES;
 
-#ifndef XP_MACOSX
+#ifdef XP_MACOSX
+  options |= SH_REMOVE_INVARIANT_AND_CENTROID_FOR_ESSL3;
+#else
   // We want to do this everywhere, but to do this on Mac, we need
   // to do it only on Mac OSX > 10.6 as this causes the shader
   // compiler in 10.6 to crash
   options |= SH_CLAMP_INDIRECT_ARRAY_BOUNDS;
 #endif
 
   if (gl->WorkAroundDriverBugs()) {
 #ifdef XP_MACOSX