mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
broadcom/util: don't use compute supergroup packing with subgroups
When using subgroups there are additional restrictions to consider, so for now we keep it simple and disable supergroup packing in that scenario. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11620>
This commit is contained in:
parent
10313b03b5
commit
bf175fbb6a
4 changed files with 10 additions and 0 deletions
|
|
@ -29,11 +29,18 @@
|
|||
*/
|
||||
uint32_t
|
||||
v3d_csd_choose_workgroups_per_supergroup(struct v3d_device_info *devinfo,
|
||||
bool has_subgroups,
|
||||
bool has_tsy_barrier,
|
||||
uint32_t threads,
|
||||
uint32_t num_wgs,
|
||||
uint32_t wg_size)
|
||||
{
|
||||
/* FIXME: subgroups may restrict supergroup packing. For now, we disable it
|
||||
* completely if the shader uses subgroups.
|
||||
*/
|
||||
if (has_subgroups)
|
||||
return 1;
|
||||
|
||||
/* Compute maximum number of batches in a supergroup for this workgroup size.
|
||||
* Each batch is 16 elements, and we can have up to 16 work groups in a
|
||||
* supergroup:
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
uint32_t
|
||||
v3d_csd_choose_workgroups_per_supergroup(struct v3d_device_info *devinfo,
|
||||
bool has_subgroups,
|
||||
bool has_tsy_barrier,
|
||||
uint32_t threads,
|
||||
uint32_t num_wgs,
|
||||
|
|
|
|||
|
|
@ -3257,6 +3257,7 @@ cmd_buffer_create_csd_job(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
uint32_t wgs_per_sg =
|
||||
v3d_csd_choose_workgroups_per_supergroup(
|
||||
&cmd_buffer->device->devinfo,
|
||||
cs_variant->prog_data.cs->has_subgroups,
|
||||
cs_variant->prog_data.cs->base.has_control_barrier,
|
||||
cs_variant->prog_data.cs->base.threads,
|
||||
num_wgs, wg_size);
|
||||
|
|
|
|||
|
|
@ -1556,6 +1556,7 @@ v3d_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
|
|||
uint32_t wgs_per_sg =
|
||||
v3d_csd_choose_workgroups_per_supergroup(
|
||||
&v3d->screen->devinfo,
|
||||
compute->has_subgroups,
|
||||
compute->base.has_control_barrier,
|
||||
compute->base.threads,
|
||||
num_wgs, wg_size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue