Index: src/sksl/ast/SkSLASTLayout.h |
diff --git a/src/sksl/ast/SkSLASTLayout.h b/src/sksl/ast/SkSLASTLayout.h |
index 487e6e9ecb4702d42e0d8a0560982942afb40c5a..08d67531c3cf9ac48c4f401fd978f5e2b12b091c 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 |