HDK
|
#include <VE_Device.h>
Static Public Member Functions | |
static VE_Result< VE_Device > | create (const VE_Instance &instance, const VE_PhysicalDevice &physical_device, VE_PhysicalDeviceFeatures device_features, uint32_t device_extension_count, const VE_DeviceExtension device_extensions[]) |
This class contains a VkDevice handle along with the objects that are involved with the creation of it. Upon instantiation, it creates the VkInstance, finds a suitable physical device, and creates the logical VkDevice from that along queue objects. It cleans up everything upon calling destroy() on it.
It therefore forms a single convenient point interface into the Vulkan API, and can form the bedrock of a higher level abstraction.
Keep in mind the size of the object. Heap allocation is suggested.
Definition at line 48 of file VE_Device.h.
|
default |
VE_Result<VkDeviceMemory> VE_Device::allocateMemory | ( | uint64_t | size, |
uint32_t | memory_type_bits, | ||
VkMemoryPropertyFlags | mem_props, | ||
bool | external | ||
) |
|
static |
VE_Result<VE_BufferAllocation> VE_Device::createAndAllocateBuffer | ( | VkDeviceSize | size, |
VkBufferUsageFlags | usage, | ||
VkMemoryPropertyFlags | mem_props, | ||
bool | external | ||
) |
VE_Result<SYS_Handle> VE_Device::createExternalMemoryHandle | ( | VkDeviceMemory | memory | ) |
void VE_Device::destroy | ( | ) |
|
inline |
Definition at line 115 of file VE_Device.h.
VkQueue VE_Device::graphicsQueue | ( | ) | const |
TODO make sure this is available Return a queue that supports graphics operations.
uint32_t VE_Device::graphicsQueueFamilyIndex | ( | ) | const |
|
inline |
Definition at line 113 of file VE_Device.h.
|
inline |
Definition at line 129 of file VE_Device.h.
|
inline |
Definition at line 127 of file VE_Device.h.
VE_Result<VkDebugUtilsMessengerEXT> VE_Device::setDebugCallback | ( | VkDebugUtilsMessageSeverityFlagsEXT | msg_severity_flags, |
VkDebugUtilsMessageTypeFlagsEXT | msg_type_flags, | ||
VkBool32(*)(VkDebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData) | callback, | ||
void * | pUserData | ||
) |
VkQueue VE_Device::universalQueue | ( | ) | const |
TODO make sure this is available Return a queue that supports graphics, compute, and transfer operations.
uint32_t VE_Device::universalQueueFamilyIndex | ( | ) | const |