diff options
author | ethannicholas <ethannicholas@google.com> | 2016-11-15 12:53:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-15 12:53:06 -0800 |
commit | fa5f65ac61fd525029aa9dab161ffe4896c10f6d (patch) | |
tree | 759d6a3b9602b86deec1028e081c0ceaf1004751 /src/sksl/ast | |
parent | 3667b4970d6972675be58a331be7c5ba02f3d39e (diff) |
added support for push_constant layout
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187433003
Review-Url: https://codereview.chromium.org/2187433003
Diffstat (limited to 'src/sksl/ast')
-rw-r--r-- | src/sksl/ast/SkSLASTLayout.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sksl/ast/SkSLASTLayout.h b/src/sksl/ast/SkSLASTLayout.h index 515eb2bdbb..2aec31e4df 100644 --- a/src/sksl/ast/SkSLASTLayout.h +++ b/src/sksl/ast/SkSLASTLayout.h @@ -19,9 +19,9 @@ namespace SkSL { * layout (location = 0) int x; */ struct ASTLayout : public ASTNode { - // For all parameters, a -1 means no value + // For int parameters, a -1 means no value ASTLayout(int location, int binding, int index, int set, int builtin, bool originUpperLeft, - bool overrideCoverage, bool blendSupportAllEquations) + bool overrideCoverage, bool blendSupportAllEquations, bool pushConstant) : fLocation(location) , fBinding(binding) , fIndex(index) @@ -29,7 +29,8 @@ struct ASTLayout : public ASTNode { , fBuiltin(builtin) , fOriginUpperLeft(originUpperLeft) , fOverrideCoverage(overrideCoverage) - , fBlendSupportAllEquations(blendSupportAllEquations) {} + , fBlendSupportAllEquations(blendSupportAllEquations) + , fPushConstant(pushConstant) {} std::string description() const { std::string result; @@ -66,6 +67,10 @@ struct ASTLayout : public ASTNode { result += separator + "blend_support_all_equations"; separator = ", "; } + if (fPushConstant) { + result += separator + "push_constant"; + separator = ", "; + } if (result.length() > 0) { result = "layout (" + result + ")"; } @@ -80,6 +85,7 @@ struct ASTLayout : public ASTNode { const bool fOriginUpperLeft; const bool fOverrideCoverage; const bool fBlendSupportAllEquations; + const bool fPushConstant; }; } // namespace |