skia2/tests/sksl
John Stiles acb091f71d Avoid emitting duplicate constant values in SPIR-V.
Previously, we had constant-value deduplication, based on the SkSL type
of the constant. However, we were still generating redundant constants,
because we would emit a separate constant for Float(n) and Half(n), or
Int(n) and Short(n), even though we generate the exact same instruction
for these constants. We now deduplicate based on the type's number-kind,
separating constant literals into three categories: floats, signed ints,
and unsigned ints. This better matches our type-handling in
getActualType.

Change-Id: I5777d4b3d567839b7aa72dc8de76908c18fc387e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350031
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-06 18:27:10 +00:00
..
blend Add support for inlining switches with returns inside. 2020-12-18 00:14:48 +00:00
errors Runtime effects: Disallow bitwise ops and integer remainder 2021-01-06 14:05:59 +00:00
fp Make all fragmentProcessors implicitly nullable in SkSL 2020-12-23 20:22:18 +00:00
glsl Replace array indexing on vector types with swizzles. 2020-12-07 21:16:40 +00:00
inliner Elide return expression temp-var in vardecl-less blocks. 2020-12-22 19:33:12 +00:00
intrinsics Fix type error with Metal mod(vec, float) intrinsic. 2021-01-05 18:07:04 +00:00
metal Add support for number(boolean) and boolean(number) casts in SkSL. 2021-01-05 21:19:45 +00:00
runtime Add SkVM support for conversion constructors to and from boolean. 2021-01-06 15:23:09 +00:00
shared Avoid emitting duplicate constant values in SPIR-V. 2021-01-06 18:27:10 +00:00
spirv Fix SPIRV bug constructing a constant vector from another vector 2020-12-23 21:14:48 +00:00
workarounds Eliminate inliner temporary variables for top-level-exit functions. 2020-12-17 20:37:21 +00:00