broadcom/compiler: implement nir_intrinsic_load_subgroup_id correctly
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 22 Jun 2021 08:55:04 +0000 (10:55 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Tue, 29 Jun 2021 06:43:06 +0000 (08:43 +0200)
commit30dec8b414ef6113ba36726e3e72915a7b7b5288
tree3479887a931f70d891fb48cdefb550271f8cfe2f
parent71b7c7b0dc698b052b0dc7875c12b433c790bbaf
broadcom/compiler: implement nir_intrinsic_load_subgroup_id correctly

For some reason, this was implemented with the bulk of the compute
shader enablement, but this intrinsic is specific to subgroups and
thus was not really used. Also, its implementation was not correct,
since it was returning the element index within the subgroup, not
the subgroup index itself, which is the index of the batch in the
dispatch.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
src/broadcom/compiler/nir_to_vir.c