Lines Matching refs:instance

45 /* vkGetInstanceProcAddr: Get global level or instance level entrypoint addresses.
46 * @param instance
50 * If instance == NULL || instance is invalid || (instance is valid && instance.minor_version <= 2):
55 * If instance is valid:
62 * returned regardless of the value of the instance parameter. The spec was amended in this version to only allow querying global
63 * level entrypoints with a NULL instance. However, as to not break old applications, the new behavior is only applied if the
64 * instance passed in is both valid and minor version is greater than 1.2, which was when this change in behavior occurred. Only
67 LOADER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName) {
68 // Always should be able to get vkGetInstanceProcAddr if queried, regardless of the value of instance
74 // Always can get a global entrypoint from vkGetInstanceProcAddr with a NULL instance handle
75 if (instance == VK_NULL_HANDLE) {
78 // New behavior only returns a global entrypoint if the instance handle is NULL.
79 // Old behavior is to return a global entrypoint regardless of the value of the instance handle.
80 // Use new behavior if: The instance is valid and the minor version of the instance is greater than 1.2, which
83 // First check if instance is valid - loader_get_instance() returns NULL if it isn't.
84 struct loader_instance *ptr_instance = loader_get_instance(instance);
95 // All other functions require a valid instance handle to get
96 if (instance == VK_NULL_HANDLE) {
99 struct loader_instance *ptr_instance = loader_get_instance(instance);
103 "vkGetInstanceProcAddr: Invalid instance [VUID-vkGetInstanceProcAddr-instance-parameter]");
137 // Because vkGetDeviceQueue2 is a 1.1 entry point, we need to check if the apiVersion provided during instance creation is
489 // Add the "instance-only" debug functions to the list of active debug functions
510 // Remove the "instance-only" debug functions from the list of active debug functions.
515 // Only thing in list is the instance only head
675 "the instance does not enumerate portability drivers! Applications that wish to enumerate portability "
685 "instance extension.");
689 "the instance does not enumerate portability drivers! Applications that wish to enumerate portability "
691 "flags and enable the VK_KHR_portability_enumeration instance extension.");
725 // Activate any layers on instance chain
790 if (icd_term->instance) {
791 icd_term->dispatch.DestroyInstance(icd_term->instance, pAllocator);
793 icd_term->instance = VK_NULL_HANDLE;
802 // success path, swap out created debug callbacks out so they aren't used until instance destruction
812 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) {
816 if (instance == VK_NULL_HANDLE) {
821 ptr_instance = loader_get_instance(instance);
824 "vkDestroyInstance: Invalid instance [VUID-vkDestroyInstance-instance-parameter]");
836 // Swap in the debug callbacks created during instance creation
839 disp = loader_get_instance_layer_dispatch(instance);
840 disp->DestroyInstance(ptr_instance->instance, pAllocator);
858 // Destroy the debug callbacks created during instance creation
870 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount,
877 inst = loader_get_instance(instance);
880 "vkEnumeratePhysicalDevices: Invalid instance [VUID-vkEnumeratePhysicalDevices-instance-parameter]");
893 res = inst->disp->layer_inst_disp.EnumeratePhysicalDevices(inst->instance, pPhysicalDeviceCount, pPhysicalDevices);
1045 // always pass this call down the instance chain which will terminate
1063 // Don't dispatch this call down the instance chain, want all device layers
1064 // enumerated and instance chain may not contain all device layers
2601 VkInstance instance, uint32_t *pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties *pPhysicalDeviceGroupProperties) {
2607 inst = loader_get_instance(instance);
2611 "vkEnumeratePhysicalDeviceGroupsKHR: Invalid instance [VUID-vkEnumeratePhysicalDeviceGroups-instance-parameter]");
2624 res = inst->disp->layer_inst_disp.EnumeratePhysicalDeviceGroups(inst->instance, pPhysicalDeviceGroupCount,