From e28d43f10814e57d178c0811b76b1890ba9b3131 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: (cherry picked from commit 568a66825912d17d5a1a7f9a0dea188c079c51fc) --- .pick_status.json | 2 +- src/compiler/spirv/vtn_variables.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 19a724aeae9..fb0da2cea21 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1255,7 +1255,7 @@ "description": "spirv: Allow variable pointers pointing to an array of blocks", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 1481e6b4e57..9f216158943 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);