Bug 1178871 - work around that Mac drivers for shader struct scopes. r=jgilbert
authorJerryShih <hshih@mozilla.com>
Tue, 24 May 2016 02:41:00 +0200
changeset 337951 b29d2b9892b9b7120d619a60cbb9b41a48bdfaea
parent 337950 3b9e115d053a3981d4602adf1dab36b48c787e9d
child 337952 9f371015b17fb4c4c958fbf2bdb30f7f4e8d41c7
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1178871
milestone49.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 1178871 - work around that Mac drivers for shader struct scopes. r=jgilbert
dom/canvas/WebGLShaderValidator.cpp
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -78,16 +78,19 @@ ChooseValidatorCompileOptions(const ShBu
         if (gl->Vendor() == gl::GLVendor::Intel) {
             options |= SH_EMULATE_BUILT_IN_FUNCTIONS;
         }
 
         // Work around bug 636926
         if (gl->Vendor() == gl::GLVendor::NVIDIA) {
             options |= SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX;
         }
+
+        // Work around that Mac drivers handle struct scopes incorrectly.
+        options |= SH_REGENERATE_STRUCT_NAMES;
     }
 #endif
 
     return options;
 }
 
 } // namespace webgl