spirv: Delete some dead workgroup variable handling code
This is dead since 5ed4e31c08
.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6524>
This commit is contained in:

committed by
Marge Bot

parent
1459cce7ec
commit
471f260ef3
@@ -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
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user