[Mesa-dev] [RFC PATCH 09/13] nir/spirv: only expose interface type for arrays of interface blocks

Alejandro PiƱeiro apinheiro at igalia.com
Sat Dec 8 11:48:17 UTC 2018


In the same way that just a struct is not a interface block, and array
of structs is not an array of interface blocks.

At least at the NIR level.
---
 src/compiler/spirv/vtn_variables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 6d7d5dfc691..a8f2fdfa534 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1860,7 +1860,7 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val,
        */
 
       struct vtn_type *interface_type = var->type;
-      if (!var->patch && glsl_type_is_array(var->type->type)) {
+      if (!var->patch && glsl_type_is_array(var->type->type) && var->type->array_element->block) {
          /* On Vulkan, Geometry shaders and some Tessellation, some inputs
           * come in per-vertex arrays, so we need to check for arrays. On
           * OpenGL we have the same, plus the possibility of user-defined
-- 
2.19.1



More information about the mesa-dev mailing list