spirv: Remove dead code in subgroup instruction handling

This codepath had a bug (always setting `elems[0]`) since it was last
reworked, but there's no subgroup instruction that uses this helper and
support Composites, so it can be replace with an assert.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40356>
This commit is contained in:
Caio Oliveira 2026-03-11 13:17:44 -07:00 committed by Marge Bot
parent 224a336bf0
commit b494faa12d

View file

@ -23,14 +23,7 @@ vtn_build_subgroup_instr(struct vtn_builder *b,
struct vtn_ssa_value *dst = vtn_create_ssa_value(b, src0->type);
vtn_assert(dst->type == src0->type);
if (!glsl_type_is_vector_or_scalar(dst->type)) {
for (unsigned i = 0; i < glsl_get_length(dst->type); i++) {
dst->elems[0] =
vtn_build_subgroup_instr(b, nir_op, src0->elems[i], index,
const_idx0, const_idx1);
}
return dst;
}
vtn_assert(glsl_type_is_vector_or_scalar(dst->type));
nir_intrinsic_instr *intrin =
nir_intrinsic_instr_create(b->nb.shader, nir_op);