Bug 1347866 - Part5: Remove SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX in WebGLShaderValidator.cpp which is not supported in newer ANGLE r?jgilbert draft
authorChih-Yi Leu <cleu@mozilla.com>
Mon, 20 Mar 2017 11:27:24 +0800
changeset 555958 a121615e0c8ce14395623eb50811b2d75a8fdad3
parent 555957 624f14e0afd47200b187932a7d35e7adf27ca532
child 622737 b94e5ee1ad00c2ece6366e5b11443df494b64bfc
push id52383
push userbmo:cleu@mozilla.com
push dateWed, 05 Apr 2017 05:16:20 +0000
reviewersjgilbert
bugs1347866
milestone55.0a1
Bug 1347866 - Part5: Remove SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX in WebGLShaderValidator.cpp which is not supported in newer ANGLE r?jgilbert MozReview-Commit-ID: 9EUEvRqs3Il
dom/canvas/WebGLShaderValidator.cpp
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -32,22 +32,16 @@ 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;
 
-    // Sampler arrays indexed with non-constant expressions are forbidden in
-    // GLSL 1.30 and later.
-    // ESSL 3 requires constant-integral-expressions for this as well.
-    // Just do it universally.
-    options |= SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX;
-
 #ifndef XP_MACOSX
     // 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
 
 #ifdef XP_MACOSX