anv: Add an anv_queue_family struct

This is modeled on anv_memory_type and anv_memory_heap which we already
use for managing memory types.  Each anv_queue_family contains some data
which is returned by vkGetPhysicalDeviceQueueFamilyProperties() verbatim
as well as some internal book-keeping bits.  An array of queue families
along with a count is stored in the physical device.  Each anv_queue
then contains a pointer to the anv_queue_family to which it belongs.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667>
This commit is contained in:
Jason Ekstrand
2021-01-26 01:13:36 -06:00
committed by Marge Bot
parent 4b920ba5ab
commit 89ae945730
3 changed files with 57 additions and 14 deletions
+5
View File
@@ -488,10 +488,15 @@ VkResult
anv_queue_init(struct anv_device *device, struct anv_queue *queue,
const VkDeviceQueueCreateInfo *pCreateInfo)
{
struct anv_physical_device *pdevice = device->physical;
VkResult result;
queue->device = device;
queue->flags = pCreateInfo->flags;
assert(pCreateInfo->queueFamilyIndex < pdevice->queue.family_count);
queue->family = &pdevice->queue.families[pCreateInfo->queueFamilyIndex];
queue->lost = false;
queue->quit = false;