Mesa (staging/21.3): radv: Disable IB2 on compute queues.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Feb 20 17:40:40 UTC 2022


Module: Mesa
Branch: staging/21.3
Commit: d309f6fa42e70675bf0f341adb9388d6a7fef395
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d309f6fa42e70675bf0f341adb9388d6a7fef395

Author: Timur Kristóf <timur.kristof at gmail.com>
Date:   Sat Feb 12 17:27:41 2022 +0100

radv: Disable IB2 on compute queues.

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 <timur.kristof at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15006>
(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 5fc3648c261..ec4d5595c85 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1093,7 +1093,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 4f8983f1ce8..e70912fcf7e 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -5554,6 +5554,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 =



More information about the mesa-commit mailing list