From 56f753f8e2cf5d043dea914d2f82ec86150d90a1 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Tue, 22 Dec 2020 23:24:30 +1300 Subject: [PATCH] panfrost: Set bifrost_props for compute shaders Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_assemble.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_assemble.c b/src/gallium/drivers/panfrost/pan_assemble.c index 8e45025f1ca..ed1d3279f84 100644 --- a/src/gallium/drivers/panfrost/pan_assemble.c +++ b/src/gallium/drivers/panfrost/pan_assemble.c @@ -98,6 +98,24 @@ pan_prepare_bifrost_props(struct panfrost_shader_state *state, state->preload.fragment.coverage = true; state->preload.fragment.primitive_flags = state->reads_face; break; + case MESA_SHADER_COMPUTE: + pan_prepare(&state->properties, RENDERER_PROPERTIES); + state->properties.uniform_buffer_count = state->ubo_count; + + pan_prepare(&state->preload, PRELOAD); + state->preload.uniform_count = state->uniform_count; + + state->preload.compute.local_invocation_xy = true; + state->preload.compute.local_invocation_z = true; + + state->preload.compute.work_group_x = true; + state->preload.compute.work_group_y = true; + state->preload.compute.work_group_z = true; + + state->preload.compute.global_invocation_x = true; + state->preload.compute.global_invocation_y = true; + state->preload.compute.global_invocation_z = true; + break; default: unreachable("TODO"); }