yum-mirror/glslang

git clone https://git.yummers.dev/yum-mirror/glslang

Zackery Mason-BlaugFix several issues with link-time implicit array size mergingfd433938

main
1.4 KiB42 linesraw
1#version 460
2
3// explicitly sized in earlier stage, unsized and statically indexed with larger index in later stage
4// error: array is indexed with index (6) greater than its size (3)
5uniform sampler2D s[3];
6
7// unsized and statically indexed in earlier stage, explicitly sized with smaller index (but not indexed) in later stage
8// error: array is indexed with index (20) greater than its size (2)
9uniform U0 {
10    vec4 a[];
11} u0;
12
13// explicitly sized in earlier stage, unsized and statically indexed with larger index in later stage
14// error: array is indexed with index (12) greater than its size (5)
15uniform U1 {
16    vec4 a[5];
17} u1;
18
19// explicitly sized (3) and not indexed in earlier stage, explicitly sized with different size (5) and not indexed in later stage
20// error: array size in earlier stage (3) does not array size in later stage (5)
21buffer B0 {
22    vec4 a[3];
23} b0;
24
25// explicitly sized in earlier stage, unsized and statically indexed with larger index in later stage
26// error: array is indexed with index (4) greater than its size (3)
27buffer B1 {
28    vec4 a[3];
29} b1;
30
31// explicitly sized in earlier stage, unsized and statically indexed with larger index in later stage
32// error: array is indexed with index (4) greater than its size (2)
33buffer B2 {
34    vec4 a[];
35} b2[];
36
37out vec4 out_VS;
38
39void main() {
40    out_VS = u0.a[20];
41    out_VS = b2[4].a[0];
42}