nngn
Loading...
Searching...
No Matches
nngn::DeviceInfo Struct Reference

Aggregate type for information about a physical device. More...

#include <device.h>

Collaboration diagram for nngn::DeviceInfo:

Public Member Functions

void init (VkSurfaceKHR s, VkPhysicalDevice d)
 Initializes all members.
 
std::tuple< bool, std::uint32_t, std::uint32_t > find_queues () const
 Finds queue families that support graphics and presentation.
 
void init (VkSurfaceKHR s, VkPhysicalDevice d)
 Initializes all members.
 
std::tuple< bool, std::uint32_t, std::uint32_t > find_queues () const
 Finds queue families that support graphics and presentation.
 

Public Attributes

VkPhysicalDevice dev = {}
 
Graphics::DeviceInfo info = {}
 
std::vector< Graphics::Extensionextensions = {}
 
std::vector< Graphics::QueueFamilyqueue_families = {}
 

Private Member Functions

bool can_present (VkSurfaceKHR surface, std::size_t queue_family) const
 
bool can_present (VkSurfaceKHR surface, std::size_t queue_family) const
 

Detailed Description

Aggregate type for information about a physical device.

Member Function Documentation

◆ can_present() [1/2]

bool nngn::DeviceInfo::can_present ( VkSurfaceKHR  surface,
std::size_t  queue_family 
) const
private
Here is the caller graph for this function:

◆ can_present() [2/2]

bool nngn::DeviceInfo::can_present ( VkSurfaceKHR  surface,
std::size_t  queue_family 
) const
private

◆ find_queues() [1/2]

std::tuple< bool, std::uint32_t, std::uint32_t > nngn::DeviceInfo::find_queues ( ) const

Finds queue families that support graphics and presentation.

Returns
{found, graphics, present}. If a single family supports both types of operations, it is preferred and graphics and present will have the same value.
Here is the call graph for this function:

◆ find_queues() [2/2]

std::tuple< bool, std::uint32_t, std::uint32_t > nngn::DeviceInfo::find_queues ( ) const

Finds queue families that support graphics and presentation.

Returns
{found, graphics, present}. If a single family supports both types of operations, it is preferred and graphics and present will have the same value.

◆ init() [1/2]

void nngn::DeviceInfo::init ( VkSurfaceKHR  s,
VkPhysicalDevice  d 
)

Initializes all members.

Must be called before any other operation.

Here is the call graph for this function:

◆ init() [2/2]

void nngn::DeviceInfo::init ( VkSurfaceKHR  s,
VkPhysicalDevice  d 
)

Initializes all members.

Must be called before any other operation.

Member Data Documentation

◆ dev

VkPhysicalDevice nngn::DeviceInfo::dev = {}

◆ extensions

std::vector< Graphics::Extension > nngn::DeviceInfo::extensions = {}

◆ info

Graphics::DeviceInfo nngn::DeviceInfo::info = {}

◆ queue_families

std::vector< Graphics::QueueFamily > nngn::DeviceInfo::queue_families = {}

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