commit | 1212bcacb32c0f34be737a88377defbc02096b04 | [log] [tgz] |
---|---|---|
author | Corentin Wallez <cwallez@chromium.org> | Wed Nov 23 13:44:05 2016 -0500 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Dec 08 16:52:31 2016 +0000 |
tree | eb14948586e66712b05670b47b720b998c317666 | |
parent | 00cf8940b0783bf3a81dee75ce139ef9c7f3518e [diff] [blame] |
translator: separate declarations after rewriting loops Otherwise when trying to add the declarations back, things might fail because the loop initialization is a sequence and not a block. BUG=668028 Change-Id: I8d84a25c25765e9655c16ce56604ae08f0f8176c Reviewed-on: https://chromium-review.googlesource.com/414305 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/IntermNodePatternMatcher.cpp b/src/compiler/translator/IntermNodePatternMatcher.cpp index dd2054f..6996c45 100644 --- a/src/compiler/translator/IntermNodePatternMatcher.cpp +++ b/src/compiler/translator/IntermNodePatternMatcher.cpp
@@ -106,4 +106,13 @@ return false; } +bool IntermNodePatternMatcher::match(TIntermDeclaration *node) +{ + if ((mMask & kMultiDeclaration) != 0) + { + return node->getSequence()->size() > 1; + } + return false; +} + } // namespace sh