Lines Matching defs:icd
58 TestICD icd;
60 FRAMEWORK_EXPORT TestICD* get_test_icd_func() { return &icd; }
62 icd.~TestICD();
63 return new (&icd) TestICD();
82 return icd.instance_extensions.end() !=
83 std::find_if(icd.instance_extensions.begin(), icd.instance_extensions.end(),
88 return icd.enabled_instance_extensions.end() !=
89 std::find_if(icd.enabled_instance_extensions.begin(), icd.enabled_instance_extensions.end(),
94 for (auto& phys_dev : icd.physical_devices) {
163 auto& layer = FindLayer(icd.instance_layers, std::string(pLayerName));
166 FillCountPtr(icd.instance_extensions, pPropertyCount, pProperties);
173 return FillCountPtr(icd.instance_layers, pPropertyCount, pProperties);
178 *pApiVersion = icd.icd_api_version;
190 if (icd.icd_api_version < VK_API_VERSION_1_1) {
199 icd.add_enabled_instance_extension({pCreateInfo->ppEnabledExtensionNames[iii]});
204 *pInstance = icd.instance_handle.handle;
206 icd.passed_in_instance_create_flags = pCreateInfo->flags;
218 *pPhysicalDeviceCount = static_cast<uint32_t>(icd.physical_devices.size());
221 for (size_t i = 0; i < icd.physical_devices.size(); i++) {
224 pPhysicalDevices[i] = icd.physical_devices[i].vk_physical_device.handle;
242 if (0 == icd.physical_device_groups.size()) {
243 *pPhysicalDeviceGroupCount = static_cast<uint32_t>(icd.physical_devices.size());
245 *pPhysicalDeviceGroupCount = static_cast<uint32_t>(icd.physical_device_groups.size());
260 if (0 == icd.physical_device_groups.size()) {
261 group_count = static_cast<uint32_t>(icd.physical_devices.size());
262 for (size_t device_group = 0; device_group < icd.physical_devices.size(); device_group++) {
271 icd.physical_devices[device_group].vk_physical_device.handle;
277 group_count = static_cast<uint32_t>(icd.physical_device_groups.size());
278 for (size_t device_group = 0; device_group < icd.physical_device_groups.size(); device_group++) {
285 icd.physical_device_groups[device_group].subset_allocation;
287 for (size_t i = 0; i < icd.physical_device_groups[device_group].physical_device_handles.size(); i++) {
290 icd.physical_device_groups[device_group].physical_device_handles[i]->vk_physical_device.handle;
319 icd.messenger_handles.push_back(fake_msgr_handle);
335 auto found_iter = std::find(icd.messenger_handles.begin(), icd.messenger_handles.end(), fake_msgr_handle);
336 if (found_iter != icd.messenger_handles.end()) {
338 icd.messenger_handles.erase(found_iter);
351 if (pd != icd.physical_devices.at(icd.lookup_device(dev).phys_dev_index).vk_physical_device.handle)
355 if (pTagInfo->object != icd.surface_handles.at(0)) return VK_ERROR_DEVICE_LOST;
358 if (pTagInfo->object != (uint64_t)(uintptr_t)icd.instance_handle.handle) return VK_ERROR_DEVICE_LOST;
365 if (pd != icd.physical_devices.at(icd.lookup_device(dev).phys_dev_index).vk_physical_device.handle)
369 if (pNameInfo->object != icd.surface_handles.at(0)) return VK_ERROR_DEVICE_LOST;
372 if (pNameInfo->object != (uint64_t)(uintptr_t)icd.instance_handle.handle) return VK_ERROR_DEVICE_LOST;
383 if (pd != icd.physical_devices.at(icd.lookup_device(dev).phys_dev_index).vk_physical_device.handle)
387 if (pNameInfo->objectHandle != icd.surface_handles.at(0)) return VK_ERROR_DEVICE_LOST;
390 if (pNameInfo->objectHandle != (uint64_t)(uintptr_t)icd.instance_handle.handle) return VK_ERROR_DEVICE_LOST;
397 if (pd != icd.physical_devices.at(icd.lookup_device(dev).phys_dev_index).vk_physical_device.handle)
401 if (pTagInfo->objectHandle != icd.surface_handles.at(0)) return VK_ERROR_DEVICE_LOST;
404 if (pTagInfo->objectHandle != (uint64_t)(uintptr_t)icd.instance_handle.handle) return VK_ERROR_DEVICE_LOST;
427 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
439 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
446 auto found = std::find_if(icd.physical_devices.begin(), icd.physical_devices.end(), [physicalDevice](PhysicalDevice& phys_dev) {
449 if (found == icd.physical_devices.end()) return VK_ERROR_INITIALIZATION_FAILED;
457 icd.device_handles.emplace_back(std::move(device_handle));
463 auto found = std::find(icd.device_handles.begin(), icd.device_handles.end(), device);
464 if (found != icd.device_handles.end()) icd.device_handles.erase(found);
465 auto fd = icd.lookup_device(device);
467 auto& phys_dev = icd.physical_devices.at(fd.phys_dev_index);
474 if (icd.tooling_properties.size() == 0) {
478 *pToolCount = static_cast<uint32_t>(icd.tooling_properties.size());
481 if (i >= icd.tooling_properties.size()) {
484 pToolProperties[i] = icd.tooling_properties[i];
535 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
545 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
557 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
571 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
586 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
599 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
615 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
625 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
635 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
645 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
653 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
668 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
676 auto found_iter = std::find(icd.surface_handles.begin(), icd.surface_handles.end(), fake_surf_handle);
677 if (found_iter != icd.surface_handles.end()) {
679 icd.surface_handles.erase(found_iter);
690 common_nondispatch_handle_creation(icd.swapchain_handles, pSwapchain);
713 auto found_iter = icd.swapchain_handles.erase(
714 std::remove(icd.swapchain_handles.begin(), icd.swapchain_handles.end(), fake_swapchain_handle),
715 icd.swapchain_handles.end());
716 if (!icd.swapchain_handles.empty() && found_iter == icd.swapchain_handles.end()) {
735 auto found_iter = std::find(icd.surface_handles.begin(), icd.surface_handles.end(), fake_surf_handle);
736 if (found_iter == icd.surface_handles.end()) {
742 *pSupported = icd.GetPhysDevice(physicalDevice).queue_family_properties.at(queueFamilyIndex).support_present;
750 auto found_iter = std::find(icd.surface_handles.begin(), icd.surface_handles.end(), fake_surf_handle);
751 if (found_iter == icd.surface_handles.end()) {
757 *pSurfaceCapabilities = icd.GetPhysDevice(physicalDevice).surface_capabilities;
766 auto found_iter = std::find(icd.surface_handles.begin(), icd.surface_handles.end(), fake_surf_handle);
767 if (found_iter == icd.surface_handles.end()) {
772 FillCountPtr(icd.GetPhysDevice(physicalDevice).surface_formats, pSurfaceFormatCount, pSurfaceFormats);
780 auto found_iter = std::find(icd.surface_handles.begin(), icd.surface_handles.end(), fake_surf_handle);
781 if (found_iter == icd.surface_handles.end()) {
786 FillCountPtr(icd.GetPhysDevice(physicalDevice).surface_present_modes, pPresentModeCount, pPresentModes);
794 FillCountPtr(icd.GetPhysDevice(physicalDevice).display_properties, pPropertyCount, pProperties);
800 FillCountPtr(icd.GetPhysDevice(physicalDevice).display_plane_properties, pPropertyCount, pProperties);
806 FillCountPtr(icd.GetPhysDevice(physicalDevice).displays, pDisplayCount, pDisplays);
812 FillCountPtr(icd.GetPhysDevice(physicalDevice).display_mode_properties, pPropertyCount, pProperties);
820 *pMode = icd.GetPhysDevice(physicalDevice).display_mode;
829 *pCapabilities = icd.GetPhysDevice(physicalDevice).display_plane_capabilities;
836 common_nondispatch_handle_creation(icd.surface_handles, pSurface);
857 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
872 common_nondispatch_handle_creation(icd.swapchain_handles, &pSwapchains[i]);
896 icd.allocated_command_buffers.push_back({});
897 pCommandBuffers[i] = icd.allocated_command_buffers.back().handle;
905 auto fd = icd.lookup_device(device);
907 *pQueue = icd.physical_devices.at(fd.phys_dev_index).queue_handles[queueIndex].handle;
916 if (nullptr != display && icd.GetPhysDevice(physicalDevice).displays.size() > 0) {
917 *display = icd.GetPhysDevice(physicalDevice).displays[0];
926 memcpy(pFeatures, &icd.GetPhysDevice(physicalDevice).features, sizeof(VkPhysicalDeviceFeatures));
932 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
943 memcpy(pMemoryProperties, &icd.GetPhysDevice(physicalDevice).memory_properties, sizeof(VkPhysicalDeviceMemoryProperties));
950 FillCountPtr(icd.GetPhysDevice(physicalDevice).sparse_image_format_properties, pPropertyCount, pProperties);
955 memcpy(pFormatProperties, &icd.GetPhysDevice(physicalDevice).format_properties[static_cast<uint32_t>(format)],
964 memcpy(pImageFormatProperties, &icd.GetPhysDevice(physicalDevice).image_format_properties, sizeof(VkImageFormatProperties));
979 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
1007 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
1025 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
1059 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
1068 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
1076 auto& phys_dev = icd.GetPhysDevice(physicalDevice);
1107 if (adapterLUID.LowPart != icd.adapterLUID.LowPart || adapterLUID.HighPart != icd.adapterLUID.HighPart) {
1111 icd.called_enumerate_adapter_physical_devices = true;
1122 if (icd.called_vk_icd_gipa == CalledICDGIPA::not_called &&
1123 icd.called_negotiate_interface == CalledNegotiateInterface::not_called)
1124 icd.called_negotiate_interface = CalledNegotiateInterface::vk_icd_negotiate;
1125 else if (icd.called_vk_icd_gipa != CalledICDGIPA::not_called)
1126 icd.called_negotiate_interface = CalledNegotiateInterface::vk_icd_gipa_first;
1130 if (icd.min_icd_interface_version > *pSupportedVersion) {
1131 icd.interface_version_check = InterfaceVersionCheck::loader_version_too_old;
1132 *pSupportedVersion = icd.min_icd_interface_version;
1137 if (icd.max_icd_interface_version < *pSupportedVersion) {
1138 icd.interface_version_check = InterfaceVersionCheck::loader_version_too_new;
1139 *pSupportedVersion = icd.max_icd_interface_version;
1142 else if (icd.max_icd_interface_version > *pSupportedVersion) {
1143 icd.interface_version_check = InterfaceVersionCheck::icd_version_too_new;
1146 icd.interface_version_check = InterfaceVersionCheck::version_is_supported;
1147 *pSupportedVersion = icd.max_icd_interface_version;
1171 if (icd.icd_api_version >= VK_API_VERSION_1_1) {
1173 return icd.can_query_vkEnumerateInstanceVersion ? to_vkVoidFunction(test_vkEnumerateInstanceVersion) : nullptr;
1219 if (icd.min_icd_interface_version >= 3 && icd.enable_icd_wsi == true) {
1222 icd.is_using_icd_wsi = true;
1304 icd.is_using_icd_wsi = true;
1330 return icd.can_query_GetPhysicalDeviceFuncs ? to_vkVoidFunction(test_vkGetPhysicalDeviceFeatures) : nullptr;
1332 return icd.can_query_GetPhysicalDeviceFuncs ? to_vkVoidFunction(test_vkGetPhysicalDeviceProperties) : nullptr;
1334 return icd.can_query_GetPhysicalDeviceFuncs ? to_vkVoidFunction(test_vkGetPhysicalDeviceMemoryProperties) : nullptr;
1336 return icd.can_query_GetPhysicalDeviceFuncs ? to_vkVoidFunction(test_vkGetPhysicalDeviceSparseImageFormatProperties)
1339 return icd.can_query_GetPhysicalDeviceFuncs ? to_vkVoidFunction(test_vkGetPhysicalDeviceFormatProperties) : nullptr;
1341 return icd.can_query_GetPhysicalDeviceFuncs ? to_vkVoidFunction(test_vkGetPhysicalDeviceImageFormatProperties) : nullptr;
1395 if (icd.icd_api_version >= VK_MAKE_API_VERSION(0, 1, 1, 0)) {
1421 if (icd.supports_tooling_info_core) {
1424 if (icd.supports_tooling_info_ext) {
1429 for (auto& phys_dev : icd.physical_devices) {
1456 for (auto& func : icd.custom_instance_functions) {
1479 fd = icd.lookup_device(device);
1481 create_info = icd.physical_devices.at(fd.phys_dev_index).device_create_infos.at(fd.dev_index);
1493 if (icd.icd_api_version >= VK_API_VERSION_1_1 && string_eq(pName, "vkGetDeviceGroupSurfacePresentModesKHR"))
1521 for (const auto& phys_dev : icd.physical_devices) {
1544 return icd.exposes_vk_icdNegotiateLoaderICDInterfaceVersion
1549 return icd.exposes_vk_icdGetPhysicalDeviceProcAddr ? to_vkVoidFunction(vk_icdGetPhysicalDeviceProcAddr) : NULL;
1553 return icd.exposes_vk_icdEnumerateAdapterPhysicalDevices ? to_vkVoidFunction(vk_icdEnumerateAdapterPhysicalDevices)
1560 return icd.exposes_vkEnumerateInstanceExtensionProperties
1566 return icd.can_query_vkEnumerateInstanceVersion ? to_vkVoidFunction(test_vkEnumerateInstanceVersion) : nullptr;
1596 if (icd.called_vk_icd_gipa == CalledICDGIPA::not_called) icd.called_vk_icd_gipa = CalledICDGIPA::vk_icd_gipa;
1601 if (icd.called_vk_icd_gipa == CalledICDGIPA::not_called) icd.called_vk_icd_gipa = CalledICDGIPA::vk_gipa;