diff options
author | Dave Airlie <[email protected]> | 2019-12-12 09:39:21 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-12-27 13:22:34 +1000 |
commit | 41c77dbc1ecbd48347cdd2459485416948c562c2 (patch) | |
tree | 67cc119d16f699345ebc3be52d429a1360d22863 /src | |
parent | a435f002c40f5adc99d37e65cf6b8bd478dc8e71 (diff) |
nir: sanitize work group intrinsics to always be 32-bit.
This saves handling them in the backend later.
Reviewed-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir_lower_system_values.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) |