layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map);
assert(my_data != NULL);
+ if (!instance_extension_map[get_dispatch_table(pc_instance_table_map, physicalDevice)].surface_enabled) {
+ skip_call |= log_msg(
+ my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
+ reinterpret_cast<uint64_t>(physicalDevice), __LINE__, EXTENSION_NOT_ENABLED,
+ LayerName,
+ "vkGetPhysicalDeviceSurfaceSupportKHR() called even though the %s extension was not enabled for this VkInstance.",
+ VK_KHR_SURFACE_EXTENSION_NAME);
+ }
+
skip_call |=
parameter_validation_vkGetPhysicalDeviceSurfaceSupportKHR(my_data->report_data, queueFamilyIndex, surface, pSupported);
layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map);
assert(my_data != NULL);
+ if (!instance_extension_map[get_dispatch_table(pc_instance_table_map, physicalDevice)].surface_enabled) {
+ skip_call |= log_msg(
+ my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
+ reinterpret_cast<uint64_t>(physicalDevice), __LINE__, EXTENSION_NOT_ENABLED,
+ LayerName,
+ "vkGetPhysicalDeviceSurfaceCapabilitiesKHR() called even though the %s extension was not enabled for this VkInstance.",
+ VK_KHR_DISPLAY_EXTENSION_NAME);
+ }
+
skip_call |=
parameter_validation_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(my_data->report_data, surface, pSurfaceCapabilities);
layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map);
assert(my_data != NULL);
+ if (!instance_extension_map[get_dispatch_table(pc_instance_table_map, physicalDevice)].surface_enabled) {
+ skip_call |= log_msg(
+ my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
+ reinterpret_cast<uint64_t>(physicalDevice), __LINE__, EXTENSION_NOT_ENABLED,
+ LayerName,
+ "vkGetPhysicalDeviceSurfaceFormatsKHR() called even though the %s extension was not enabled for this VkInstance.",
+ VK_KHR_DISPLAY_EXTENSION_NAME);
+ }
+
skip_call |= parameter_validation_vkGetPhysicalDeviceSurfaceFormatsKHR(my_data->report_data, surface, pSurfaceFormatCount,
pSurfaceFormats);
layer_data *my_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map);
assert(my_data != NULL);
+ if (!instance_extension_map[get_dispatch_table(pc_instance_table_map, physicalDevice)].surface_enabled) {
+ skip_call |= log_msg(
+ my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
+ reinterpret_cast<uint64_t>(physicalDevice), __LINE__, EXTENSION_NOT_ENABLED,
+ LayerName,
+ "vkGetPhysicalDeviceSurfacePresentModesKHR() called even though the %s extension was not enabled for this VkInstance.",
+ VK_KHR_DISPLAY_EXTENSION_NAME);
+ }
+
skip_call |= parameter_validation_vkGetPhysicalDeviceSurfacePresentModesKHR(my_data->report_data, surface, pPresentModeCount,
pPresentModes);
reinterpret_cast<PFN_vkVoidFunction>(GetPhysicalDeviceSurfacePresentModesKHR)},
};
- VkLayerInstanceDispatchTable *pTable = get_dispatch_table(pc_instance_table_map, instance);
- if (instance_extension_map[pTable].surface_enabled) {
- for (size_t i = 0; i < ARRAY_SIZE(wsi_instance_commands); i++) {
- if (!strcmp(wsi_instance_commands[i].name, name))
- return wsi_instance_commands[i].proc;
- }
+ for (size_t i = 0; i < ARRAY_SIZE(wsi_instance_commands); i++) {
+ if (!strcmp(wsi_instance_commands[i].name, name))
+ return wsi_instance_commands[i].proc;
}
#ifdef VK_USE_PLATFORM_WIN32_KHR
pPhysicalDevice = (it == my_data->physicalDeviceMap.end()) ? NULL : &it->second;
}
- // Validate that the surface extension was enabled:
- if (pPhysicalDevice && pPhysicalDevice->pInstance && !pPhysicalDevice->pInstance->surfaceExtensionEnabled) {
- skip_call |= log_msg(
- my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- reinterpret_cast<uint64_t>(pPhysicalDevice->pInstance->instance), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED,
- swapchain_layer_name,
- "vkGetPhysicalDeviceSurfaceSupportKHR() called even though the %s extension was not enabled for this VkInstance.",
- VK_KHR_SURFACE_EXTENSION_NAME);
- }
if (!pPhysicalDevice->gotQueueFamilyPropertyCount) {
skip_call |= log_msg(
my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
pPhysicalDevice = (it == my_data->physicalDeviceMap.end()) ? NULL : &it->second;
}
- // Validate that the surface extension was enabled:
- if (pPhysicalDevice && pPhysicalDevice->pInstance && !pPhysicalDevice->pInstance->surfaceExtensionEnabled) {
- skip_call |= log_msg(
- my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- reinterpret_cast<uint64_t>(pPhysicalDevice->pInstance->instance), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED,
- swapchain_layer_name,
- "vkGetPhysicalDeviceSurfaceCapabilitiesKHR() called even though the %s extension was not enabled for this VkInstance.",
- VK_KHR_DISPLAY_EXTENSION_NAME);
- }
lock.unlock();
if (!skip_call) {
pPhysicalDevice = (it == my_data->physicalDeviceMap.end()) ? NULL : &it->second;
}
- // Validate that the surface extension was enabled:
- if (pPhysicalDevice && pPhysicalDevice->pInstance && !pPhysicalDevice->pInstance->surfaceExtensionEnabled) {
- skip_call |= log_msg(
- my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- reinterpret_cast<uint64_t>(pPhysicalDevice->pInstance->instance), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED,
- swapchain_layer_name,
- "vkGetPhysicalDeviceSurfaceFormatsKHR() called even though the %s extension was not enabled for this VkInstance.",
- VK_KHR_DISPLAY_EXTENSION_NAME);
- }
if (pPhysicalDevice && pSurfaceFormats) {
// Compare the preliminary value of *pSurfaceFormatCount with the value this time:
if (pPhysicalDevice->surfaceFormatCount == 0) {
pPhysicalDevice = (it == my_data->physicalDeviceMap.end()) ? NULL : &it->second;
}
- // Validate that the surface extension was enabled:
- if (pPhysicalDevice && pPhysicalDevice->pInstance && !pPhysicalDevice->pInstance->surfaceExtensionEnabled) {
- skip_call |= log_msg(
- my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT,
- reinterpret_cast<uint64_t>(pPhysicalDevice->pInstance->instance), __LINE__, SWAPCHAIN_EXT_NOT_ENABLED_BUT_USED,
- swapchain_layer_name,
- "vkGetPhysicalDeviceSurfacePresentModesKHR() called even though the %s extension was not enabled for this VkInstance.",
- VK_KHR_DISPLAY_EXTENSION_NAME);
- }
if (pPhysicalDevice && pPresentModes) {
// Compare the preliminary value of *pPresentModeCount with the value this time:
if (pPhysicalDevice->presentModeCount == 0) {