115645ee9b
This CL only handles a subset of our intrinsics. In particular, it avoids changing the behavior of `sqrt` as many of our tests use sqrt as an optimization barrier. The transcendental test inputs are intentionally kept very simple to avoid putting numbers in the test outputs which could round differently on various platforms and cause Housekeeper to complain. Change-Id: I539f918294332310dcd6fe12fab163c0b6216f65 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405398 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
16 lines
694 B
Plaintext
16 lines
694 B
Plaintext
uniform half4 testInputs; // equals (-1.25, 0, 0.75, 2.25)
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
half4 main(float2 coords) {
|
|
const half4 constVal = half4(-1.25, 0, 0.75, 2.25);
|
|
half4 expected = half4(-2, 0, 0, 2);
|
|
return (floor(testInputs.x) == expected.x &&
|
|
floor(testInputs.xy) == expected.xy &&
|
|
floor(testInputs.xyz) == expected.xyz &&
|
|
floor(testInputs.xyzw) == expected.xyzw &&
|
|
floor(constVal.x) == expected.x &&
|
|
floor(constVal.xy) == expected.xy &&
|
|
floor(constVal.xyz) == expected.xyz &&
|
|
floor(constVal.xyzw) == expected.xyzw) ? colorGreen : colorRed;
|
|
}
|