support 2 immediates
We support ops with up three arguments today, all three of which can be
registers, or one can be an immediate. Extend this to allow up to two
immediates, fitting the uniform?? ops much better than my old 16-bit
hack.
(The next thing on my mind is adding Op::extract_imm where both the
shift and now too the mask are known to be immediates.)
This refactor lets me straighten out the kinks of some ops, mainly the
uniform?? ops and extract. Things should generally now use x,y,z in
that order: most of the old immediates are now immy, and we use immz
only where we've already used the y register or immy immediate.
Small renaming isImm() -> isSplat(). I think this helps mutually
distinguish splat instructions, constants held by skvm instructions
(immy,immz), and constants as used by the JIT or assembler (still
generally `imm`).
Change-Id: I540a22a01459a39a499801362023ced7f2d6f49c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255538
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2 files changed