From 127352457cd5bfecf6d9f4e42dddc04c5334c4d1 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Wed, 6 Oct 2021 18:02:26 +0300 Subject: [PATCH] turnip: do nothing on dispatch with zero total workgroups Otherwise GPU hangs... Fixes vkd3d test "test_dispatch_zero_thread_groups" Signed-off-by: Danylo Piliaiev Part-of: --- src/freedreno/vulkan/tu_cmd_buffer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 285e3c1..af7499b 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -4483,6 +4483,10 @@ static void tu_dispatch(struct tu_cmd_buffer *cmd, const struct tu_dispatch_info *info) { + if (!info->indirect && + (info->blocks[0] == 0 || info->blocks[1] == 0 || info->blocks[2] == 0)) + return; + struct tu_cs *cs = &cmd->cs; struct tu_pipeline *pipeline = cmd->state.compute_pipeline; struct tu_descriptor_state *descriptors_state = -- 2.7.4