skia2/tests/sksl/shared/InoutParamsAreDistinct.glsl
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

14 lines
307 B
GLSL

out vec4 sk_FragColor;
uniform vec4 colorGreen;
uniform vec4 colorRed;
bool inout_params_are_distinct_bhh(inout float x, inout float y) {
x = 1.0;
y = 2.0;
return x == 1.0 && y == 2.0;
}
vec4 main() {
float x = 0.0;
return inout_params_are_distinct_bhh(x, x) ? colorGreen : colorRed;
}