aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLSPIRVCodeGenerator.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-02-07 17:28:31 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-09 14:48:18 +0000
commit6f223283661c1ddc4a5334d2464804c6b6ba3ffa (patch)
treeea9a73a68bc283bea25ed317c870668ab99f1823 /src/sksl/SkSLSPIRVCodeGenerator.h
parent9eae62c039304b4c315d0ba343c7cb209221cf45 (diff)
skslc type constructor cleanups
BUG=skia: Change-Id: I87108b5e107419d99c996ef032eda512a68451ab Reviewed-on: https://skia-review.googlesource.com/8117 Commit-Queue: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/sksl/SkSLSPIRVCodeGenerator.h')
-rw-r--r--src/sksl/SkSLSPIRVCodeGenerator.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.h b/src/sksl/SkSLSPIRVCodeGenerator.h
index 562bf279e9..fad7e31d80 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.h
+++ b/src/sksl/SkSLSPIRVCodeGenerator.h
@@ -147,7 +147,21 @@ private:
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);