John Kessenich | 6a4a427 | 2018-04-02 14:52:15 -0600 | [diff] [blame] | 1 | #version 450 core
|
| 2 |
|
| 3 | buffer bn {
|
| 4 | int a[];
|
| 5 | float b[];
|
| 6 | } buf;
|
| 7 |
|
| 8 | uniform un {
|
| 9 | int a[];
|
| 10 | float b[];
|
| 11 | } ubuf;
|
| 12 |
|
| 13 | buffer bna {
|
| 14 | int a[];
|
| 15 | float b[];
|
| 16 | } bufa[4];
|
| 17 |
|
| 18 | uniform una {
|
| 19 | int a[];
|
| 20 | float b[];
|
| 21 | } ubufa[4];
|
| 22 |
|
| 23 | buffer abn {
|
| 24 | int aba[];
|
| 25 | float abb[];
|
| 26 | };
|
| 27 |
|
| 28 | uniform aun {
|
| 29 | int aua[];
|
| 30 | float aub[];
|
| 31 | };
|
| 32 |
|
John Kessenich | 5611c6d | 2018-04-05 11:25:02 -0600 | [diff] [blame] | 33 | layout(binding=1) uniform samplerBuffer uniformTexelBufferDyn[];
|
| 34 | layout(binding=2, r32f) uniform imageBuffer storageTexelBufferDyn[];
|
| 35 | layout(binding=3) uniform uname { float a; } uniformBuffer[];
|
| 36 | layout(binding=4) buffer bname { float b; } storageBuffer[];
|
| 37 | layout(binding=5) uniform sampler2D sampledImage[];
|
| 38 | layout(binding=6, r32f) uniform image2D storageImage[];
|
| 39 | layout(binding=8) uniform samplerBuffer uniformTexelBuffer[];
|
| 40 | layout(binding=9, r32f) uniform imageBuffer storageTexelBuffer[];
|
| 41 |
|
John Kessenich | 6a4a427 | 2018-04-02 14:52:15 -0600 | [diff] [blame] | 42 | int i;
|
| 43 |
|
| 44 | void main()
|
| 45 | {
|
| 46 | ubuf.a[3];
|
| 47 | ubuf.b[3];
|
| 48 | buf.a[3];
|
| 49 | buf.b[3];
|
| 50 |
|
| 51 | ubufa[3].a[3];
|
| 52 | ubufa[3].b[3];
|
| 53 | bufa[3].a[3];
|
| 54 | bufa[3].b[3];
|
| 55 |
|
| 56 | aua[3];
|
| 57 | aub[3];
|
| 58 | aba[3];
|
| 59 | abb[3];
|
| 60 |
|
| 61 | ubuf.a[i]; // ERROR
|
| 62 | ubuf.b[i]; // ERROR
|
| 63 | buf.a[i]; // ERROR
|
| 64 | buf.b[i];
|
| 65 |
|
| 66 | ubuf.a.length(); // ERROR
|
| 67 | ubuf.b.length(); // ERROR
|
| 68 | buf.a.length(); // ERROR
|
| 69 | buf.b.length();
|
| 70 |
|
| 71 | ubufa[1].a[i]; // ERROR
|
| 72 | ubufa[1].b[i]; // ERROR
|
| 73 | bufa[1].a[i]; // ERROR
|
| 74 | bufa[1].b[i];
|
| 75 |
|
| 76 | ubufa[1].a.length(); // ERROR
|
| 77 | ubufa[1].b.length(); // ERROR
|
| 78 | bufa[1].a.length(); // ERROR
|
| 79 | bufa[1].b.length();
|
| 80 |
|
| 81 | aua[i]; // ERROR
|
| 82 | aub[i]; // ERROR
|
| 83 | aba[i]; // ERROR
|
| 84 | abb[i];
|
| 85 |
|
| 86 | aua.length(); // ERROR
|
| 87 | aub.length(); // ERROR
|
| 88 | aba.length(); // ERROR
|
| 89 | abb.length();
|
John Kessenich | 5611c6d | 2018-04-05 11:25:02 -0600 | [diff] [blame] | 90 |
|
| 91 | uniformTexelBufferDyn[1];
|
| 92 | storageTexelBufferDyn[1];
|
| 93 | uniformBuffer[1];
|
| 94 | storageBuffer[1];
|
| 95 | sampledImage[1];
|
| 96 | storageImage[1];
|
| 97 | uniformTexelBuffer[1];
|
| 98 | storageTexelBuffer[1];
|
| 99 |
|
| 100 | uniformTexelBufferDyn[i]; // ERROR, need extension
|
| 101 | storageTexelBufferDyn[i]; // ERROR, need extension
|
| 102 | uniformBuffer[i]; // ERROR, need extension
|
| 103 | storageBuffer[i]; // ERROR, need extension
|
| 104 | sampledImage[i]; // ERROR, need extension
|
| 105 | storageImage[i]; // ERROR, need extension
|
| 106 | uniformTexelBuffer[i]; // ERROR, need extension
|
| 107 | storageTexelBuffer[i]; // ERROR, need extension
|
John Kessenich | b4cb70f | 2018-04-23 15:18:42 -0600 | [diff] [blame] | 108 |
|
| 109 | float local[] = ubuf.b; // ERROR, can initialize with runtime-sized array
|
John Kessenich | 6a4a427 | 2018-04-02 14:52:15 -0600 | [diff] [blame] | 110 | }
|