Mesa (main): vulkan/queue: Assert command buffers have the right queue family
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 11 08:46:49 UTC 2022
Module: Mesa
Branch: main
Commit: f424d1e9ab3341e2a95845570276bd57a870566a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f424d1e9ab3341e2a95845570276bd57a870566a
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
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 <lionel.g.landwerlin at intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
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;
}
More information about the mesa-commit
mailing list