MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ graphics_family_can_present()

bool MayaFlux::Core::VKDevice::graphics_family_can_present ( vk::SurfaceKHR  surface) const

Confirm the graphics family presents to a concrete surface.

Parameters
surfaceSurface to check
Returns
true if presentation is supported

Device selection already guarantees this when require_presentation is set; this confirms the surfaceless probe against a real surface. Const and non-mutating, so it is safe from any thread.

Definition at line 572 of file VKDevice.cpp.

573{
574 if (!surface || !m_queue_families.graphics_family.has_value())
575 return false;
576
577 return m_physical_device.getSurfaceSupportKHR(
578 m_queue_families.graphics_family.value(), surface)
579 == VK_TRUE;
580}
vk::PhysicalDevice m_physical_device
Selected physical device (GPU)
Definition VKDevice.hpp:172
QueueFamilyIndices m_queue_families
Indices of required queue families.
Definition VKDevice.hpp:179
std::optional< uint32_t > graphics_family
Definition VKDevice.hpp:20

References MayaFlux::Core::QueueFamilyIndices::graphics_family, m_physical_device, and m_queue_families.