diff options
Diffstat (limited to 'tests/spec/glsl-1.30/compiler/switch-statement/switch-default.vert')
-rw-r--r-- | tests/spec/glsl-1.30/compiler/switch-statement/switch-default.vert | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.30/compiler/switch-statement/switch-default.vert b/tests/spec/glsl-1.30/compiler/switch-statement/switch-default.vert new file mode 100644 index 000000000..14f0d5392 --- /dev/null +++ b/tests/spec/glsl-1.30/compiler/switch-statement/switch-default.vert @@ -0,0 +1,24 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// [end config] +// +// From page 57 (page 63 of the PDF) of the GLSL 1.30 spec: +// +// "Otherwise, if there is a default label, execution will continue after +// that label....It is an error to have more than one default or a +// replicated constant-expression....Fall through labels are allowed, but +// it is an error to have no statement between a label and the end of the +// switch statement." + +#version 130 + +void main() { + int tmp = 0; + switch (1) { + default: + tmp = 1; + } + + gl_Position = vec4(0.0); +} |