Commit 6a601c1f authored by Jesse Natalie's avatar Jesse Natalie Committed by Erik Faye-Lund
Browse files

nir_lower_system_values: Fix load_global_invocation_id to use...

nir_lower_system_values: Fix load_global_invocation_id to use base_work_group_id even with no base_global id
parent 76264217
......@@ -350,7 +350,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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment