diff options
Diffstat (limited to 'src/compiler/glsl/tests/warnings/019-array.vert')
-rw-r--r-- | src/compiler/glsl/tests/warnings/019-array.vert | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/compiler/glsl/tests/warnings/019-array.vert b/src/compiler/glsl/tests/warnings/019-array.vert new file mode 100644 index 00000000000..43d7f4c0399 --- /dev/null +++ b/src/compiler/glsl/tests/warnings/019-array.vert @@ -0,0 +1,23 @@ +#version 130 + +void main() +{ + int undefinedIndex; + int undefinedIndex2; + int definedIndex = 2; + int definedIndex2 = 2; + float array[4]; + float fooPos; + int fooLength; + + fooPos = array[undefinedIndex]; + fooPos = array[definedIndex]; + + fooPos = array[definedIndex+definedIndex2]; + fooPos = array[undefinedIndex+undefinedIndex2]; + array[0] = 10.0; + fooPos = array[definedIndex]; + + array[undefinedIndex2] = array[undefinedIndex]; +} + |