Add this as an option to nir_lower_compute_system_values_options
instead of just relying on the shader's options.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13466>
bool has_base_workgroup_id:1;
bool shuffle_local_ids_for_quad_derivatives:1;
bool lower_local_invocation_index:1;
+ bool lower_cs_local_id_from_index:1;
} nir_lower_compute_system_values_options;
bool nir_lower_compute_system_values(nir_shader *shader,
/* If lower_cs_local_id_from_index is true, then we derive the local
* index from the local id.
*/
- if (b->shader->options->lower_cs_local_id_from_index) {
+ if (b->shader->options->lower_cs_local_id_from_index ||
+ (options && options->lower_cs_local_id_from_index)) {
/* We lower gl_LocalInvocationID from gl_LocalInvocationIndex based
* on this formula:
*