mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
nir_lower_system_values: Fix load_global_invocation_id to use base_work_group_id even with no base_global id
Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6668>
This commit is contained in:
parent
ee4cee6dbd
commit
924e27647e
1 changed files with 2 additions and 1 deletions
|
|
@ -351,7 +351,8 @@ lower_compute_system_value_instr(nir_builder *b,
|
|||
if (options && options->has_base_global_invocation_id)
|
||||
return nir_iadd(b, nir_load_global_invocation_id_zero_base(b, bit_size),
|
||||
nir_load_base_global_invocation_id(b, bit_size));
|
||||
else if (!b->shader->options->has_cs_global_id)
|
||||
else if ((options && options->has_base_work_group_id) ||
|
||||
!b->shader->options->has_cs_global_id)
|
||||
return nir_load_global_invocation_id_zero_base(b, bit_size);
|
||||
else
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue