Module: Mesa Branch: main Commit: f424d1e9ab3341e2a95845570276bd57a870566a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f424d1e9ab3341e2a95845570276bd57a870566a
Author: Jason Ekstrand <[email protected]> Date: Mon Feb 7 14:51:16 2022 -0600 vulkan/queue: Assert command buffers have the right queue family We've got enough information in common code to track this now so we may as well throw in a helpful assert. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14917> --- src/vulkan/runtime/vk_queue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vulkan/runtime/vk_queue.c b/src/vulkan/runtime/vk_queue.c index 61488320bd9..38b8b4e0f22 100644 --- a/src/vulkan/runtime/vk_queue.c +++ b/src/vulkan/runtime/vk_queue.c @@ -28,6 +28,7 @@ #include "vk_alloc.h" #include "vk_command_buffer.h" +#include "vk_command_pool.h" #include "vk_common_entrypoints.h" #include "vk_device.h" #include "vk_fence.h" @@ -662,6 +663,7 @@ vk_queue_submit(struct vk_queue *queue, info->command_buffers[i].commandBuffer); assert(info->command_buffers[i].deviceMask == 0 || info->command_buffers[i].deviceMask == 1); + assert(cmd_buffer->pool->queue_family_index == queue->queue_family_index); submit->command_buffers[i] = cmd_buffer; }
