From 568a66825912d17d5a1a7f9a0dea188c079c51fc Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Wed, 3 Feb 2021 20:58:31 -0800 Subject: [PATCH] spirv: Allow variable pointers pointing to an array of blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Jason Ekstrand Cc: mesa-stable Tested-by: Tapani Pälli Part-of: --- src/compiler/spirv/vtn_variables.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index ae0f8a9cba7..a7f9e8ad23d 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -232,10 +232,8 @@ vtn_variable_resource_index(struct vtn_builder *b, struct vtn_variable *var, { vtn_assert(b->options->environment == NIR_SPIRV_VULKAN); - if (!desc_array_index) { - vtn_assert(var->type->base_type != vtn_base_type_array); + if (!desc_array_index) desc_array_index = nir_imm_int(&b->nb, 0); - } if (b->vars_used_indirectly) { vtn_assert(var->var);