From c9b164f9b59d5f201b2c50838a03d9d3d8bda1a6 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 27 Jun 2019 08:29:06 -0700 Subject: panfrost: Implement dispatch helpers Rather than open-coding workgroups_shift_* type fields, we include a general routine for packing the vertex/tiler/compute descriptor based on the provided dispatch parameters. Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_context.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/gallium/drivers/panfrost/pan_context.h') diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index ca6f8deef33..f83083be0fc 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -343,4 +343,27 @@ panfrost_fragment_job(struct panfrost_context *ctx, bool has_draws); void panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *meta, const char *src, int type, struct panfrost_shader_state *state); +void +panfrost_pack_work_groups_compute( + struct mali_vertex_tiler_prefix *out, + unsigned num_x, + unsigned num_y, + unsigned num_z, + unsigned size_x, + unsigned size_y, + unsigned size_z); + +void +panfrost_pack_work_groups_fused( + struct mali_vertex_tiler_prefix *vertex, + struct mali_vertex_tiler_prefix *tiler, + unsigned num_x, + unsigned num_y, + unsigned num_z, + unsigned size_x, + unsigned size_y, + unsigned size_z); + + + #endif -- cgit v1.2.3