summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/tests/warnings/030-array-as-function-parameter.vert
blob: 8689f07fb428403235236f11a1cb46f308a88fdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#version 130

void foo(float normalVar, out float outVar, inout float inoutVar);

void main()
{
   int undefinedIndex;
   int definedIndex = 2;
   float willBeDefined[4];

   foo(willBeDefined[undefinedIndex], willBeDefined[undefinedIndex], willBeDefined[undefinedIndex]);
   foo(willBeDefined[definedIndex], willBeDefined[definedIndex], willBeDefined[definedIndex]);
   willBeDefined[0] = 10.0;
   foo(willBeDefined[undefinedIndex], willBeDefined[undefinedIndex], willBeDefined[undefinedIndex]);
   foo(willBeDefined[definedIndex], willBeDefined[definedIndex], willBeDefined[definedIndex]);
}