aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-03-09 16:35:09 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-10 15:49:04 +0000
commit8da9e940721168143d6296f578b6d7423de55d69 (patch)
tree93728cd0e6adac1e28e03da050f2c721d473efed /src
parent0b791f57c4a158fa3cab7250f0955b7f8abd5755 (diff)
put sksl->glsl modifiers in correct order
BUG=skia:6352 Change-Id: I7cdf6fa9c5b48fd2686c5cfc28c594bd291feea5 Reviewed-on: https://skia-review.googlesource.com/9520 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/sksl/SkSLGLSLCodeGenerator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index 35a2f62b08..a19de8f844 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -532,6 +532,10 @@ void GLSLCodeGenerator::writeModifiers(const Modifiers& modifiers,
if (modifiers.fFlags & Modifiers::kNoPerspective_Flag) {
this->write("noperspective ");
}
+ SkString layout = modifiers.fLayout.description();
+ if (layout.size()) {
+ this->write(layout + " ");
+ }
if (modifiers.fFlags & Modifiers::kReadOnly_Flag) {
this->write("readonly ");
}
@@ -547,10 +551,6 @@ void GLSLCodeGenerator::writeModifiers(const Modifiers& modifiers,
if (modifiers.fFlags & Modifiers::kRestrict_Flag) {
this->write("restrict ");
}
- SkString layout = modifiers.fLayout.description();
- if (layout.size()) {
- this->write(layout + " ");
- }
if ((modifiers.fFlags & Modifiers::kIn_Flag) &&
(modifiers.fFlags & Modifiers::kOut_Flag)) {
this->write("inout ");