re-land of skslc type constructor cleanups
BUG=skia:
Change-Id: I953be07e2389dd4a9e7dcce0ddfd7505b309bda1
Reviewed-on: https://skia-review.googlesource.com/8265
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.h b/src/sksl/SkSLSPIRVCodeGenerator.h
index 562bf27..fad7e31 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.h
+++ b/src/sksl/SkSLSPIRVCodeGenerator.h
@@ -147,7 +147,21 @@
SpvId writeFloatConstructor(const Constructor& c, SkWStream& out);
SpvId writeIntConstructor(const Constructor& c, SkWStream& out);
-
+
+ /**
+ * Writes a matrix with the diagonal entries all equal to the provided expression, and all other
+ * entries equal to zero.
+ */
+ void writeUniformScaleMatrix(SpvId id, SpvId diagonal, const Type& type, SkWStream& out);
+
+ /**
+ * Writes a potentially-different-sized copy of a matrix. Entries which do not exist in the
+ * source matrix are filled with zero; entries which do not exist in the destination matrix are
+ * ignored.
+ */
+ void writeMatrixCopy(SpvId id, SpvId src, const Type& srcType, const Type& dstType,
+ SkWStream& out);
+
SpvId writeMatrixConstructor(const Constructor& c, SkWStream& out);
SpvId writeVectorConstructor(const Constructor& c, SkWStream& out);