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

Go to the source code of this file.

Classes

class  VE_Instance
 

Enumerations

enum  VE_VulkanAPIVersion { VE_VulkanAPIVersion::version_1_0, VE_VulkanAPIVersion::version_1_1, VE_VulkanAPIVersion::version_1_2, VE_VulkanAPIVersion::version_1_3 }
 
enum  VE_InstanceExtension {
  VE_InstanceExtension::external_fence_capabilities = 0, VE_InstanceExtension::external_memory_capabilities, VE_InstanceExtension::external_semaphore_capabilities, VE_InstanceExtension::surface,
  VE_InstanceExtension::win32_surface, VE_InstanceExtension::device_group_creation, VE_InstanceExtension::get_physical_device_properties2, VE_InstanceExtension::get_surface_capabilities2,
  VE_InstanceExtension::debug_utils, VE_InstanceExtension::count
}
 
enum  VE_InstanceLayer { VE_InstanceLayer::khronos_validation = 0, VE_InstanceLayer::renderdoc_capture, VE_InstanceLayer::count }
 

Functions

VE_API VE_Result< VkInstance > VEcreateVulkanInstance (VE_VulkanAPIVersion version, uint32_t extension_count, const char *const extension_names[], uint32_t layer_count, const char *const layer_names[])
 
VE_API VE_Result< VkInstance > VEcreateVulkanInstance (VE_VulkanAPIVersion version, uint32_t extension_count, VE_InstanceExtension extensions[], uint32_t layer_count, VE_InstanceLayer layers[])
 
VE_API VE_Result< VkInstance > VEcreateVulkanInstance (VE_VulkanAPIVersion version, uint32_t extension_count, const char *const extension_names[])
 
VE_API bool VEsupportsInstanceLayer (VE_InstanceLayer extension)
 Query Support of the Instance Layer in the Vulkan Instance. More...
 
VE_API bool VEsupportsInstanceLayer (const char *extension)
 
VE_API bool VEsupportsInstanceExtension (VE_InstanceExtension extension)
 Query Support of the Instance Extension in the Vulkan Instance. More...
 
VE_API bool VEsupportsInstanceExtension (const char *extension)
 
VE_API void VEdestroyVulkanInstance (VkInstance)
 
VE_API uint32_t VEgetInstanceVersion ()
 

Enumeration Type Documentation

enum VE_InstanceExtension
strong

A enum of common instance extensions. These can be used in lieu of passing the names themselves into functions, making it a bit hard to make typos and a bit easier to remember what extensions exist.

To map from extension name to enum member, just remove the capitalized prefix from the the extension name. For example VK_KHR_external_fence_capabilities -> external_fence_capabilities

Enumerator
external_fence_capabilities 
external_memory_capabilities 
external_semaphore_capabilities 
surface 
win32_surface 
device_group_creation 
get_physical_device_properties2 
get_surface_capabilities2 
debug_utils 
count 

Definition at line 37 of file VE_Instance.h.

enum VE_InstanceLayer
strong

A enum of common instance layers. These can be used in lieu of passing the names themselves into functions, making it a bit hard to make typos and a bit easier to remember what layers exist.

To map from layer name to enum member, just remove the VK_LAYER prefix from the the layer name and lower case the rest. For example: VK_LAYER_LUNARG_standard_validation -> lunarg_standard_validation

Enumerator
khronos_validation 
renderdoc_capture 
count 

Definition at line 59 of file VE_Instance.h.

enum VE_VulkanAPIVersion
strong
Enumerator
version_1_0 
version_1_1 
version_1_2 
version_1_3 

Definition at line 21 of file VE_Instance.h.

Function Documentation

VE_API VE_Result<VkInstance> VEcreateVulkanInstance ( VE_VulkanAPIVersion  version,
uint32_t  extension_count,
const char *const  extension_names[],
uint32_t  layer_count,
const char *const  layer_names[] 
)

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

Create a Vulkan instance object, which is the primary handle into the Vulkan loader. The instance object is mainly used to query for and inspect available system drivers and physical devices, and create VkDevice objects from particular physical devices.

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

VE_API VE_Result<VkInstance> VEcreateVulkanInstance ( VE_VulkanAPIVersion  version,
uint32_t  extension_count,
VE_InstanceExtension  extensions[],
uint32_t  layer_count,
VE_InstanceLayer  layers[] 
)
VE_API VE_Result<VkInstance> VEcreateVulkanInstance ( VE_VulkanAPIVersion  version,
uint32_t  extension_count,
const char *const  extension_names[] 
)

This version of the call will automatically enabled the validation layers in debug mode.

VE_API void VEdestroyVulkanInstance ( VkInstance  )

Clean up the instance resource. This likely will simply call vkDestroyInstance.

VE_API uint32_t VEgetInstanceVersion ( )

Return the Vulkan major, minor, and patch version bit-crammed into the unsigned int.

VE_API bool VEsupportsInstanceExtension ( VE_InstanceExtension  extension)

Query Support of the Instance Extension in the Vulkan Instance.

VE_API bool VEsupportsInstanceExtension ( const char *  extension)
VE_API bool VEsupportsInstanceLayer ( VE_InstanceLayer  extension)

Query Support of the Instance Layer in the Vulkan Instance.

VE_API bool VEsupportsInstanceLayer ( const char *  extension)