![]() |
Kale
|
#include <Device.hpp>
Public Member Functions | |
Device () | |
Device (const vk::PhysicalDevice &device) | |
Device (uint32_t deviceId) | |
void | init (const vk::PhysicalDevice &device) |
void | init (uint32_t deviceId) |
void | freeResources () |
uint32_t | findMemoryType (uint32_t typeFilter, vk::MemoryPropertyFlags properties) const |
![]() | |
virtual | ~ParentResource () |
void | freeChildren () |
Static Public Member Functions | |
static std::vector< vk::PhysicalDevice > | availableDevices () |
static bool | deviceSupported (const vk::PhysicalDevice &physicalDevice) |
Public Attributes | |
vk::UniqueDevice | logicalDevice |
vk::PhysicalDeviceProperties | physicalDeviceProperties |
vk::PhysicalDevice | physicalDevice |
std::map< QueueType, vk::Queue > | queueMap |
QueueFamilyIndices | queueIndices |
vk::PhysicalDeviceMemoryProperties | memoryProperties |
Private Member Functions | |
void | createLogicalDevice () |
void | getQueues () |
Additional Inherited Members | |
![]() | |
std::list< ChildResource< Device > * > | resources |
A simple Kale abstraction over the Vulkan Physical Device and Logical Devices
Definition at line 41 of file Device.hpp.
Device::Device | ( | ) |
Creates an uninstantiated device
Definition at line 35 of file Device.cpp.
Device::Device | ( | const vk::PhysicalDevice & | device | ) |
Creates a logical device and all appropriate queues given the physical device
device | The physical device |
If | the given device is not supported |
Definition at line 44 of file Device.cpp.
Device::Device | ( | uint32_t | deviceId | ) |
Creates a logical device and all appropriate queues given the physical device
deviceId | The id of the physical device |
If | the device was not found |
Definition at line 59 of file Device.cpp.
|
static |
Gets all available and supported physical devices
Definition at line 191 of file Device.cpp.
|
private |
Creates the logical device needed
Definition at line 123 of file Device.cpp.
|
static |
Checks whether or not a given physical device is supported
physicalDevice | The physical device to check support for |
Definition at line 204 of file Device.cpp.
uint32_t Device::findMemoryType | ( | uint32_t | typeFilter, |
vk::MemoryPropertyFlags | properties ) const |
Finds a memory type given the type filter and properties
typeFilter | the filters to apply on the type of memory |
properties | The properties required for the memory |
If | the device does not have an applicable memory type |
Definition at line 178 of file Device.cpp.
void Device::freeResources | ( | ) |
Frees the resources from this device
Definition at line 167 of file Device.cpp.
|
private |
Gets the appropriate queues from the logical device
Definition at line 159 of file Device.cpp.
void Device::init | ( | const vk::PhysicalDevice & | device | ) |
Initializes this object
device | The device to initialize with |
Definition at line 83 of file Device.cpp.
void Device::init | ( | uint32_t | deviceId | ) |
Initializes this object
deviceId | The device to initialize with |
Definition at line 100 of file Device.cpp.
vk::UniqueDevice Kale::Vulkan::Device::logicalDevice |
The logical device created by the physical device
Definition at line 59 of file Device.hpp.
vk::PhysicalDeviceMemoryProperties Kale::Vulkan::Device::memoryProperties |
The memory properties of the device
Definition at line 84 of file Device.hpp.
vk::PhysicalDevice Kale::Vulkan::Device::physicalDevice |
The physical device
Definition at line 69 of file Device.hpp.
vk::PhysicalDeviceProperties Kale::Vulkan::Device::physicalDeviceProperties |
The device properties
Definition at line 64 of file Device.hpp.
QueueFamilyIndices Kale::Vulkan::Device::queueIndices |
All the available queue family indices
Definition at line 79 of file Device.hpp.
std::map<QueueType, vk::Queue> Kale::Vulkan::Device::queueMap |
A map of all queue types to their appropriate queues
Definition at line 74 of file Device.hpp.