skia2/tests/sksl/intrinsics
John Stiles 1f0dc9cd1b Update SkSL type priorities to differentiate signed/unsigned types.
Previously, coercion between a signed type and an unsigned type was
treated as "no cost" because these types shared the exact same priority.
This meant that we couldn't choose the proper overload with function
calls that only differed in signed-ness, like:

  void fn(int4 x);
  void fn(uint4 x);

So we would always choose the int4 version since we encountered it
first. Now, we can choose the correct overload; signed types now have
a slightly elevated priority over unsigned types, allowing coercion
costs to work normally.

Also added some comments to `determineFinalTypes` while trying to see
if that needed some improvements as well, but this turned out to be
a red herring--it didn't need any functional changes.

Change-Id: I334debae9ad0e9b290109658d2fde8f6526770a2
Bug: skia:10999
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344017
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-12-14 17:29:23 +00:00
..
golden Update SkSL type priorities to differentiate signed/unsigned types. 2020-12-14 17:29:23 +00:00
Abs.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Acos.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Acosh.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
All.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Any.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Asin.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Asinh.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Atan.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Atanh.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Ceil.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Clamp.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Cos.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Cosh.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Cross.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Degrees.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Determinant.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
DFdx.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
DFdy.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Distance.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Dot.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Equal.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Exp2.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Exp.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
FaceForward.sksl Add support for scalar faceforward intrinsic in Metal. 2020-12-11 15:29:50 +00:00
FindLSB.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
FindMSB.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
FloatBitsToInt.sksl Fix floatBitsToInt family of intrinsics and add tests. 2020-12-10 15:33:48 +00:00
FloatBitsToUint.sksl Fix floatBitsToInt family of intrinsics and add tests. 2020-12-10 15:33:48 +00:00
Floor.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Fma.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Fract.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Frexp.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Fwidth.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
GreaterThan.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
GreaterThanEqual.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
IntBitsToFloat.sksl Fix floatBitsToInt family of intrinsics and add tests. 2020-12-10 15:33:48 +00:00
Inverse.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Inversesqrt.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
IsInf.sksl Add support for isinf/isnan intrinsics to SPIR-V. 2020-12-09 22:11:27 +00:00
IsNan.sksl Add support for isinf/isnan intrinsics to SPIR-V. 2020-12-09 22:11:27 +00:00
Ldexp.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Length.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
LessThan.sksl Update SkSL type priorities to differentiate signed/unsigned types. 2020-12-14 17:29:23 +00:00
LessThanEqual.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Log2.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Log.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
MatrixCompMult.sksl Fix matrixCompMult halfNxM implementation and add unit tests. 2020-12-10 20:51:59 +00:00
Max.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Min.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Mix.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Mod.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Modf.sksl Add SPIR-V support for modf intrinsic. 2020-12-10 14:21:18 +00:00
Normalize.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Not.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
NotEqual.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Pack.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Pow.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Radians.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Reflect.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Refract.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Round.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
RoundEven.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Saturate.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Sign.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Sin.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Sinh.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Smoothstep.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Sqrt.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Step.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Tan.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Tanh.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Transpose.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
Trunc.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00
UintBitsToFloat.sksl Fix floatBitsToInt family of intrinsics and add tests. 2020-12-10 15:33:48 +00:00
Unpack.sksl Add tests for SkSL intrinsic functions. 2020-12-09 22:02:17 +00:00