ShCheckVariablesWithinPackingLimits add sh::ShaderVariable overload

This overload doesn't take a stripped down version of the variable
information, which makes it possible to handle varying structs
correctly by flattening them as individual variables.

BUG=621031

Change-Id: I367629fce3d17dd7e1f876c5937eb37f3d97c7f4
Reviewed-on: https://chromium-review.googlesource.com/361460
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
index e4f27fb..79d30b7 100644
--- a/src/compiler/translator/ShaderLang.cpp
+++ b/src/compiler/translator/ShaderLang.cpp
@@ -339,6 +339,11 @@
         sh::ShaderVariable var(varInfoArray[ii].type, varInfoArray[ii].size);
         variables.push_back(var);
     }
+    return ShCheckVariablesWithinPackingLimits(maxVectors, variables);
+}
+bool ShCheckVariablesWithinPackingLimits(int maxVectors,
+                                         const std::vector<sh::ShaderVariable> &variables)
+{
     VariablePacker packer;
     return packer.CheckVariablesWithinPackingLimits(maxVectors, variables);
 }
@@ -376,4 +381,4 @@
     static std::map<std::string, unsigned int> map;
     return &map;
 #endif  // ANGLE_ENABLE_HLSL
-}
\ No newline at end of file
+}