[Mesa-dev] [PATCH 17/24] glsl: disable interface block AoA

Timothy Arceri t_arceri at yahoo.com.au
Thu Sep 17 00:03:01 PDT 2015


Desktop GL supports interface block AoA however AMD and Nvidia
dont support it in their drivers curently so we can get away
with disabling it for now.

V2: make error message more clear that this is a fault in Mesa and
not with the application
---
 src/glsl/ast_to_hir.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 27fa12f..167824d 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -6260,15 +6260,17 @@ ast_interface_block::hir(exec_list *instructions,
             }
          }
 
-          /* From section 4.3.9 (Interface Blocks) of the GLSL ES 3.10 spec:
+         /* 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() &&
+         /* FIXME: Desktop GL allows interface AoA */
+         if (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");
+                             "arrays of arrays interface blocks are %s",
+                             state->es_shader ? "not allowed" :
+                             "valid but not currently supported in Mesa");
          }
 
          if (this->layout.flags.q.explicit_binding)
-- 
2.4.3



More information about the mesa-dev mailing list