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

◆ preferred_present_family()

std::optional< uint32_t > MayaFlux::Core::QueueFamilyIndices::preferred_present_family ( ) const
inline

Family the engine presents on by default.

Returns
The graphics family when it can present, otherwise the lowest presentation-capable family, otherwise empty.

Definition at line 43 of file VKDevice.hpp.

44 {
45 if (graphics_family.has_value() && can_present(graphics_family.value()))
46 return graphics_family;
47
48 for (uint32_t i = 0; i < MAX_TRACKED_FAMILIES; ++i) {
49 if (can_present(i))
50 return i;
51 }
52 return std::nullopt;
53 }
static constexpr uint32_t MAX_TRACKED_FAMILIES
Width of present_family_mask.
Definition VKDevice.hpp:18
bool can_present(uint32_t index) const
Whether family index can present.
Definition VKDevice.hpp:33
std::optional< uint32_t > graphics_family
Definition VKDevice.hpp:20

References can_present(), graphics_family, and MAX_TRACKED_FAMILIES.

Referenced by MayaFlux::Core::VKDevice::get_preferred_present_queue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: