Fix #2191: Error check for indexing reference containing unsize array.

This commit is contained in:
John Kessenich
2020-05-01 08:19:59 -06:00
parent 2ac3c5b6d6
commit b5f003d7a3
3 changed files with 20 additions and 6 deletions

View File

@@ -14,12 +14,15 @@ ERROR: 0:14: 'buffer_reference' : can only be used with buffer
ERROR: 0:14: 'buffer_reference' : can only be used with buffer
ERROR: 0:30: 'length' : array must be declared with a size before using this method
ERROR: 0:31: 'length' : array must be declared with a size before using this method
ERROR: 0:35: '=' : cannot convert from 'layout( column_major std430) buffer reference' to ' temp reference'
ERROR: 0:40: 'assign' : cannot convert from 'layout( column_major std430) buffer reference' to 'layout( column_major std430) buffer reference'
ERROR: 0:32: 'buffer reference indexing' : required extension not requested: GL_EXT_buffer_reference2
ERROR: 0:32: '' : cannot index reference to buffer containing an unsized array
ERROR: 0:32: '' : cannot index buffer reference
ERROR: 0:36: '=' : cannot convert from 'layout( column_major std430) buffer reference' to ' temp reference'
ERROR: 0:41: 'assign' : cannot convert from 'layout( column_major std430) buffer reference' to 'layout( column_major std430) buffer reference'
ERROR: 0:42: 'assign' : cannot convert from 'layout( column_major std430) buffer reference' to 'layout( column_major std430) buffer reference'
ERROR: 0:45: '' : syntax error, unexpected LEFT_BRACE, expecting COMMA or SEMICOLON
ERROR: 20 compilation errors. No code generated.
ERROR: 0:43: 'assign' : cannot convert from 'layout( column_major std430) buffer reference' to 'layout( column_major std430) buffer reference'
ERROR: 0:46: '' : syntax error, unexpected LEFT_BRACE, expecting COMMA or SEMICOLON
ERROR: 23 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@@ -29,6 +29,7 @@ void f()
bufType6 b;
b.x.length();
b4.b6.x.length();
b[2]; // ERROR, can't index due to unsized array
}
void main() {