nir: use wg id to wg idx shortcut if two dims of num_workgroups are 1

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22334>
This commit is contained in:
Marcin Ślusarz
2023-03-31 11:54:21 +02:00
committed by Marge Bot
parent b5792c1a34
commit 7ebfbc97a8
2 changed files with 11 additions and 2 deletions
+1
View File
@@ -5408,6 +5408,7 @@ typedef struct nir_lower_compute_system_values_options {
bool lower_local_invocation_index:1;
bool lower_cs_local_id_to_index:1;
bool lower_workgroup_id_to_index:1;
uint16_t num_workgroups[3]; /* Compile-time-known dispatch sizes, or 0 if unknown. */
} nir_lower_compute_system_values_options;
bool nir_lower_compute_system_values(nir_shader *shader,