Backed out changeset 1c9f6480b0e4 (bug 1297924)
authorIris Hsiao <ihsiao@mozilla.com>
Wed, 07 Sep 2016 16:44:28 +0800
changeset 312964 a495d31313af6abff1b9f1f4b5b1f083feb55fad
parent 312963 9d889e3bc5bab13e419d9aeb72b29c04bf79ba79
child 312965 c5ed16e1dbc645100a0245a82d83995d52207f41
push id30665
push usercbook@mozilla.com
push dateWed, 07 Sep 2016 15:20:43 +0000
treeherdermozilla-central@95acb9299faf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1297924
milestone51.0a1
backs out1c9f6480b0e43225552da0957eae29a6b0da3298
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
Backed out changeset 1c9f6480b0e4 (bug 1297924)
dom/canvas/WebGLShaderValidator.cpp
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -290,23 +290,26 @@ ShaderValidator::CanLinkTo(const ShaderV
     const auto& fragVaryings = ShGetVaryings(mHandle);
     if (!vertVaryings || !fragVaryings) {
         nsPrintfCString error("Could not create varying list.");
         *out_log = error;
         return false;
     }
 
     {
-        std::vector<sh::ShaderVariable> staticUseVaryingList;
+        std::vector<ShVariableInfo> staticUseVaryingList;
 
         for (const auto& fragVarying : *fragVaryings) {
+            const ShVariableInfo varInfo = { fragVarying.type,
+                                             (int)fragVarying.elementCount() };
+
             static const char prefix[] = "gl_";
             if (StartsWith(fragVarying.name, prefix)) {
                 if (fragVarying.staticUse) {
-                    staticUseVaryingList.push_back(fragVarying);
+                    staticUseVaryingList.push_back(varInfo);
                 }
                 continue;
             }
 
             bool definedInVertShader = false;
             bool staticVertUse = false;
 
             for (const auto& vertVarying : *vertVaryings) {
@@ -330,22 +333,23 @@ ShaderValidator::CanLinkTo(const ShaderV
                 nsPrintfCString error("Varying `%s` has static-use in the frag"
                                       " shader, but is undeclared in the vert"
                                       " shader.", fragVarying.name.c_str());
                 *out_log = error;
                 return false;
             }
 
             if (staticVertUse && fragVarying.staticUse) {
-                staticUseVaryingList.push_back(fragVarying);
+                staticUseVaryingList.push_back(varInfo);
             }
         }
 
         if (!ShCheckVariablesWithinPackingLimits(mMaxVaryingVectors,
-                                                 staticUseVaryingList))
+                                                 staticUseVaryingList.data(),
+                                                 staticUseVaryingList.size()))
         {
             *out_log = "Statically used varyings do not fit within packing limits. (see"
                        " GLSL ES Specification 1.0.17, p111)";
             return false;
         }
     }
 
     if (shaderVersion == 100) {