From: Dave Airlie Date: Wed, 11 Dec 2019 23:39:21 +0000 (+1000) Subject: nir: sanitize work group intrinsics to always be 32-bit. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41c77dbc1ecbd48347cdd2459485416948c562c2;p=mesa.git nir: sanitize work group intrinsics to always be 32-bit. This saves handling them in the backend later. Reviewed-by: Karol Herbst --- diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c index 0ff73c9e265..b99ae406ce4 100644 --- a/src/compiler/nir/nir_lower_system_values.c +++ b/src/compiler/nir/nir_lower_system_values.c @@ -222,6 +222,10 @@ lower_system_value_instr(nir_builder *b, nir_instr *instr, void *_state) return NULL; } + case nir_intrinsic_load_num_work_groups: + case nir_intrinsic_load_work_group_id: + return sanitize_32bit_sysval(b, intrin); + case nir_intrinsic_load_deref: { nir_deref_instr *deref = nir_src_as_deref(intrin->src[0]); if (deref->mode != nir_var_system_value)