panfrost: Invoke compute shader according to grid info

We already have helpers for packing invocations (due to its role in
instanced vertex shaders), so we can reuse this drop in for compute
shaders.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig 2019-07-31 14:27:53 -07:00
parent 748ccbc808
commit 871c02b12e
1 changed files with 6 additions and 0 deletions

View File

@ -85,6 +85,12 @@ panfrost_launch_grid(struct pipe_context *pipe,
payload->postfix.framebuffer =
panfrost_upload_transient(ctx, &compute_fbd, sizeof(compute_fbd));
/* Invoke according to the grid info */
panfrost_pack_work_groups_compute(&payload->prefix,
info->grid[0], info->grid[1], info->grid[2],
info->block[0], info->block[1], info->block[2]);
/* Upload the payload */
struct panfrost_transfer transfer = panfrost_allocate_transient(ctx, sizeof(job) + sizeof(*payload));