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 118773 3cd3e56dd69164153ac49217198f520cd867038c
parent 118772 d78cebd0fcd4d4bc6ddfac52b281cc299af68677
child 118774 cb34bd8957ec517c72d506f7c439e3af1950e38d
push id2934
push userbjacob@mozilla.com
push dateWed, 12 Dec 2012 02:46:10 +0000
treeherdermozilla-aurora@3cd3e56dd691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert, bbajaj
bugs805814
milestone19.0a2
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
@@ -4176,17 +4176,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;