From 471f260ef361282d01f15d9462933a3f3f6af4af Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 31 Aug 2020 13:01:21 -0500 Subject: [PATCH] spirv: Delete some dead workgroup variable handling code This is dead since 5ed4e31c08dc0. Reviewed-by: Boris Brezillon Part-of: --- src/compiler/spirv/vtn_private.h | 2 -- src/compiler/spirv/vtn_variables.c | 24 +----------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index 20c1f80e8f6..c67d75a6fdd 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -552,8 +552,6 @@ struct vtn_variable { */ int base_location; - int shared_location; - /** * In some early released versions of GLSLang, it implemented all function * calls by making copies of all parameters into temporary variables and diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index cbb2c5d7c29..df80fca5dae 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -502,29 +502,7 @@ vtn_ssa_offset_pointer_dereference(struct vtn_builder *b, } if (!offset) { - if (base->mode == vtn_variable_mode_workgroup) { - /* SLM doesn't need nor have a block index */ - vtn_assert(!block_index); - - /* We need the variable for the base offset */ - vtn_assert(base->var); - - /* We need ptr_type for size and alignment */ - vtn_assert(base->ptr_type); - - /* Assign location on first use so that we don't end up bloating SLM - * address space for variables which are never statically used. - */ - if (base->var->shared_location < 0) { - vtn_assert(base->ptr_type->length > 0 && base->ptr_type->align > 0); - b->shader->num_shared = vtn_align_u32(b->shader->num_shared, - base->ptr_type->align); - base->var->shared_location = b->shader->num_shared; - b->shader->num_shared += base->ptr_type->length; - } - - offset = nir_imm_int(&b->nb, base->var->shared_location); - } else if (base->mode == vtn_variable_mode_push_constant) { + if (base->mode == vtn_variable_mode_push_constant) { /* Push constants neither need nor have a block index */ vtn_assert(!block_index); -- 2.30.2