GLSL: Fix #853: Only outer dimension of array can be specialization constant.

This commit is contained in:
John Kessenich
2017-06-08 12:26:49 -06:00
parent d314ecfbe3
commit 3fcb42cfa6
6 changed files with 41 additions and 19 deletions

View File

@@ -22,7 +22,11 @@ ERROR: 0:32: 'initializer' : can't use with types containing arrays sized with a
ERROR: 0:34: '=' : can't use with types containing arrays sized with a specialization constant
ERROR: 0:35: '==' : can't use with types containing arrays sized with a specialization constant
ERROR: 0:39: 'set' : cannot be used with push_constant
ERROR: 23 compilation errors. No code generated.
ERROR: 0:49: '[]' : only outermost dimension of an array of arrays can be a specialization constant
ERROR: 0:50: '[]' : only outermost dimension of an array of arrays can be a specialization constant
ERROR: 0:51: '[]' : only outermost dimension of an array of arrays can be a specialization constant
ERROR: 0:54: '[]' : only outermost dimension of an array of arrays can be a specialization constant
ERROR: 27 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@@ -45,3 +45,16 @@ layout(set = 1, push_constant) uniform badpc { int a; } badpcI; // ERROR, no de
#if VULKAN != 100
#error VULKAN should be 100
#endif
float AofA0[2][arraySize]; // ERROR, only outer dimension
float AofA1[arraySize][arraySize]; // ERROR, only outer dimension
float AofA2[arraySize][2 + arraySize]; // ERROR, only outer dimension
float AofA3[arraySize][2];
out ban1 { // ERROR, only outer dimension
float f;
} bai1[2][arraySize];
out ban2 {
float f;
} bai2[arraySize][2];