spirv: Delete some dead workgroup variable handling code
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 31 Aug 2020 18:01:21 +0000 (13:01 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Sep 2020 17:30:51 +0000 (17:30 +0000)
This is dead since 5ed4e31c08dc0.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6524>

src/compiler/spirv/vtn_private.h
src/compiler/spirv/vtn_variables.c

index 20c1f80e8f6bb4420e9689c6f6393caf7164bf2f..c67d75a6fdd45d4b80d95bbf99e9fe870f2aacdf 100644 (file)
@@ -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
index cbb2c5d7c2998c602793095ef9b11b59570483d4..df80fca5dae5fc125be9ff7588f9b498920fdc4b 100644 (file)
@@ -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);