Lines Matching refs:ptr_instance
80 struct loader_instance *ptr_instance = loader_get_instance(instance); in vkGetInstanceProcAddr() local
81 if (ptr_instance != NULL && in vkGetInstanceProcAddr()
82 …loader_check_version_meets_required(loader_combine_version(1, 3, 0), ptr_instance->app_api_version… in vkGetInstanceProcAddr()
95 struct loader_instance *ptr_instance = loader_get_instance(instance); in vkGetInstanceProcAddr() local
97 if (ptr_instance == NULL) { in vkGetInstanceProcAddr()
106 return trampoline_get_proc_addr(ptr_instance, pName); in vkGetInstanceProcAddr()
435 struct loader_instance *ptr_instance = NULL; in vkCreateInstance() local
452 ptr_instance = in vkCreateInstance()
457 if (ptr_instance == NULL) { in vkCreateInstance()
464 ptr_instance->alloc_callbacks = *pAllocator; in vkCreateInstance()
466 ptr_instance->magic = LOADER_MAGIC_NUMBER; in vkCreateInstance()
470 ptr_instance->app_api_version = LOADER_VERSION_1_0_0; in vkCreateInstance()
472 … ptr_instance->app_api_version = loader_make_version(pCreateInfo->pApplicationInfo->apiVersion); in vkCreateInstance()
474 ptr_instance->app_api_version.patch = 0; in vkCreateInstance()
482 res = util_CreateDebugUtilsMessengers(ptr_instance, pCreateInfo->pNext, pAllocator); in vkCreateInstance()
490 res = util_CreateDebugReportCallbacks(ptr_instance, pCreateInfo->pNext, pAllocator); in vkCreateInstance()
501 ptr_instance->portability_enumeration_enabled = true; in vkCreateInstance()
502 loader_log(ptr_instance, VULKAN_LOADER_INFO_BIT, 0, in vkCreateInstance()
512 loader_log(ptr_instance, VULKAN_LOADER_WARN_BIT, 0, in vkCreateInstance()
522 memset(&ptr_instance->instance_layer_list, 0, sizeof(ptr_instance->instance_layer_list)); in vkCreateInstance()
523 loader_scan_for_layers(ptr_instance, &ptr_instance->instance_layer_list); in vkCreateInstance()
527 …res = loader_validate_layers(ptr_instance, pCreateInfo->enabledLayerCount, pCreateInfo->ppEnabledL… in vkCreateInstance()
528 &ptr_instance->instance_layer_list); in vkCreateInstance()
535 memset(&ptr_instance->icd_tramp_list, 0, sizeof(ptr_instance->icd_tramp_list)); in vkCreateInstance()
537 … res = loader_icd_scan(ptr_instance, &ptr_instance->icd_tramp_list, &skipped_portability_drivers); in vkCreateInstance()
540 } else if (ptr_instance->icd_tramp_list.count == 0) { in vkCreateInstance()
544 ptr_instance, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0, in vkCreateInstance()
550 …loader_log(ptr_instance, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0, "vkCreateInstance:… in vkCreateInstance()
556 …es = loader_get_icd_loader_instance_extensions(ptr_instance, &ptr_instance->icd_tramp_list, &ptr_i… in vkCreateInstance()
560 …res = loader_validate_instance_extensions(ptr_instance, &ptr_instance->ext_list, &ptr_instance->in… in vkCreateInstance()
565 …ptr_instance->disp = loader_instance_heap_alloc(ptr_instance, sizeof(struct loader_instance_dispat… in vkCreateInstance()
567 if (ptr_instance->disp == NULL) { in vkCreateInstance()
568 loader_log(ptr_instance, VULKAN_LOADER_ERROR_BIT, 0, in vkCreateInstance()
573 memcpy(&ptr_instance->disp->layer_inst_disp, &instance_disp, sizeof(instance_disp)); in vkCreateInstance()
576 ptr_instance->next = loader.instances; in vkCreateInstance()
577 loader.instances = ptr_instance; in vkCreateInstance()
581 res = loader_enable_instance_layers(ptr_instance, &ici, &ptr_instance->instance_layer_list); in vkCreateInstance()
586 created_instance = (VkInstance)ptr_instance; in vkCreateInstance()
587 res = loader_create_instance_chain(&ici, pAllocator, ptr_instance, &created_instance); in vkCreateInstance()
596 wsi_create_instance(ptr_instance, &ici); in vkCreateInstance()
597 check_for_enabled_debug_extensions(ptr_instance, &ici); in vkCreateInstance()
598 extensions_create_instance(ptr_instance, &ici); in vkCreateInstance()
600 *pInstance = (VkInstance)ptr_instance; in vkCreateInstance()
606 loader_activate_instance_layer_extensions(ptr_instance, created_instance); in vkCreateInstance()
607 …} else if (VK_ERROR_EXTENSION_NOT_PRESENT == res && !ptr_instance->create_terminator_invalid_exten… in vkCreateInstance()
608 loader_log(ptr_instance, VULKAN_LOADER_WARN_BIT, 0, in vkCreateInstance()
614 if (NULL != ptr_instance) { in vkCreateInstance()
618 if (loader.instances == ptr_instance) { in vkCreateInstance()
619 loader.instances = ptr_instance->next; in vkCreateInstance()
623 loader_instance_heap_free(ptr_instance, ptr_instance->disp); in vkCreateInstance()
625 destroy_debug_callbacks_chain(ptr_instance, pAllocator); in vkCreateInstance()
627 if (NULL != ptr_instance->expanded_activated_layer_list.list) { in vkCreateInstance()
628 … loader_deactivate_layers(ptr_instance, NULL, &ptr_instance->expanded_activated_layer_list); in vkCreateInstance()
630 if (NULL != ptr_instance->app_activated_layer_list.list) { in vkCreateInstance()
631 … loader_destroy_layer_list(ptr_instance, NULL, &ptr_instance->app_activated_layer_list); in vkCreateInstance()
634 … loader_delete_layer_list_and_properties(ptr_instance, &ptr_instance->instance_layer_list); in vkCreateInstance()
635 loader_scanned_icd_clear(ptr_instance, &ptr_instance->icd_tramp_list); in vkCreateInstance()
636 … loader_destroy_generic_list(ptr_instance, (struct loader_generic_list *)&ptr_instance->ext_list); in vkCreateInstance()
642 while (NULL != ptr_instance->icd_terms) { in vkCreateInstance()
643 icd_term = ptr_instance->icd_terms; in vkCreateInstance()
644 ptr_instance->icd_terms = icd_term->next; in vkCreateInstance()
645 loader_icd_destroy(ptr_instance, icd_term, pAllocator); in vkCreateInstance()
648 loader_instance_heap_free(ptr_instance, ptr_instance); in vkCreateInstance()
651 ptr_instance->InstanceCreationDeletionDebugFunctionHead = ptr_instance->DbgFunctionHead; in vkCreateInstance()
652 ptr_instance->DbgFunctionHead = NULL; in vkCreateInstance()
663 struct loader_instance *ptr_instance = NULL; in vkDestroyInstance() local
670 ptr_instance = loader_get_instance(instance); in vkDestroyInstance()
671 if (ptr_instance == NULL) { in vkDestroyInstance()
679 ptr_instance->alloc_callbacks = *pAllocator; in vkDestroyInstance()
683 destroy_debug_callbacks_chain(ptr_instance, pAllocator); in vkDestroyInstance()
686 ptr_instance->DbgFunctionHead = ptr_instance->InstanceCreationDeletionDebugFunctionHead; in vkDestroyInstance()
687 ptr_instance->InstanceCreationDeletionDebugFunctionHead = NULL; in vkDestroyInstance()
690 disp->DestroyInstance(ptr_instance->instance, pAllocator); in vkDestroyInstance()
692 if (NULL != ptr_instance->expanded_activated_layer_list.list) { in vkDestroyInstance()
693 loader_deactivate_layers(ptr_instance, NULL, &ptr_instance->expanded_activated_layer_list); in vkDestroyInstance()
695 if (NULL != ptr_instance->app_activated_layer_list.list) { in vkDestroyInstance()
696 loader_destroy_layer_list(ptr_instance, NULL, &ptr_instance->app_activated_layer_list); in vkDestroyInstance()
699 if (ptr_instance->phys_devs_tramp) { in vkDestroyInstance()
700 for (uint32_t i = 0; i < ptr_instance->phys_dev_count_tramp; i++) { in vkDestroyInstance()
701 loader_instance_heap_free(ptr_instance, ptr_instance->phys_devs_tramp[i]); in vkDestroyInstance()
703 loader_instance_heap_free(ptr_instance, ptr_instance->phys_devs_tramp); in vkDestroyInstance()
707 destroy_debug_callbacks_chain(ptr_instance, pAllocator); in vkDestroyInstance()
709 loader_instance_heap_free(ptr_instance, ptr_instance->disp); in vkDestroyInstance()
710 loader_instance_heap_free(ptr_instance, ptr_instance); in vkDestroyInstance()