// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceFeatures2 fpGetPhysicalDeviceFeatures2 = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceFeatures2 = icd_term->dispatch.GetPhysicalDeviceFeatures2;
} else if (inst->enabled_known_extensions.khr_get_physical_device_properties2) {
fpGetPhysicalDeviceFeatures2 = icd_term->dispatch.GetPhysicalDeviceFeatures2KHR;
// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceProperties2 fpGetPhysicalDeviceProperties2 = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceProperties2 = icd_term->dispatch.GetPhysicalDeviceProperties2;
} else if (inst->enabled_known_extensions.khr_get_physical_device_properties2) {
fpGetPhysicalDeviceProperties2 = icd_term->dispatch.GetPhysicalDeviceProperties2KHR;
// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceFormatProperties2 fpGetPhysicalDeviceFormatProperties2 = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceFormatProperties2 = icd_term->dispatch.GetPhysicalDeviceFormatProperties2;
} else if (inst->enabled_known_extensions.khr_get_physical_device_properties2) {
fpGetPhysicalDeviceFormatProperties2 = icd_term->dispatch.GetPhysicalDeviceFormatProperties2KHR;
// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceImageFormatProperties2 fpGetPhysicalDeviceImageFormatProperties2 = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceImageFormatProperties2 = icd_term->dispatch.GetPhysicalDeviceImageFormatProperties2;
} else if (inst->enabled_known_extensions.khr_get_physical_device_properties2) {
fpGetPhysicalDeviceImageFormatProperties2 = icd_term->dispatch.GetPhysicalDeviceImageFormatProperties2KHR;
// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceQueueFamilyProperties2 fpGetPhysicalDeviceQueueFamilyProperties2 = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceQueueFamilyProperties2 = icd_term->dispatch.GetPhysicalDeviceQueueFamilyProperties2;
} else if (inst->enabled_known_extensions.khr_get_physical_device_properties2) {
fpGetPhysicalDeviceQueueFamilyProperties2 = icd_term->dispatch.GetPhysicalDeviceQueueFamilyProperties2KHR;
// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceMemoryProperties2 fpGetPhysicalDeviceMemoryProperties2 = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceMemoryProperties2 = icd_term->dispatch.GetPhysicalDeviceMemoryProperties2;
} else if (inst->enabled_known_extensions.khr_get_physical_device_properties2) {
fpGetPhysicalDeviceMemoryProperties2 = icd_term->dispatch.GetPhysicalDeviceMemoryProperties2KHR;
// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 fpGetPhysicalDeviceSparseImageFormatProperties2 = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceSparseImageFormatProperties2 = icd_term->dispatch.GetPhysicalDeviceSparseImageFormatProperties2;
} else if (inst->enabled_known_extensions.khr_get_physical_device_properties2) {
fpGetPhysicalDeviceSparseImageFormatProperties2 = icd_term->dispatch.GetPhysicalDeviceSparseImageFormatProperties2KHR;
// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceExternalBufferProperties fpGetPhysicalDeviceExternalBufferProperties = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceExternalBufferProperties = icd_term->dispatch.GetPhysicalDeviceExternalBufferProperties;
} else if (inst->enabled_known_extensions.khr_external_memory_capabilities) {
fpGetPhysicalDeviceExternalBufferProperties = icd_term->dispatch.GetPhysicalDeviceExternalBufferPropertiesKHR;
}
- if (fpGetPhysicalDeviceExternalBufferProperties) {
+ if (fpGetPhysicalDeviceExternalBufferProperties != NULL) {
// Pass the call to the driver
fpGetPhysicalDeviceExternalBufferProperties(phys_dev_term->phys_dev, pExternalBufferInfo, pExternalBufferProperties);
} else {
// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceExternalSemaphoreProperties fpGetPhysicalDeviceExternalSemaphoreProperties = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceExternalSemaphoreProperties = icd_term->dispatch.GetPhysicalDeviceExternalSemaphoreProperties;
} else if (inst->enabled_known_extensions.khr_external_semaphore_capabilities) {
fpGetPhysicalDeviceExternalSemaphoreProperties = icd_term->dispatch.GetPhysicalDeviceExternalSemaphorePropertiesKHR;
// Get the function pointer to use to call into the ICD. This could be the core or KHR version
PFN_vkGetPhysicalDeviceExternalFenceProperties fpGetPhysicalDeviceExternalFenceProperties = NULL;
- if (inst->app_api_major_version > 1 || inst->app_api_major_version >= 1) {
+ if (inst->app_api_major_version > 1 || inst->app_api_minor_version >= 1) {
fpGetPhysicalDeviceExternalFenceProperties = icd_term->dispatch.GetPhysicalDeviceExternalFenceProperties;
} else if (inst->enabled_known_extensions.khr_external_fence_capabilities) {
fpGetPhysicalDeviceExternalFenceProperties = icd_term->dispatch.GetPhysicalDeviceExternalFencePropertiesKHR;
if (NULL == icd_term->dispatch.GetPhysicalDeviceSurfaceSupportKHR) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceSurfaceSupportKHR!\n");
+ "ICD for selected physical device does not export vkGetPhysicalDeviceSurfaceSupportKHR!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceSurfaceCapabilitiesKHR) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceSurfaceCapabilitiesKHR!\n");
+ "ICD for selected physical device does not export vkGetPhysicalDeviceSurfaceCapabilitiesKHR!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceSurfaceFormatsKHR) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceSurfaceCapabilitiesKHR!\n");
+ "ICD for selected physical device does not export vkGetPhysicalDeviceSurfaceCapabilitiesKHR!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceSurfacePresentModesKHR) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceSurfacePresentModesKHR!\n");
+ "ICD for selected physical device does not exportvkGetPhysicalDeviceSurfacePresentModesKHR!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceWin32PresentationSupportKHR) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceWin32PresentationSupportKHR!\n");
+ "ICD for selected physical device does not exportvkGetPhysicalDeviceWin32PresentationSupportKHR!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceWaylandPresentationSupportKHR) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceWaylandPresentationSupportKHR!\n");
+ "ICD for selected physical device does not exportvkGetPhysicalDeviceWaylandPresentationSupportKHR!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceXcbPresentationSupportKHR) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceXcbPresentationSupportKHR!\n");
+ "ICD for selected physical device does not exportvkGetPhysicalDeviceXcbPresentationSupportKHR!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceXlibPresentationSupportKHR) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceXlibPresentationSupportKHR!\n");
+ "ICD for selected physical device does not exportvkGetPhysicalDeviceXlibPresentationSupportKHR!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceDirectFBPresentationSupportEXT) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceDirectFBPresentationSupportEXT!\n");
+ "ICD for selected physical device does not exportvkGetPhysicalDeviceDirectFBPresentationSupportEXT!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceScreenPresentationSupportQNX) {
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceScreenPresentationSupportQNX!\n");
+ "ICD for selected physical device does not exportvkGetPhysicalDeviceScreenPresentationSupportQNX!\n");
abort();
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceDisplayPropertiesKHR) {
loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceDisplayPropertiesKHR!\n");
+ "ICD for selected physical device does not export vkGetPhysicalDeviceDisplayPropertiesKHR!\n");
*pPropertyCount = 0;
return VK_SUCCESS;
}
if (NULL == icd_term->dispatch.GetPhysicalDeviceDisplayPlanePropertiesKHR) {
loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
- "ICD for selected physical device is not exporting vkGetPhysicalDeviceDisplayPlanePropertiesKHR!\n");
+ "ICD for selected physical device does not export vkGetPhysicalDeviceDisplayPlanePropertiesKHR!\n");
*pPropertyCount = 0;
return VK_SUCCESS;
}
if (NULL == icd_term->dispatch.GetDisplayPlaneSupportedDisplaysKHR) {
loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
- "ICD for selected physical device is not exporting vkGetDisplayPlaneSupportedDisplaysKHR!\n");
+ "ICD for selected physical device does not export vkGetDisplayPlaneSupportedDisplaysKHR!\n");
*pDisplayCount = 0;
return VK_SUCCESS;
}
if (NULL == icd_term->dispatch.GetDisplayModePropertiesKHR) {
loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
- "ICD for selected physical device is not exporting vkGetDisplayModePropertiesKHR!\n");
+ "ICD for selected physical device does not export vkGetDisplayModePropertiesKHR!\n");
*pPropertyCount = 0;
return VK_SUCCESS;
}
if (NULL == icd_term->dispatch.CreateDisplayModeKHR) {
// Can't emulate, so return an appropriate error
loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
- "ICD for selected physical device is not exporting vkCreateDisplayModeKHR!\n");
+ "ICD for selected physical device does not export vkCreateDisplayModeKHR!\n");
return VK_ERROR_INITIALIZATION_FAILED;
}
if (NULL == icd_term->dispatch.GetDisplayPlaneCapabilitiesKHR) {
// Emulate support
loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
- "ICD for selected physical device is not exporting vkGetDisplayPlaneCapabilitiesKHR!\n");
+ "ICD for selected physical device does not export vkGetDisplayPlaneCapabilitiesKHR!\n");
if (pCapabilities) {
memset(pCapabilities, 0, sizeof(VkDisplayPlaneCapabilitiesKHR));
}
// Strip off ending
#if defined(WIN32)
- size_t index = 0;
- index = wrap_layer.find(".dll", index);
- assert(index != std::string::npos);
- wrap_layer.replace(index, 4, "");
+ std::string library_extension = ".dll";
#elif defined(__APPLE__)
- size_t index = 0;
- index = wrap_layer.find(".dylib", index);
- assert(index != std::string::npos);
- wrap_layer.replace(index, 6, "");
+ std::string library_extension = ".dylib";
#else
+ std::string library_extension = ".so";
+#endif
size_t index = 0;
- index = wrap_layer.find(".so", index);
+ index = wrap_layer.find(library_extension, index);
assert(index != std::string::npos);
- wrap_layer.replace(index, 3, "");
-#endif
+ wrap_layer.replace(index, library_extension.size(), "");
for (auto& layer : layer_manifest.layers) {
size_t cur_layer_index = layers.size();