Interpreter: Fix construction of Matrices
Per GLSL, constructing a matrix from a scalar produces a matrix
with the scalar value along the diagonal, and zero elsewhere.
Constructing a matrix from another matrix copies the overlapping
values, and fills in the remainder with the identity matrix.
Doing either of these with existing opcodes was going to be quite
verbose and tricky, so I just made new opcodes.
I've also got some (currently disabled) test cases for other
matrix behavior, all of which fail in various ways today.
Change-Id: Ia86a183395f1ac7e2f23ee1d6bb4af461f5ba93a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215823
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
4 files changed