skia2/resources/sksl/shared/InoutParamsAreDistinct.sksl
John Stiles 674eb326f4 Improve distinct-out-param test cases.
Added new aliasing tests inspired by syoussefi@'s ANGLE changes at
http://go/crrv/c/3561278.

Change-Id: Ifa312faa9503b211b7c09edd2abd5087ead35e5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526018
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-03-30 18:49:15 +00:00

13 lines
266 B
Plaintext

uniform half4 colorGreen, colorRed;
bool inout_params_are_distinct(inout half x, inout half y) {
x = 1;
y = 2;
return x == 1 && y == 2;
}
half4 main(float2 coords) {
half x = 0;
return inout_params_are_distinct(x, x) ? colorGreen : colorRed;
}