aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLSPIRVCodeGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/SkSLSPIRVCodeGenerator.h')
-rw-r--r--src/sksl/SkSLSPIRVCodeGenerator.h76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.h b/src/sksl/SkSLSPIRVCodeGenerator.h
index a20ad9f40b..caae20114d 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.h
+++ b/src/sksl/SkSLSPIRVCodeGenerator.h
@@ -71,7 +71,7 @@ public:
this->setupIntrinsics();
}
- void generateCode(Program& program, std::ostream& out) override;
+ void generateCode(const Program& program, std::ostream& out) override;
private:
enum IntrinsicKind {
@@ -97,7 +97,7 @@ private:
SpvId getPointerType(const Type& type, SpvStorageClass_ storageClass);
- std::vector<SpvId> getAccessChain(Expression& expr, std::ostream& out);
+ std::vector<SpvId> getAccessChain(const Expression& expr, std::ostream& out);
void writeLayout(const Layout& layout, SpvId target);
@@ -105,9 +105,9 @@ private:
void writeStruct(const Type& type, SpvId resultId);
- void writeProgramElement(ProgramElement& pe, std::ostream& out);
+ void writeProgramElement(const ProgramElement& pe, std::ostream& out);
- SpvId writeInterfaceBlock(InterfaceBlock& intf);
+ SpvId writeInterfaceBlock(const InterfaceBlock& intf);
SpvId writeFunctionStart(const FunctionDeclaration& f, std::ostream& out);
@@ -115,78 +115,78 @@ private:
SpvId writeFunction(const FunctionDefinition& f, std::ostream& out);
- void writeGlobalVars(VarDeclaration& v, std::ostream& out);
+ void writeGlobalVars(const VarDeclaration& v, std::ostream& out);
- void writeVarDeclaration(VarDeclaration& decl, std::ostream& out);
+ void writeVarDeclaration(const VarDeclaration& decl, std::ostream& out);
- SpvId writeVariableReference(VariableReference& ref, std::ostream& out);
+ SpvId writeVariableReference(const VariableReference& ref, std::ostream& out);
- std::unique_ptr<LValue> getLValue(Expression& value, std::ostream& out);
+ std::unique_ptr<LValue> getLValue(const Expression& value, std::ostream& out);
- SpvId writeExpression(Expression& expr, std::ostream& out);
+ SpvId writeExpression(const Expression& expr, std::ostream& out);
- SpvId writeIntrinsicCall(FunctionCall& c, std::ostream& out);
+ SpvId writeIntrinsicCall(const FunctionCall& c, std::ostream& out);
- SpvId writeFunctionCall(FunctionCall& c, std::ostream& out);
+ SpvId writeFunctionCall(const FunctionCall& c, std::ostream& out);
- SpvId writeSpecialIntrinsic(FunctionCall& c, SpecialIntrinsic kind, std::ostream& out);
+ SpvId writeSpecialIntrinsic(const FunctionCall& c, SpecialIntrinsic kind, std::ostream& out);
- SpvId writeConstantVector(Constructor& c);
+ SpvId writeConstantVector(const Constructor& c);
- SpvId writeFloatConstructor(Constructor& c, std::ostream& out);
+ SpvId writeFloatConstructor(const Constructor& c, std::ostream& out);
- SpvId writeIntConstructor(Constructor& c, std::ostream& out);
+ SpvId writeIntConstructor(const Constructor& c, std::ostream& out);
- SpvId writeMatrixConstructor(Constructor& c, std::ostream& out);
+ SpvId writeMatrixConstructor(const Constructor& c, std::ostream& out);
- SpvId writeVectorConstructor(Constructor& c, std::ostream& out);
+ SpvId writeVectorConstructor(const Constructor& c, std::ostream& out);
- SpvId writeConstructor(Constructor& c, std::ostream& out);
+ SpvId writeConstructor(const Constructor& c, std::ostream& out);
- SpvId writeFieldAccess(FieldAccess& f, std::ostream& out);
+ SpvId writeFieldAccess(const FieldAccess& f, std::ostream& out);
- SpvId writeSwizzle(Swizzle& swizzle, std::ostream& out);
+ SpvId writeSwizzle(const Swizzle& swizzle, std::ostream& out);
SpvId writeBinaryOperation(const Type& resultType, const Type& operandType, SpvId lhs,
SpvId rhs, SpvOp_ ifFloat, SpvOp_ ifInt, SpvOp_ ifUInt,
SpvOp_ ifBool, std::ostream& out);
- SpvId writeBinaryOperation(BinaryExpression& expr, SpvOp_ ifFloat, SpvOp_ ifInt, SpvOp_ ifUInt,
- std::ostream& out);
+ SpvId writeBinaryOperation(const BinaryExpression& expr, SpvOp_ ifFloat, SpvOp_ ifInt,
+ SpvOp_ ifUInt, std::ostream& out);
- SpvId writeBinaryExpression(BinaryExpression& b, std::ostream& out);
+ SpvId writeBinaryExpression(const BinaryExpression& b, std::ostream& out);
- SpvId writeTernaryExpression(TernaryExpression& t, std::ostream& out);
+ SpvId writeTernaryExpression(const TernaryExpression& t, std::ostream& out);
- SpvId writeIndexExpression(IndexExpression& expr, std::ostream& out);
+ SpvId writeIndexExpression(const IndexExpression& expr, std::ostream& out);
- SpvId writeLogicalAnd(BinaryExpression& b, std::ostream& out);
+ SpvId writeLogicalAnd(const BinaryExpression& b, std::ostream& out);
- SpvId writeLogicalOr(BinaryExpression& o, std::ostream& out);
+ SpvId writeLogicalOr(const BinaryExpression& o, std::ostream& out);
- SpvId writePrefixExpression(PrefixExpression& p, std::ostream& out);
+ SpvId writePrefixExpression(const PrefixExpression& p, std::ostream& out);
- SpvId writePostfixExpression(PostfixExpression& p, std::ostream& out);
+ SpvId writePostfixExpression(const PostfixExpression& p, std::ostream& out);
- SpvId writeBoolLiteral(BoolLiteral& b);
+ SpvId writeBoolLiteral(const BoolLiteral& b);
- SpvId writeIntLiteral(IntLiteral& i);
+ SpvId writeIntLiteral(const IntLiteral& i);
- SpvId writeFloatLiteral(FloatLiteral& f);
+ SpvId writeFloatLiteral(const FloatLiteral& f);
- void writeStatement(Statement& s, std::ostream& out);
+ void writeStatement(const Statement& s, std::ostream& out);
- void writeBlock(Block& b, std::ostream& out);
+ void writeBlock(const Block& b, std::ostream& out);
- void writeIfStatement(IfStatement& stmt, std::ostream& out);
+ void writeIfStatement(const IfStatement& stmt, std::ostream& out);
- void writeForStatement(ForStatement& f, std::ostream& out);
+ void writeForStatement(const ForStatement& f, std::ostream& out);
- void writeReturnStatement(ReturnStatement& r, std::ostream& out);
+ void writeReturnStatement(const ReturnStatement& r, std::ostream& out);
void writeCapabilities(std::ostream& out);
- void writeInstructions(Program& program, std::ostream& out);
+ void writeInstructions(const Program& program, std::ostream& out);
void writeOpCode(SpvOp_ opCode, int length, std::ostream& out);