2de947e780
This test fell into disrepair when constant propagation was removed; it assumed that @if and @switch would work on all unchanging variables, not just those with the `const` modifier. Change-Id: Ie9c1816f9c0852fdea998e4e156047e4cca9ad5b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395000 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>
57 lines
1.1 KiB
GLSL
57 lines
1.1 KiB
GLSL
|
|
out vec4 sk_FragColor;
|
|
void main() {
|
|
{
|
|
sk_FragColor = vec4(1.0);
|
|
}
|
|
{
|
|
sk_FragColor = vec4(2.0);
|
|
}
|
|
{
|
|
sk_FragColor = vec4(6.0);
|
|
}
|
|
sk_FragColor = vec4(7.0);
|
|
sk_FragColor = vec4(-8.0);
|
|
sk_FragColor = vec4(-9.0);
|
|
sk_FragColor = vec4(10.0);
|
|
{
|
|
sk_FragColor = vec4(11.0);
|
|
}
|
|
{
|
|
sk_FragColor = vec4(13.0);
|
|
}
|
|
{
|
|
sk_FragColor = vec4(15.0);
|
|
}
|
|
{
|
|
sk_FragColor = vec4(16.0);
|
|
}
|
|
{
|
|
sk_FragColor = vec4(18.0);
|
|
}
|
|
sk_FragColor = vec4(19.0);
|
|
sk_FragColor = vec4(20.0);
|
|
{
|
|
sk_FragColor = vec4(21.0);
|
|
}
|
|
int f = 1;
|
|
if (f == 1) {
|
|
sk_FragColor = vec4(1.0);
|
|
}
|
|
if (f != 1) {
|
|
sk_FragColor = vec4(4.0);
|
|
}
|
|
sk_FragColor = f == 0 ? vec4(7.0) : vec4(-7.0);
|
|
sk_FragColor = f != 0 ? vec4(8.0) : vec4(-8.0);
|
|
sk_FragColor = f == 1 ? vec4(9.0) : vec4(-9.0);
|
|
sk_FragColor = f != 1 ? vec4(10.0) : vec4(-10.0);
|
|
switch (f) {
|
|
case 0:
|
|
sk_FragColor = vec4(11.0);
|
|
break;
|
|
case 1:
|
|
sk_FragColor = vec4(12.0);
|
|
break;
|
|
}
|
|
}
|