summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2015-06-10 19:40:07 +1000
committerTimothy Arceri <[email protected]>2015-06-13 08:31:21 +1000
commit0d2068a92d74f421960947e589cf56a2b125035f (patch)
tree43366a9424b646f5e97435802ce822fbcd599ea8 /src/glsl
parent94d669b0d2f56d58a494a40f9e8acdef01306496 (diff)
glsl: enforce restriction on AoA interface blocks in GLSL ES 3.10
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ast_to_hir.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 1c2c7b56efa..a7811af5d0f 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -5847,6 +5847,17 @@ ast_interface_block::hir(exec_list *instructions,
const glsl_type *block_array_type =
process_array_type(&loc, block_type, this->array_specifier, state);
+ /* From section 4.3.9 (Interface Blocks) of the GLSL ES 3.10 spec:
+ *
+ * * Arrays of arrays of blocks are not allowed
+ */
+ if (state->es_shader && block_array_type->is_array() &&
+ block_array_type->fields.array->is_array()) {
+ _mesa_glsl_error(&loc, state,
+ "arrays of arrays interface blocks are "
+ "not allowed");
+ }
+
var = new(state) ir_variable(block_array_type,
this->instance_name,
var_mode);