From 47c9c42764f25eaf11e002c6ec7187508f994429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Sat, 12 Feb 2022 17:27:41 +0100 Subject: [PATCH] radv: Disable IB2 on compute queues. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "IB2" indirect buffer command is not supported on compute queues according to PAL, and it indeed causes GPU hangs when task shaders are used together with vkCmdExecuteCommands. Cc: mesa-stable Signed-off-by: Timur Kristóf Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Samuel Pitoiset Part-of: (cherry picked from commit da719792ad2b7f50824fd1ba500f8b87e4b3b448) --- .pick_status.json | 2 +- src/amd/vulkan/radv_cmd_buffer.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 9a4c1295538..fc9440f2058 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -40,7 +40,7 @@ "description": "radv: Disable IB2 on compute queues.", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 405c98bd17e..85326820a73 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -5607,6 +5607,11 @@ radv_CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCou allow_ib2 = false; } + if (secondary->queue_family_index == RADV_QUEUE_COMPUTE) { + /* IB2 packets are not supported on compute queues according to PAL. */ + allow_ib2 = false; + } + primary->scratch_size_per_wave_needed = MAX2(primary->scratch_size_per_wave_needed, secondary->scratch_size_per_wave_needed); primary->scratch_waves_wanted =