diff options
author | Hans-Kristian Arntzen <hans-kristian.arntzen@arm.com> | 2018-09-18 11:58:24 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <hans-kristian.arntzen@arm.com> | 2018-09-18 12:01:15 +0300 |
commit | a985ac9499ca411d6b45517ca9f75a7cac61acfe (patch) | |
tree | 1560cde1749d4ea91530899bb7f82ed9b2da52ff /shaders | |
parent | de365f2e21c624daef3eabfc9adb1ef59c40402c (diff) |
Add test case for continue out of switch default block.
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/frag/loop-dominator-and-switch-default.frag | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/shaders/frag/loop-dominator-and-switch-default.frag b/shaders/frag/loop-dominator-and-switch-default.frag new file mode 100644 index 00000000..344d895b --- /dev/null +++ b/shaders/frag/loop-dominator-and-switch-default.frag @@ -0,0 +1,34 @@ +#version 310 es +precision mediump float; + +layout(location = 0) out vec4 fragColor; + +void main() +{ + vec4 f4; + int c = int(f4.x); + + for (int j = 0; j < c; j++) + { + switch (c) + { + case 0: + f4.y = 0.0; + break; + case 1: + f4.y = 1.0; + break; + default: + { + int i = 0; + while (i++ < c) { + f4.y += 0.5; + } + continue; + } + } + f4.y += 0.5; + } + + fragColor = f4; +} |