aco: compute the CS workgroup size from the shader NIR info

cs.block_size is copied from cs.local_size during the shader info pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7061>
This commit is contained in:
Samuel Pitoiset 2020-10-08 13:51:27 +02:00 committed by Marge Bot
parent e3e8d13ada
commit 112e66fa09

View file

@ -1240,8 +1240,9 @@ setup_isel_context(Program* program,
program->workgroup_size = program->wave_size;
} else if (program->stage == compute_cs) {
/* CS sets the workgroup size explicitly */
unsigned* bsize = program->info->cs.block_size;
program->workgroup_size = bsize[0] * bsize[1] * bsize[2];
program->workgroup_size = shaders[0]->info.cs.local_size[0] *
shaders[0]->info.cs.local_size[1] *
shaders[0]->info.cs.local_size[2];
} else if ((program->stage & hw_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;