diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-02-09 13:57:14 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-09 20:26:39 +0000 |
commit | 84645e3c679581d191406b2d7ab93c3f6c5e3a63 (patch) | |
tree | 7f8bd7445db4dbffa52e16ae78bb488ba483e2ce /src/sksl/SkSLSPIRVCodeGenerator.h | |
parent | 99dbe7b2c4996c094a440f512e9f7eb9c2708884 (diff) |
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>
Diffstat (limited to 'src/sksl/SkSLSPIRVCodeGenerator.h')
-rw-r--r-- | src/sksl/SkSLSPIRVCodeGenerator.h | 16 |
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); |