nir: Move workgroup_size and workgroup_variable_size into common shader_info

Move it out the "cs" sub-struct, since these will be used for other
shader stages in the future.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11225>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2021-05-05 12:24:44 -07:00
parent b5f6fc442c
commit 8af6766062
50 changed files with 293 additions and 275 deletions
@@ -1078,9 +1078,9 @@ setup_isel_context(Program* program,
program->workgroup_size = program->wave_size;
} else if (program->stage == compute_cs) {
/* CS sets the workgroup size explicitly */
program->workgroup_size = shaders[0]->info.cs.workgroup_size[0] *
shaders[0]->info.cs.workgroup_size[1] *
shaders[0]->info.cs.workgroup_size[2];
program->workgroup_size = shaders[0]->info.workgroup_size[0] *
shaders[0]->info.workgroup_size[1] *
shaders[0]->info.workgroup_size[2];
} else if (program->stage.hw == HWStage::ES || program->stage == geometry_gs) {
/* Unmerged ESGS operate in workgroups if on-chip GS (LDS rings) are enabled on GFX7-8 (not implemented in Mesa) */
program->workgroup_size = program->wave_size;