diff options
Diffstat (limited to 'tests/glslparsertest/shaders/array12.frag')
-rw-r--r-- | tests/glslparsertest/shaders/array12.frag | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/glslparsertest/shaders/array12.frag b/tests/glslparsertest/shaders/array12.frag new file mode 100644 index 000000000..6a1534e03 --- /dev/null +++ b/tests/glslparsertest/shaders/array12.frag @@ -0,0 +1,16 @@ +// [config] +// expect_result: fail +// glsl_version: 1.20 +// check_link: false +// [end config] +// +// Verify that out-of-bounds access to an array using a constant expression +// results in to compile error. + +float array[5]; +const int idx = 8; + +void main() +{ + gl_FragColor = vec4(0.0, 1.0, 0.0, array[idx]); +} |