From f789b3893579b773bb4d7be6c2c65311500b53bb Mon Sep 17 00:00:00 2001 From: ethannicholas Date: Wed, 3 Aug 2016 12:43:36 -0700 Subject: added initial GLSL support to skslc BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185393003 Review-Url: https://codereview.chromium.org/2185393003 --- src/sksl/ast/SkSLASTLayout.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/sksl/ast/SkSLASTLayout.h') 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 -- cgit v1.2.3