File: implicitArraySizeUniform.vert

package info (click to toggle)
glslang 16.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,084 kB
  • sloc: cpp: 90,714; yacc: 4,243; sh: 603; python: 305; ansic: 94; javascript: 74; makefile: 17
file content (53 lines) | stat: -rw-r--r-- 1,542 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#version 460

#extension GL_EXT_nonuniform_qualifier : require

// unsized and not indexed in either stage
// both should become implicitly sized to 1
uniform float f0[];

// unsized and not indexed in earlier stage, unsized and dynamically indexed in later stage
// both should become runtime sized
uniform sampler2D s0[];

// unsized and dynamically indexed in earlier stage, unsized and not indexed in later stage
// both should become runtime sized
uniform sampler2D s1[];

// unsized and statically indexed in earlier stage, unsized and not indexed in later stage
// both should become implicitly sized to highest index + 1 (11)
uniform U0 {
    vec4 a[];
} u0;

// unsized and not indexed in earlier stage, unsized and statically indexed in later stage
// both should become implicitly sized to highest index + 1 (7)
uniform U1 {
    vec4 a[];
} u1;

// unsized buffer array, statically indexed in earlier stage, not indexed in later stage
// both should become implicitly sized to highest index + 1 (10)
buffer B0 {
    vec4 a;
} b0[];

// unsized and statically indexed in earlier stage, explicitly sized in later stage
// should adopt explicit size (11)
buffer B1 {
    vec4 a[];
} b1;

// unsized and not indexed in earlier stage, unsized and dynamically indexed in later stage
// both should become runtime sized
buffer B2 {
    vec4 a[];
} b2;

out vec4 out_VS;

void main() {
    out_VS = texture(s1[nonuniformEXT(0)], vec2(0));
    out_VS = u0.a[10];
    out_VS = b1.a[5];
}