commit | 7f7b48537c559d91264f3caab50cdbb8e6cc4d58 | [log] [tgz] |
---|---|---|
author | John Stiles <johnstiles@google.com> | Tue Nov 10 11:25:35 2020 -0500 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Tue Nov 10 18:08:29 2020 +0000 |
tree | d606f616ee8cf6348690ba4e26adf65eb79b15ea | |
parent | 267826c8655201c56b8b53a28b4823b184319553 [diff] [blame] |
Fix flipped array dimensions in SkSL. Change-Id: I6e44dd5c347b43b3a5cb135724083adbaf65cf27 Bug: skia:10924 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333536 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/SkSLIRGenerator.cpp b/src/sksl/SkSLIRGenerator.cpp index 50a2255..8d58648 100644 --- a/src/sksl/SkSLIRGenerator.cpp +++ b/src/sksl/SkSLIRGenerator.cpp
@@ -914,7 +914,7 @@ if (!type) { return; } - for (int j = (int) pd.fSizeCount; j >= 1; j--) { + for (int j = 1; j <= (int) pd.fSizeCount; j++) { int size = (param.begin() + j)->getInt(); String name = type->name() + "[" + to_string(size) + "]"; type = fSymbolTable->takeOwnershipOfSymbol(