aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ast/SkSLASTLayout.h
diff options
context:
space:
mode:
authorGravatar ethannicholas <ethannicholas@google.com>2016-08-03 12:43:36 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-03 12:43:36 -0700
commitf789b3893579b773bb4d7be6c2c65311500b53bb (patch)
treeffb4c1c5775ba6379a9e504534171a67fa1803c5 /src/sksl/ast/SkSLASTLayout.h
parente57b8c9a790253df1e2f0663bf63f8d6e04227d1 (diff)
added initial GLSL support to skslc
Diffstat (limited to 'src/sksl/ast/SkSLASTLayout.h')
-rw-r--r--src/sksl/ast/SkSLASTLayout.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sksl/ast/SkSLASTLayout.h b/src/sksl/ast/SkSLASTLayout.h
index 487e6e9ecb..08d67531c3 100644
--- a/src/sksl/ast/SkSLASTLayout.h
+++ b/src/sksl/ast/SkSLASTLayout.h
@@ -20,12 +20,13 @@ namespace SkSL {
*/
struct ASTLayout : public ASTNode {
// For all parameters, a -1 means no value
- ASTLayout(int location, int binding, int index, int set, int builtin)
+ ASTLayout(int location, int binding, int index, int set, int builtin, bool originUpperLeft)
: fLocation(location)
, fBinding(binding)
, fIndex(index)
, fSet(set)
- , fBuiltin(builtin) {}
+ , fBuiltin(builtin)
+ , fOriginUpperLeft(originUpperLeft) {}
std::string description() const {
std::string result;
@@ -50,6 +51,10 @@ struct ASTLayout : public ASTNode {
result += separator + "builtin = " + to_string(fBuiltin);
separator = ", ";
}
+ if (fOriginUpperLeft) {
+ result += separator + "origin_upper_left";
+ separator = ", ";
+ }
if (result.length() > 0) {
result = "layout (" + result + ")";
}
@@ -61,6 +66,7 @@ struct ASTLayout : public ASTNode {
const int fIndex;
const int fSet;
const int fBuiltin;
+ const bool fOriginUpperLeft;
};
} // namespace