• Home
  • Raw
  • Download

Lines Matching defs:icd_term

193     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, NULL);
195 if (NULL == icd_term) {
1169 for (struct loader_icd_term *icd_term = inst->icd_terms; icd_term; icd_term = icd_term->next) {
1170 for (struct loader_device *dev = icd_term->logical_device_list; dev; dev = dev->next)
1180 return icd_term;
1215 void loader_add_logical_device(const struct loader_instance *inst, struct loader_icd_term *icd_term, struct loader_device *dev) {
1216 dev->next = icd_term->logical_device_list;
1217 icd_term->logical_device_list = dev;
1220 void loader_remove_logical_device(const struct loader_instance *inst, struct loader_icd_term *icd_term,
1224 if (!icd_term || !found_dev) return;
1227 dev = icd_term->logical_device_list;
1236 icd_term->logical_device_list = found_dev->next;
1240 void loader_icd_destroy(struct loader_instance *ptr_inst, struct loader_icd_term *icd_term,
1243 for (struct loader_device *dev = icd_term->logical_device_list; dev;) {
1249 loader_instance_heap_free(ptr_inst, icd_term);
1253 struct loader_icd_term *icd_term;
1255 icd_term = loader_instance_heap_calloc(ptr_inst, sizeof(struct loader_icd_term), VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
1256 if (!icd_term) {
1260 icd_term->scanned_icd = scanned_icd;
1261 icd_term->this_instance = ptr_inst;
1264 icd_term->next = ptr_inst->icd_terms;
1265 ptr_inst->icd_terms = icd_term;
1268 return icd_term;
3938 struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, NULL);
3959 return icd_term->dispatch.GetDeviceProcAddr(device, pName);
4260 // Find the icd_term this device belongs to then remove it from that icd_term.
4262 // the device here since it may not have been added to the icd_term and there
4264 struct loader_icd_term *icd_term = inst->icd_terms;
4266 while (!found && NULL != icd_term) {
4267 struct loader_device *cur_dev = icd_term->logical_device_list;
4271 if (cur_dev == icd_term->logical_device_list) {
4272 icd_term->logical_device_list = cur_dev->next;
4283 icd_term = icd_term->next;
4304 struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, NULL);
4305 const struct loader_instance *inst = icd_term->this_instance;
4310 loader_remove_logical_device(inst, icd_term, dev, pAllocator);
5040 struct loader_icd_term *icd_term;
5094 icd_term = loader_icd_add(ptr_instance, &ptr_instance->icd_tramp_list.scanned_list[i]);
5095 if (NULL == icd_term) {
5119 ptr_instance->icd_terms = icd_term->next;
5120 icd_term->next = NULL;
5121 loader_icd_destroy(ptr_instance, icd_term, pAllocator);
5125 res = loader_add_instance_extensions(ptr_instance, icd_term->scanned_icd->EnumerateInstanceExtensionProperties,
5126 icd_term->scanned_icd->lib_name, &icd_exts);
5134 ptr_instance->icd_terms = icd_term->next;
5135 icd_term->next = NULL;
5136 loader_icd_destroy(ptr_instance, icd_term, pAllocator);
5153 (VK_API_VERSION_MAJOR(icd_term->scanned_icd->api_version) == 1 &&
5154 VK_API_VERSION_MINOR(icd_term->scanned_icd->api_version) == 0)) {
5168 if (icd_term->scanned_icd->api_version >= VK_API_VERSION_1_1) {
5169 icd_term->supports_get_dev_prop_2 = true;
5173 icd_term->supports_get_dev_prop_2 = true;
5184 if (icd_term->scanned_icd->api_version >= VK_API_VERSION_1_1) {
5186 (PFN_vkEnumerateInstanceVersion)icd_term->scanned_icd->GetInstanceProcAddr(NULL, "vkEnumerateInstanceVersion");
5194 icd_term->scanned_icd->lib_name);
5231 ptr_instance->icd_tramp_list.scanned_list[i].CreateInstance(&icd_create_info, pAllocator, &(icd_term->instance));
5239 ptr_instance->icd_terms = icd_term->next;
5240 icd_term->next = NULL;
5241 loader_icd_destroy(ptr_instance, icd_term, pAllocator);
5245 if (!loader_icd_init_entries(icd_term, icd_term->instance,
5249 ptr_instance->icd_terms = icd_term->next;
5250 icd_term->next = NULL;
5251 loader_icd_destroy(ptr_instance, icd_term, pAllocator);
5258 NULL != icd_term->dispatch.CreateXlibSurfaceKHR ||
5261 NULL != icd_term->dispatch.CreateXcbSurfaceKHR ||
5264 NULL != icd_term->dispatch.CreateWaylandSurfaceKHR ||
5267 NULL != icd_term->dispatch.CreateAndroidSurfaceKHR ||
5270 NULL != icd_term->dispatch.CreateSurfaceOHOS ||
5273 NULL != icd_term->dispatch.CreateWin32SurfaceKHR ||
5275 NULL != icd_term->dispatch.DestroySurfaceKHR)) {
5291 icd_term = ptr_instance->icd_terms;
5292 while (icd_term != NULL) {
5293 if (icd_term->supports_get_dev_prop_2) {
5297 icd_term = icd_term->next;
5322 icd_term = ptr_instance->icd_terms;
5323 ptr_instance->icd_terms = icd_term->next;
5324 if (NULL != icd_term->instance) {
5325 icd_term->dispatch.DestroyInstance(icd_term->instance, pAllocator);
5327 loader_icd_destroy(ptr_instance, icd_term, pAllocator);
5413 struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
5416 PFN_vkCreateDevice fpCreateDevice = icd_term->dispatch.CreateDevice;
5427 loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
5428 "terminator_CreateDevice: No vkCreateDevice command exposed by ICD %s", icd_term->scanned_icd->lib_name);
5443 loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
5457 res = loader_init_generic_list(icd_term->this_instance, (struct loader_generic_list *)&icd_exts, sizeof(VkExtensionProperties));
5462 res = loader_add_device_extensions(icd_term->this_instance, icd_term->dispatch.EnumerateDeviceExtensionProperties,
5463 phys_dev_term->phys_dev, icd_term->scanned_icd->lib_name, &icd_exts);
5475 loader_log(icd_term->this_instance, VULKAN_LOADER_DEBUG_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
5477 icd_term->scanned_icd->lib_name);
5484 // if (icd_term->this_instance->enabled_known_extensions.khr_device_group_creation == 1) {
5532 // if (icd_term->dispatch.GetPhysicalDeviceFeatures2 == NULL && icd_term->dispatch.GetPhysicalDeviceFeatures2KHR == NULL) {
5540 if (icd_term->dispatch.GetPhysicalDeviceFeatures2 == NULL &&
5541 icd_term->dispatch.GetPhysicalDeviceFeatures2KHR == NULL) {
5542 loader_log(icd_term->this_instance, VULKAN_LOADER_INFO_BIT, 0,
5544 icd_term->scanned_icd->lib_name);
5547 if (icd_term->this_instance->enabled_known_extensions.khr_get_physical_device_properties2) {
5561 if (icd_term->dispatch.EnumeratePhysicalDeviceGroups == NULL &&
5562 icd_term->dispatch.EnumeratePhysicalDeviceGroupsKHR == NULL) {
5563 loader_log(icd_term->this_instance, VULKAN_LOADER_INFO_BIT, 0,
5566 icd_term->scanned_icd->lib_name);
5570 loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
5611 dev->extensions.ext_debug_utils_enabled = icd_term->this_instance->enabled_known_extensions.ext_debug_utils;
5614 icd_term->dispatch.GetPhysicalDeviceProperties(phys_dev_term->phys_dev, &properties);
5621 loader_log(icd_term->this_instance, VULKAN_LOADER_LAYER_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
5622 " Using \"%s\" with driver: \"%s\"\n", properties.deviceName, icd_term->scanned_icd->lib_name);
5626 loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
5627 "terminator_CreateDevice: Failed in ICD %s vkCreateDevice call", icd_term->scanned_icd->lib_name);
5632 loader_add_logical_device(icd_term->this_instance, icd_term, dev);
5639 loader_destroy_generic_list(icd_term->this_instance, (struct loader_generic_list *)&icd_exts);
5871 new_phys_devs[idx]->this_icd_term = dev_array->icd_term;
5884 * They also need to be setup - the icd_term, icd_index, phys_dev, and disp (dispatch table) all need the correct data.
5891 struct loader_icd_term *icd_term;
5923 icd_term = inst->icd_terms;
5924 while (NULL != icd_term) {
5928 if (icd_term->scanned_icd->EnumerateAdapterPhysicalDevices != NULL) {
5929 icd_term = icd_term->next;
5935 res = icd_term->dispatch.EnumeratePhysicalDevices(icd_term->instance, &icd_phys_dev_array[icd_idx].device_count, NULL);
5953 res = icd_term->dispatch.EnumeratePhysicalDevices(icd_term->instance, &(icd_phys_dev_array[icd_idx].device_count),
5958 icd_phys_dev_array[icd_idx].icd_term = icd_term;
5960 icd_term = icd_term->next;
6265 struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
6273 res = icd_term->dispatch.EnumerateDeviceExtensionProperties(phys_dev_term->phys_dev, NULL, &icd_ext_count, NULL);
6278 icd_props_list = loader_instance_heap_alloc(icd_term->this_instance, sizeof(VkExtensionProperties) * icd_ext_count,
6288 res = icd_term->dispatch.EnumerateDeviceExtensionProperties(phys_dev_term->phys_dev, NULL, &icd_ext_count, icd_props_list);
6293 if (!loader_init_layer_list(icd_term->this_instance, &implicit_layer_list)) {
6298 loader_add_implicit_layers(icd_term->this_instance, &implicit_layer_list, NULL, &icd_term->this_instance->instance_layer_list);
6301 res = loader_init_device_extensions(icd_term->this_instance, phys_dev_term, icd_ext_count, icd_props_list, &icd_exts);
6308 res = loader_add_to_ext_list(icd_term->this_instance, &all_exts, icd_exts.count, icd_exts.list);
6313 loader_add_implicit_layers(icd_term->this_instance, &implicit_layer_list, NULL, &icd_term->this_instance->instance_layer_list);
6317 res = loader_add_to_ext_list(icd_term->this_instance, &all_exts, 1,
6346 loader_destroy_generic_list(icd_term->this_instance, (struct loader_generic_list *)&implicit_layer_list);
6349 loader_destroy_generic_list(icd_term->this_instance, (struct loader_generic_list *)&all_exts);
6352 loader_destroy_generic_list(icd_term->this_instance, (struct loader_generic_list *)&icd_exts);
6355 loader_instance_heap_free(icd_term->this_instance, icd_props_list);
6541 struct loader_icd_term *icd_term;
6552 icd_term = inst->icd_terms;
6553 for (uint32_t icd_idx = 0; NULL != icd_term; icd_term = icd_term->next, icd_idx++) {
6556 fpEnumeratePhysicalDeviceGroups = icd_term->dispatch.EnumeratePhysicalDeviceGroupsKHR;
6558 fpEnumeratePhysicalDeviceGroups = icd_term->dispatch.EnumeratePhysicalDeviceGroups;
6564 res = icd_term->dispatch.EnumeratePhysicalDevices(icd_term->instance, &cur_icd_group_count, NULL);
6574 res = fpEnumeratePhysicalDeviceGroups(icd_term->instance, &cur_icd_group_count, NULL);
6622 icd_term = inst->icd_terms;
6623 for (uint8_t icd_idx = 0; NULL != icd_term; icd_term = icd_term->next, icd_idx++) {
6628 fpEnumeratePhysicalDeviceGroups = icd_term->dispatch.EnumeratePhysicalDeviceGroupsKHR;
6630 fpEnumeratePhysicalDeviceGroups = icd_term->dispatch.EnumeratePhysicalDeviceGroups;
6634 icd_term->dispatch.EnumeratePhysicalDevices(icd_term->instance, &count_this_time, NULL);
6646 res = icd_term->dispatch.EnumeratePhysicalDevices(icd_term->instance, &count_this_time, phys_dev_array);
6658 local_phys_dev_groups[cur_index].this_icd_term = icd_term;
6665 res = fpEnumeratePhysicalDeviceGroups(icd_term->instance, &count_this_time, NULL);
6677 res = fpEnumeratePhysicalDeviceGroups(icd_term->instance, &count_this_time,
6689 local_phys_dev_groups[cur_index].this_icd_term = icd_term;
6709 res = fpEnumeratePhysicalDeviceGroups(icd_term->instance, &count_this_time, tmp_group_props);
6720 local_phys_dev_groups[cur_index].this_icd_term = icd_term;