Bug 805814 - turn on packing restrictions in WebGL shaders - r=jgilbert, a=bbajaj
authorBenoit Jacob <bjacob@mozilla.com>
Tue, 11 Dec 2012 16:57:30 -0500
changeset 109926 12d64ab0f2ac06d9328e055dadb838180feb1933
parent 109925 ac125a3b2b601ba6d7e8ca7eaca112093767771b
child 109927 2c147a5abc87a24176566efbc34b9181037862b4
push id60
push userbjacob@mozilla.com
push dateWed, 12 Dec 2012 03:24:18 +0000
reviewersjgilbert, bbajaj
bugs805814
milestone17.0.1esrpre
Bug 805814 - turn on packing restrictions in WebGL shaders - r=jgilbert, a=bbajaj
content/canvas/src/WebGLContextGL.cpp
--- a/content/canvas/src/WebGLContextGL.cpp
+++ b/content/canvas/src/WebGLContextGL.cpp
@@ -5013,17 +5013,18 @@ WebGLContext::CompileShader(WebGLShader 
 
         const char *s = sourceCString.get();
 
         compiler = ShConstructCompiler((ShShaderType) shader->ShaderType(),
                                        SH_WEBGL_SPEC,
                                        targetShaderSourceLanguage,
                                        &resources);
 
-        int compileOptions = SH_ATTRIBUTES_UNIFORMS;
+        int compileOptions = SH_ATTRIBUTES_UNIFORMS |
+                             SH_ENFORCE_PACKING_RESTRICTIONS;
         if (useShaderSourceTranslation) {
             compileOptions |= SH_OBJECT_CODE
                             | SH_MAP_LONG_VARIABLE_NAMES;
 #ifdef XP_MACOSX
             if (gl->WorkAroundDriverBugs()) {
                 // Work around bug 665578 and bug 769810
                 if (gl->Vendor() == gl::GLContext::VendorATI) {
                     compileOptions |= SH_EMULATE_BUILT_IN_FUNCTIONS;