SkSL Metal backend can now handle CCPR
Bug: skia:
Change-Id: I796a40db46174b405495af8234c5b8d7920a46d6
Reviewed-on: https://skia-review.googlesource.com/c/189985
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLMetalCodeGenerator.h b/src/sksl/SkSLMetalCodeGenerator.h
index 3ed2524..16be50f 100644
--- a/src/sksl/SkSLMetalCodeGenerator.h
+++ b/src/sksl/SkSLMetalCodeGenerator.h
@@ -107,6 +107,8 @@
};
enum MetalIntrinsic {
+ kEqual_MetalIntrinsic,
+ kNotEqual_MetalIntrinsic,
kLessThan_MetalIntrinsic,
kLessThanEqual_MetalIntrinsic,
kGreaterThan_MetalIntrinsic,
@@ -186,6 +188,8 @@
String getMatrixConstructHelper(const Type& matrix, const Type& arg);
+ void writeMatrixTimesEqualHelper(const Type& left, const Type& right, const Type& result);
+
void writeSpecialIntrinsic(const FunctionCall& c, SpecialIntrinsic kind);
bool canCoerce(const Type& t1, const Type& t2);
@@ -272,7 +276,7 @@
std::unordered_map<const FunctionDeclaration*, Requirements> fRequirements;
bool fSetupFragPositionGlobal = false;
bool fSetupFragPositionLocal = false;
- std::unordered_map<String, String> fMatrixConstructHelpers;
+ std::unordered_map<String, String> fHelpers;
int fUniformBuffer = -1;
typedef CodeGenerator INHERITED;