skia2/tests/sksl/inliner/StaticSwitch.glsl
John Stiles c3ce43be8e Replace the vector<Statement> in SwitchCase with a Block.
Change-Id: Ic2d1240ab785101365b0fd934562505fb5a3e599
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381816
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-03-09 20:46:10 +00:00

24 lines
424 B
GLSL

out vec4 sk_FragColor;
uniform vec4 colorGreen;
uniform vec4 colorRed;
vec4 main() {
float _0_get;
for (int _1_loop = 0;_1_loop < 1; _1_loop++) {
{
{
_0_get = abs(2.0);
continue;
}
}
{
_0_get = abs(5.0);
continue;
}
}
float result = _0_get;
return result == 2.0 ? colorGreen : colorRed;
}