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

13 lines
288 B
GLSL

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