Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/asahi/vulkan/hk_cmd_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -5174,11 +5174,18 @@ dispatch_grid_shader(struct hk_cmd_buffer *cmd, struct hk_shader *s,
: 256u;
const uint64_t min_wgs =
MAX2(256ull, 4ull * agx_get_num_cores(&dev->dev));
/* Larger multi-row workgroups on HAL200 can save compute time while
* delaying the next render. Keep the launch granularity for tiled
* dispatches with a recorded dependency on an earlier render. */
const bool render_dependent =
agx_chip_native_hal200(dev->dev.chip) && local_size.y > 1 &&
cs->sync.dep[HK_SYNC_VDM].cut;
uint16_t reshaped[3];
if (hk_coalesce_workgroup_size_ex(
selected->b.info.workgroup_size, grid.count,
dev->vk.physical->properties.maxComputeWorkGroupSize, max_wg,
target_wg, min_wgs, reshaped) ||
if ((!render_dependent &&
hk_coalesce_workgroup_size_ex(
selected->b.info.workgroup_size, grid.count,
dev->vk.physical->properties.maxComputeWorkGroupSize, max_wg,
target_wg, min_wgs, reshaped)) ||
hk_split_workgroup_size_ex(
selected->b.info.workgroup_size, grid.count,
2ull * agx_get_num_cores(&dev->dev), reshaped)) {
Expand Down