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@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14917>
This commit is contained in:
Jason Ekstrand 2022-02-07 14:51:16 -06:00 committed by Marge Bot
parent bda4c4f6b6
commit f424d1e9ab
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}