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 117503 3bf8ca7f948cce25dfe30b80d0d2adb9cb2e01f1
parent 117502 756875fbb2bb32cb3988396a49edad1c880033f8
child 117504 e904ee016207423122b355c8233f00902af8211c
push id1924
push userbjacob@mozilla.com
push dateWed, 12 Dec 2012 02:48:10 +0000
treeherdermozilla-beta@3bf8ca7f948c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert, bbajaj
bugs805814
milestone18.0
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
@@ -4048,17 +4048,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;