Module: Mesa
Branch: main
Commit: dcbf31dce21fab0df4368d5b189b8deed622c3ab
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dcbf31dce21fab0df4368d5b189b8deed622c3ab

Author: Rhys Perry <pendingchao...@gmail.com>
Date:   Mon Dec 11 15:15:33 2023 +0000

vulkan/wsi: always create command buffer for special blit queues

Signed-off-by: Rhys Perry <pendingchao...@gmail.com>
Reviewed-by: Georg Lehmann <dadschoo...@gmail.com>
Fixes: d7938de8feea ("vulkan/wsi: don't support present with queues where blit 
is unsupported")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10283
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26635>

---

 src/vulkan/wsi/wsi_common.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c
index 93cd054c05f..2b82f44e87d 100644
--- a/src/vulkan/wsi/wsi_common.c
+++ b/src/vulkan/wsi/wsi_common.c
@@ -447,11 +447,14 @@ wsi_swapchain_init(const struct wsi_device *wsi,
       if (chain->blit.queue != VK_NULL_HANDLE) {
          VK_FROM_HANDLE(vk_queue, queue, chain->blit.queue);
          queue_family_index = queue->queue_family_index;
+      } else {
+         /* Queues returned by get_blit_queue() might not be listed in
+          * GetPhysicalDeviceQueueFamilyProperties, so this check is skipped 
for those queues.
+          */
+         if (!(wsi->queue_supports_blit & BITFIELD64_BIT(queue_family_index)))
+            continue;
       }
 
-      if (!(wsi->queue_supports_blit & BITFIELD64_BIT(queue_family_index)))
-         continue;
-
       const VkCommandPoolCreateInfo cmd_pool_info = {
          .sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,
          .pNext = NULL,

Reply via email to