diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/link_uniform_blocks.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/glsl/link_uniform_blocks.cpp b/src/compiler/glsl/link_uniform_blocks.cpp index ba01269c078..839fd07fa4b 100644 --- a/src/compiler/glsl/link_uniform_blocks.cpp +++ b/src/compiler/glsl/link_uniform_blocks.cpp @@ -146,7 +146,13 @@ private: */ const glsl_type *type_for_size = type; if (type->is_unsized_array()) { - assert(last_field); + if (!last_field) { + linker_error(prog, "unsized array `%s' definition: " + "only last member of a shader storage block " + "can be defined as unsized array", + name); + } + type_for_size = type->without_array(); } |