panfrost: Invoke compute shader according to grid info
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 31 Jul 2019 21:27:53 +0000 (14:27 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 1 Aug 2019 23:23:03 +0000 (16:23 -0700)
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>
src/gallium/drivers/panfrost/pan_compute.c

index 34d27904b3f2b85996005c69d588a15a3fce5aaf..ee3aa5edb367014b36760f0cf1a136ae44687b87 100644 (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));