HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VE_Device.h File Reference
#include "VE_API.h"
#include "VE_Ext.h"
#include "VE_Instance.h"
#include "VE_Memory.h"
#include "VE_PhysicalDevice.h"
#include "VE_Result.h"
#include <SYS/SYS_Handle.h>
+ Include dependency graph for VE_Device.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  VE_BufferAllocation
 
class  VE_Device
 

Typedefs

using VE_QueueFlags = uint32_t
 

Enumerations

enum  VE_QueueFlagBits { VE_QUEUE_GRAPHICS_BIT = VK_QUEUE_GRAPHICS_BIT, VE_QUEUE_COMPUTE_BIT = VK_QUEUE_COMPUTE_BIT, VE_QUEUE_TRANSFER_BIT = VK_QUEUE_TRANSFER_BIT }
 

Functions

VE_API VE_Result< VkDevice > VEcreateVulkanDevice (VkPhysicalDevice, VkDeviceCreateInfo)
 
VE_API VE_Result< VkDevice > VEcreateVulkanDevice (VkPhysicalDevice, const VE_PhysicalDeviceFeatures &enabled_features, uint32_t enabled_extension_count, const char *const *enabled_extensions, const uint32_t queue_family_count, const uint32_t queue_family_indices[], const uint32_t queue_counts[])
 This call assigns equal priorities to all queues. More...
 
VE_API VE_Result< VkDevice > VEcreateVulkanDevice (VkPhysicalDevice, const VE_PhysicalDeviceFeatures &enabled_features, uint32_t enabled_extension_count, const char *const *enabled_extensions, uint32_t queue_family_index, uint32_t queue_count)
 Create a device with access to only one family of queues. More...
 
VE_API VE_Result< VkDevice > VEcreateVulkanDevice (const VE_PhysicalDevice &, const VE_PhysicalDeviceFeatures &enabled_features, uint32_t enabled_extension_count, const char *const *enabled_extensions, VkQueueFlags queue_flags)
 Create a device with a single queue statisfying the given queue_flags. More...
 
VE_API void VEdestroyVulkanDevice (VkDevice)
 Clean up a VkDevice. This likely will simply call vkDestroyDevice. More...
 
VE_API VE_Result< SYS_HandleVEcreateExternalMemoryHandle (void *pfn, VkDevice device, VkDeviceMemory memory)
 

Typedef Documentation

using VE_QueueFlags = uint32_t

Definition at line 36 of file VE_Device.h.

Enumeration Type Documentation

Enumerator
VE_QUEUE_GRAPHICS_BIT 
VE_QUEUE_COMPUTE_BIT 
VE_QUEUE_TRANSFER_BIT 

Definition at line 23 of file VE_Device.h.

Function Documentation

VE_API VE_Result<SYS_Handle> VEcreateExternalMemoryHandle ( void pfn,
VkDevice  device,
VkDeviceMemory  memory 
)

Will create the system specific external memory handle for the memory passed in. pfn should be a function pointer with signature matching either PFN_vkGetMemoryFdKHR or PFN_vkGetMemoryWin32HandleKHR, depending on the platrom. memory must have been created with the

VE_API VE_Result<VkDevice> VEcreateVulkanDevice ( VkPhysicalDevice  ,
VkDeviceCreateInfo   
)

NOTE: These are low-level calls and it is recommended to use a higher-level interface to Vulkan if possible.

Create a Vulkan logical device object. It grants access to a specific device, which in many cases will be a dedicated GPU. Some high-level uses of the device are listed below.

• Creation of command queues. • Creation and tracking of various synchronization constructs. • Allocating, freeing, and managing memory. • Creation and destruction of command buffers and command buffer pools. • Creation, destruction, and management of graphics state.

It is the caller's responsibily to pass the returned VkDevice to ve_destroyVulkanDevice once it is no longer needed.

VE_API VE_Result<VkDevice> VEcreateVulkanDevice ( VkPhysicalDevice  ,
const VE_PhysicalDeviceFeatures enabled_features,
uint32_t  enabled_extension_count,
const char *const *  enabled_extensions,
const uint32_t  queue_family_count,
const uint32_t  queue_family_indices[],
const uint32_t  queue_counts[] 
)

This call assigns equal priorities to all queues.

VE_API VE_Result<VkDevice> VEcreateVulkanDevice ( VkPhysicalDevice  ,
const VE_PhysicalDeviceFeatures enabled_features,
uint32_t  enabled_extension_count,
const char *const *  enabled_extensions,
uint32_t  queue_family_index,
uint32_t  queue_count 
)

Create a device with access to only one family of queues.

VE_API VE_Result<VkDevice> VEcreateVulkanDevice ( const VE_PhysicalDevice ,
const VE_PhysicalDeviceFeatures enabled_features,
uint32_t  enabled_extension_count,
const char *const *  enabled_extensions,
VkQueueFlags  queue_flags 
)

Create a device with a single queue statisfying the given queue_flags.

VE_API void VEdestroyVulkanDevice ( VkDevice  )

Clean up a VkDevice. This likely will simply call vkDestroyDevice.