MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Core::VKDevice Class Reference

Manages Vulkan physical device selection and logical device creation. More...

#include <VKDevice.hpp>

+ Collaboration diagram for MayaFlux::Core::VKDevice:

Public Member Functions

void cleanup ()
 Cleanup device resources.
 
vk::Queue get_compute_queue () const
 Get compute queue (may be same as graphics)
 
vk::Device get_device () const
 Get logical device handle.
 
const std::string & get_device_name () const
 Name of the selected physical device.
 
vk::Queue get_graphics_queue () const
 Get graphics queue.
 
vk::PhysicalDevice get_physical_device () const
 Get physical device handle.
 
vk::Queue get_preferred_present_queue () const
 Queue for the preferred presentation family.
 
vk::Queue get_present_queue (uint32_t family_index) const
 Queue for a presentation-capable family.
 
const QueueFamilyIndicesget_queue_families () const
 Get queue family indices.
 
vk::Queue get_transfer_queue () const
 Get transfer queue (may be same as graphics)
 
bool graphics_family_can_present (vk::SurfaceKHR surface) const
 Confirm the graphics family presents to a concrete surface.
 
bool graphics_family_presents () const
 Whether the graphics queue family passed the surfaceless presentation probe.
 
bool initialize (vk::Instance instance, const GraphicsBackendInfo &backend_info)
 Select a physical device and create the logical device.
 
VKDeviceoperator= (const VKDevice &)=delete
 
VKDeviceoperator= (VKDevice &&) noexcept
 
void query_supported_extensions ()
 Query and log supported device extensions.
 
bool supports_mesh_shaders () const
 Check if the device supports mesh shaders.
 
 VKDevice ()=default
 
 VKDevice (const VKDevice &)=delete
 
 VKDevice (VKDevice &&) noexcept
 
void wait_idle () const
 Wait for the device to become idle.
 
 ~VKDevice ()
 

Private Member Functions

bool create_logical_device (vk::Instance instance, const GraphicsBackendInfo &backend_info)
 Create the logical device and retrieve queue handles.
 
bool pick_physical_device (vk::Instance instance, const GraphicsBackendInfo &backend_info)
 Select a physical device by config selector or score.
 

Static Private Member Functions

static QueueFamilyIndices find_queue_families (vk::PhysicalDevice device)
 Find queue families on the given physical device.
 

Private Attributes

vk::Queue m_compute_queue
 Compute queue handle.
 
std::string m_device_name
 Selected device name, cached for logging.
 
std::array< uint8_t, VK_UUID_SIZE > m_device_uuid {}
 Selected device UUID.
 
bool m_graphics_presents {}
 Graphics family passed the surfaceless presentation probe.
 
vk::Queue m_graphics_queue
 Graphics queue handle.
 
vk::Device m_logical_device
 Logical device handle.
 
vk::PhysicalDevice m_physical_device
 Selected physical device (GPU)
 
std::unordered_map< uint32_t, vk::Queue > m_present_queues
 One queue per presentation-capable family.
 
QueueFamilyIndices m_queue_families
 Indices of required queue families.
 
bool m_supports_mesh_shaders {}
 Whether the device supports mesh shaders.
 
vk::Queue m_transfer_queue
 Transfer queue handle.
 

Detailed Description

Manages Vulkan physical device selection and logical device creation.

Handles GPU selection and creates the logical device interface for executing commands.

Definition at line 63 of file VKDevice.hpp.


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