| Index: src/sksl/SkSLParser.cpp
|
| diff --git a/src/sksl/SkSLParser.cpp b/src/sksl/SkSLParser.cpp
|
| index 324bd41c86c972f39e9ad3714ef4069c90d8c6dd..154989fe84d6c5fbbb388f75c0248d52d0d4b24b 100644
|
| --- a/src/sksl/SkSLParser.cpp
|
| +++ b/src/sksl/SkSLParser.cpp
|
| @@ -526,8 +526,7 @@ int Parser::layoutInt() {
|
| return -1;
|
| }
|
|
|
| -/* LAYOUT LPAREN IDENTIFIER EQ INT_LITERAL (COMMA IDENTIFIER EQ INT_LITERAL)*
|
| - RPAREN */
|
| +/* LAYOUT LPAREN IDENTIFIER (EQ INT_LITERAL)? (COMMA IDENTIFIER (EQ INT_LITERAL)?)* RPAREN */
|
| ASTLayout Parser::layout() {
|
| int location = -1;
|
| int binding = -1;
|
| @@ -537,11 +536,12 @@ ASTLayout Parser::layout() {
|
| bool originUpperLeft = false;
|
| bool overrideCoverage = false;
|
| bool blendSupportAllEquations = false;
|
| + bool pushConstant = false;
|
| if (this->peek().fKind == Token::LAYOUT) {
|
| this->nextToken();
|
| if (!this->expect(Token::LPAREN, "'('")) {
|
| return ASTLayout(location, binding, index, set, builtin, originUpperLeft,
|
| - overrideCoverage, blendSupportAllEquations);
|
| + overrideCoverage, blendSupportAllEquations, pushConstant);
|
| }
|
| for (;;) {
|
| Token t = this->nextToken();
|
| @@ -561,6 +561,8 @@ ASTLayout Parser::layout() {
|
| overrideCoverage = true;
|
| } else if (t.fText == "blend_support_all_equations") {
|
| blendSupportAllEquations = true;
|
| + } else if (t.fText == "push_constant") {
|
| + pushConstant = true;
|
| } else {
|
| this->error(t.fPosition, ("'" + t.fText +
|
| "' is not a valid layout qualifier").c_str());
|
| @@ -575,7 +577,7 @@ ASTLayout Parser::layout() {
|
| }
|
| }
|
| return ASTLayout(location, binding, index, set, builtin, originUpperLeft, overrideCoverage,
|
| - blendSupportAllEquations);
|
| + blendSupportAllEquations, pushConstant);
|
| }
|
|
|
| /* layout? (UNIFORM | CONST | IN | OUT | INOUT | LOWP | MEDIUMP | HIGHP | FLAT | NOPERSPECTIVE)* */
|
|
|