~mmach/netext73/mesa-haswell

« back to all changes in this revision

Viewing changes to src/compiler/glsl/tests/warnings/019-array.vert

  • Committer: mmach
  • Date: 2022-09-22 19:56:13 UTC
  • Revision ID: netbit73@gmail.com-20220922195613-wtik9mmy20tmor0i
2022-09-22 21:17:09

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#version 130
2
 
 
3
 
void main()
4
 
{
5
 
  int undefinedIndex;
6
 
  int undefinedIndex2;
7
 
  int definedIndex = 2;
8
 
  int definedIndex2 = 2;
9
 
  float array[4];
10
 
  float fooPos;
11
 
  int fooLength;
12
 
 
13
 
  fooPos = array[undefinedIndex];
14
 
  fooPos = array[definedIndex];
15
 
 
16
 
  fooPos = array[definedIndex+definedIndex2];
17
 
  fooPos = array[undefinedIndex+undefinedIndex2];
18
 
  array[0] = 10.0;
19
 
  fooPos = array[definedIndex];
20
 
 
21
 
  array[undefinedIndex2] = array[undefinedIndex];
22
 
}
23