skia2/tests/sksl
John Stiles 8318cc9928 Update opcode canonicalization logic in SkVM.
Previously, our ID canonicalization was simply "lower ID numbers before
higher ID numbers" and was done separately at every opcode by taking
the min and max of (x.id, y.id).

Now, this logic is factored out into a helper function
`canonicalizeIdOrder` and has two rules:
- Immediate values go last; that is, "x + 1" instead of "1 + x".
- If both/neither are immediate, lower IDs before higher IDs (as
  before)

This change lets us remove a lot of simplification logic. We no longer
need to check for both `x + 0` and `0 + x` when removing no-op
arithmetic; now we can be certain that the immediate will always come
last, so just checking for `x + 0` is sufficient.

Change-Id: I66cc5c23bba414041c0bc556521d3db57fac504d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524222
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-03-24 19:14:51 +00:00
..
blend [sksl] Special-case unary negation on matrix types in MSL/SPIR-V 2022-03-01 20:14:46 +00:00
errors Added position tracking for SkSL Modifiers 2022-03-23 20:45:39 +00:00
folding [sksl][test] Add more folding tests for side-effecting expressions 2022-03-10 18:06:12 +00:00
glsl Move backend-specific error tests out of errors/ test folder. 2022-02-08 14:18:46 +00:00
inliner In SkSL tests, don't force opaque output 2022-02-03 17:25:35 +00:00
intrinsics Use unordered comparisons for != in SPIR-V. 2022-02-25 22:22:43 +00:00
metal Reland "Add support for half-precision types in Metal." 2021-10-30 14:33:52 +00:00
runtime Update opcode canonicalization logic in SkVM. 2022-03-24 19:14:51 +00:00
runtime_errors Reject equality operators on opaque types. 2022-03-07 15:19:46 +00:00
shared [sksl] Special-case unary negation on matrix types in MSL/SPIR-V 2022-03-01 20:14:46 +00:00
spirv Fixed a past-the-end error location in SPIR-V output 2022-03-16 21:54:21 +00:00
workarounds Use $ prefix on built-in private functions. 2022-01-25 15:21:42 +00:00
README.txt Migrate SkSL test inputs to the resources/ directory. 2021-01-22 18:57:29 +00:00

This directory contains skslc-compiled output from matching source files
in the /resources/sksl/ directory.