diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 824f798f6bf..b4c477448bb 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -1270,6 +1270,10 @@ VkResult anv_CreateCommandPool( if (pool == NULL) return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); + assert(pCreateInfo->queueFamilyIndex < device->physical->queue.family_count); + pool->queue_family = + &device->physical->queue.families[pCreateInfo->queueFamilyIndex]; + if (pAllocator) pool->alloc = *pAllocator; else diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 3fd5ac72182..19dcf1983b0 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -3091,6 +3091,7 @@ struct anv_cmd_pool { struct list_head cmd_buffers; VkCommandPoolCreateFlags flags; + struct anv_queue_family * queue_family; }; #define ANV_MIN_CMD_BUFFER_BATCH_SIZE 8192