ngscopeclient 0.1-dev+51fbda87c
Classes | Public Member Functions | Protected Attributes | List of all members
QueueManager Class Reference

Allocates and hands out std::shared_ptr<QueueHandle> instances for thread-safe access to Vulkan Queues. More...

#include <QueueManager.h>

Classes

struct  QueueInfo
 

Public Member Functions

 QueueManager (vk::raii::PhysicalDevice *phys, std::shared_ptr< vk::raii::Device > device)
 
std::shared_ptr< QueueHandleGetComputeQueue (std::string name)
 Get a handle to a compute queue.
 
std::shared_ptr< QueueHandleGetRenderQueue (std::string name)
 
std::shared_ptr< QueueHandleGetTransferQueue (std::string name)
 
std::shared_ptr< QueueHandleGetQueueWithFlags (vk::QueueFlags flags, std::string name)
 
 QueueManager (QueueManager const &)=delete
 
QueueManageroperator= (QueueManager const &)=delete
 

Protected Attributes

vk::raii::PhysicalDevice * m_phys
 
std::shared_ptr< vk::raii::Device > m_device
 
std::mutex m_mutex
 Mutex to guard allocations.
 
std::vector< QueueInfom_queues
 All queues available on the device.
 

Detailed Description

Allocates and hands out std::shared_ptr<QueueHandle> instances for thread-safe access to Vulkan Queues.

Each QueueHandle represents a single Vulkan Queue. Many shared pointers to a single QueueHandle may exist at a given time, e.g. if the GPU only provides a single queue of the required type.

Member Function Documentation

◆ GetQueueWithFlags()

shared_ptr< QueueHandle > QueueManager::GetQueueWithFlags ( vk::QueueFlags  flags,
std::string  name 
)

Get a handle to a queue that has the given flag bits set, allocating the queue if necessary, and set or append name to the queue name for debug

◆ GetRenderQueue()

std::shared_ptr< QueueHandle > QueueManager::GetRenderQueue ( std::string  name)
inline

Get a handle to a render queue

Note
Currently this requires Graphics and Transfer capabilities to simplify texture transfer code in WaveformArea.

◆ GetTransferQueue()

std::shared_ptr< QueueHandle > QueueManager::GetTransferQueue ( std::string  name)
inline

Get a handle to a transfer queue

Note
This currently requires Compute capabilities so we can barrier on compute operations

The documentation for this class was generated from the following files: