assignQueues :: (Traversable f, MonadIO m, MonadIO n)=> PhysicalDevice-> f (QueueSpec m)A set of requirements for Queues to be created
-> m (Maybe (Vector (DeviceQueueCreateInfo '[]), Device -> n (f (QueueFamilyIndex, Queue))))A set of DeviceQueueCreateInfos to pass to createDevice
A function to extract the requested Queues from the Device created with the DeviceQueueCreateInfos
Given a PhysicalDevice and a set of requirements for queues, calculate an assignment of queues to queue families and return information with which to create a Device and also a function to extract the requested Queues from the device.
You may want to create a custom type with a Traversable instance to store your queues like:
data MyQueues q = MyQueues
{ computeQueue :: q
, graphicsAndPresentQueue :: q
, transferQueue :: q
}
myQueueSpecs :: MyQueues QueueSpec
myQueueSpecs = MyQueues
{ computeQueue = QueueSpec 0.5 isComputeQueueFamily
, graphicsAndPresentQueue = QueueSpec 1 isPresentQueueFamily
, transferQueue = QueueSpec 1 isTransferOnlyQueueFamily
}
Note, this doesn't permit differentiating queue family assignment based on whether or not the queue is protected.