diff options
Diffstat (limited to 'src/sksl/ast/SkSLASTLayout.h')
-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 |