diff options
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index f073e118..696120aa 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -11610,6 +11610,13 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, VkSwapchainC "DS", "vkCreateSwapchainKHR(): pCreateInfo->oldSwapchain's surface is not pCreateInfo->surface")) return true; } + auto physical_device_state = getPhysicalDeviceState(dev_data->instance_data, dev_data->physical_device); + if (physical_device_state->vkGetPhysicalDeviceSurfaceCapabilitiesKHRState == UNCALLED) { + if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, + reinterpret_cast<uint64_t>(dev_data->physical_device), __LINE__, DRAWSTATE_SWAPCHAIN_CREATE_BEFORE_QUERY, "DS", + "vkCreateSwapchainKHR(): surface capabilities not retrieved for this physical device")) + return true; + } return false; } |
