aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLIRGenerator.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-06-21 11:25:18 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-21 15:55:06 +0000
commit7da6dfabc44891c51dedcb4754477b662d8c8a0a (patch)
treef64e1e88cbeb67319490ae138eb5afdb6175e627 /src/sksl/SkSLIRGenerator.h
parentce57552e11776c8f93798c3a2244fa378604b4af (diff)
implemented mustImplementGSInvocationsWithLoop workaround in sksl
Third time's the charm This reverts commit 84cda40bd7e98f4e19574c6e946395e244901408. Bug: skia: Change-Id: I2c0f4425122a94beb7b4053ee6e891faa8a5f290 Reviewed-on: https://skia-review.googlesource.com/20441 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/sksl/SkSLIRGenerator.h')
-rw-r--r--src/sksl/SkSLIRGenerator.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/sksl/SkSLIRGenerator.h b/src/sksl/SkSLIRGenerator.h
index d4a684638c..29513d8d34 100644
--- a/src/sksl/SkSLIRGenerator.h
+++ b/src/sksl/SkSLIRGenerator.h
@@ -81,13 +81,10 @@ public:
IRGenerator(const Context* context, std::shared_ptr<SymbolTable> root,
ErrorReporter& errorReporter);
- std::unique_ptr<VarDeclarations> convertVarDeclarations(const ASTVarDeclarations& decl,
- Variable::Storage storage);
- std::unique_ptr<FunctionDefinition> convertFunction(const ASTFunction& f);
- std::unique_ptr<Statement> convertStatement(const ASTStatement& statement);
- std::unique_ptr<Expression> convertExpression(const ASTExpression& expression);
- std::unique_ptr<ModifiersDeclaration> convertModifiersDeclaration(
- const ASTModifiersDeclaration& m);
+ void convertProgram(String text,
+ SymbolTable& types,
+ Modifiers::Flag* defaultPrecision,
+ std::vector<std::unique_ptr<ProgramElement>>* result);
/**
* If both operands are compile-time constants and can be folded, returns an expression
@@ -115,6 +112,15 @@ private:
void pushSymbolTable();
void popSymbolTable();
+ std::unique_ptr<VarDeclarations> convertVarDeclarations(const ASTVarDeclarations& decl,
+ Variable::Storage storage);
+ void convertFunction(const ASTFunction& f,
+ std::vector<std::unique_ptr<ProgramElement>>* out);
+ std::unique_ptr<Statement> convertStatement(const ASTStatement& statement);
+ std::unique_ptr<Expression> convertExpression(const ASTExpression& expression);
+ std::unique_ptr<ModifiersDeclaration> convertModifiersDeclaration(
+ const ASTModifiersDeclaration& m);
+
const Type* convertType(const ASTType& type);
std::unique_ptr<Expression> call(Position position,
const FunctionDeclaration& function,
@@ -163,6 +169,9 @@ private:
std::unique_ptr<Expression> convertTernaryExpression(const ASTTernaryExpression& expression);
std::unique_ptr<Statement> convertVarDeclarationStatement(const ASTVarDeclarationStatement& s);
std::unique_ptr<Statement> convertWhile(const ASTWhileStatement& w);
+ std::unique_ptr<Block> applyInvocationIDWorkaround(
+ std::unique_ptr<Block> main,
+ std::vector<std::unique_ptr<ProgramElement>>* out);
void fixRectSampling(std::vector<std::unique_ptr<Expression>>& arguments);
void checkValid(const Expression& expr);
@@ -175,6 +184,7 @@ private:
int fLoopLevel;
int fSwitchLevel;
ErrorReporter& fErrors;
+ int fInvocations;
friend class AutoSymbolTable;
friend class AutoLoopLevel;