spirv: Allow variable pointers pointing to an array of blocks

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: mesa-stable
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8864>
(cherry picked from commit 568a668259)
This commit is contained in:
Caio Marcelo de Oliveira Filho 2021-02-03 20:58:31 -08:00 committed by Dylan Baker
parent 40f3ce141a
commit e28d43f108
2 changed files with 2 additions and 4 deletions

View file

@ -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
},

View file

@ -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);