From 41c77dbc1ecbd48347cdd2459485416948c562c2 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 12 Dec 2019 09:39:21 +1000 Subject: [PATCH] nir: sanitize work group intrinsics to always be 32-bit. This saves handling them in the backend later. Reviewed-by: Karol Herbst --- src/compiler/nir/nir_lower_system_values.c | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.30.2