John Kessenich | 6c292d3 | 2016-02-15 20:58:50 -0700 | [diff] [blame] | 1 | #version 450
|
| 2 |
|
| 3 | layout(input_attachment_index = 2) uniform subpassInput subD1; // ERROR, not this stage
|
| 4 | layout(input_attachment_index = 2) uniform isubpassInput subD2; // ERROR, not this stage
|
| 5 | layout(input_attachment_index = 2) uniform usubpassInput subD3; // ERROR, not this stage
|
| 6 | layout(input_attachment_index = 2) uniform subpassInputMS subD4; // ERROR, not this stage
|
| 7 | layout(input_attachment_index = 2) uniform isubpassInputMS subD5; // ERROR, not this stage
|
| 8 | layout(input_attachment_index = 2) uniform usubpassInputMS subD6; // ERROR, not this stage
|
| 9 |
|
| 10 | out vec4 color;
|
| 11 |
|
| 12 | layout(constant_id = 17) const ivec2 arraySizes = ivec2(12,13); // ERROR, not a scalar
|
| 13 | layout(constant_id = 17) uniform sampler2D s2D; // ERROR, not the right type or qualifier
|
| 14 | layout(constant_id = 4000) const int c1 = 12; // ERROR, too big
|
| 15 | layout(constant_id = 4) const float c2[2] = float[2](1.0, 2.0); // ERROR, not a scalar
|
| 16 | layout(constant_id = 4) in;
|
| 17 |
|
| 18 | void main()
|
| 19 | {
|
| 20 | color = subpassLoad(subD1); // ERROR, no such function in this stage
|
| 21 | }
|
| 22 |
|
| 23 | layout(binding = 0) uniform atomic_uint aui; // ERROR, no atomics in Vulkan
|
| 24 | layout(shared) uniform ub1n { int a; } ub1i; // ERROR, no shared
|
| 25 | layout(packed) uniform ub2n { int a; } ub2i; // ERROR, no packed
|
| 26 |
|
| 27 | layout(constant_id=222) const int arraySize = 4;
|
| 28 |
|
| 29 | void foo()
|
| 30 | {
|
| 31 | int a1[arraySize];
|
| 32 | int a2[arraySize] = a1; // ERROR, can't use in initializer
|
| 33 |
|
| 34 | a1 = a2; // ERROR, can't assign, even though the same type
|
| 35 | if (a1 == a2) // ERROR, can't compare either
|
| 36 | ++color;
|
John Kessenich | f7497e2 | 2016-03-08 21:36:22 -0700 | [diff] [blame] | 37 | }
|
| 38 |
|
| 39 | layout(set = 1, push_constant) uniform badpc { int a; } badpcI; // ERROR, no descriptor set with push_constant
|
John Kessenich | e512cd9 | 2016-05-03 21:17:55 -0600 | [diff] [blame] | 40 |
|
| 41 | #ifndef VULKAN
|
| 42 | #error VULKAN should be defined
|
| 43 | #endif
|
| 44 |
|
| 45 | #if VULKAN != 100
|
| 46 | #error VULKAN should be 100
|
| 47 | #endif
|
John Kessenich | 3fcb42c | 2017-06-08 12:26:49 -0600 | [diff] [blame] | 48 |
|
Jeff Bolz | 4605e2e | 2019-02-19 13:10:32 -0600 | [diff] [blame] | 49 | float AofA0[2][arraySize];
|
| 50 | float AofA1[arraySize][arraySize];
|
| 51 | float AofA2[arraySize][2 + arraySize];
|
John Kessenich | 3fcb42c | 2017-06-08 12:26:49 -0600 | [diff] [blame] | 52 | float AofA3[arraySize][2];
|
| 53 |
|
| 54 | out ban1 { // ERROR, only outer dimension
|
| 55 | float f;
|
| 56 | } bai1[2][arraySize];
|
| 57 |
|
| 58 | out ban2 {
|
| 59 | float f;
|
| 60 | } bai2[arraySize][2];
|
John Kessenich | ac51602 | 2017-11-01 22:33:45 -0600 | [diff] [blame] | 61 |
|
| 62 | layout(binding = 3000) uniform sampler2D s3000;
|
| 63 | layout(binding = 3001) uniform b3001 { int a; };
|
John Kessenich | 0f8d43e | 2018-04-12 11:37:57 -0600 | [diff] [blame] | 64 | layout(location = 10) in vec4 in1;
|
| 65 | layout(location = 10) in vec4 in2; // ERROR, no location aliasing
|
John Kessenich | 5cb2fa2 | 2019-05-03 08:40:35 -0600 | [diff] [blame] | 66 |
|
| 67 | layout(constant_id = 400) const int nonLit = 1;
|
| 68 | layout(location = nonLit, component = nonLit) in vec4 nonLit1; // ERROR, non literal
|
| 69 | layout(binding = nonLit, set = nonLit) uniform nonLitBN { // ERROR, non literal
|
| 70 | layout(offset = nonLit) vec4 nonLit1; // ERROR, non literal
|
| 71 | layout(align = nonLit) vec4 nonLit3; // ERROR, non literal
|
| 72 | layout(xfb_offset = nonLit) vec4 nonLit4; // ERROR, non literal
|
| 73 | layout(xfb_buffer = nonLit) vec4 nonLit5; // ERROR, non literal
|
| 74 | layout(xfb_stride = nonLit) vec4 nonLit6; // ERROR, non literal
|
| 75 | } nonLitBI;
|
| 76 | layout(input_attachment_index = nonLit) vec4 nonLit3; // ERROR, non literal
|
| 77 | layout(constant_id = nonLit) vec4 nonLit4; // ERROR, non literal
|