aboutsummaryrefslogtreecommitdiff
path: root/layers/swapchain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/swapchain.cpp')
-rw-r--r--layers/swapchain.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp
index e4a00c34..282a271a 100644
--- a/layers/swapchain.cpp
+++ b/layers/swapchain.cpp
@@ -1559,6 +1559,21 @@ static VkBool32 validateCreateSwapchainKHR(
// Keep around a useful pointer to pPhysicalDevice:
SwpPhysicalDevice *pPhysicalDevice = pDevice->pPhysicalDevice;
+ // Validate pCreateInfo values with result of
+ // vkGetPhysicalDeviceQueueFamilyProperties
+ if (pPhysicalDevice && pPhysicalDevice->gotQueueFamilyPropertyCount) {
+ for (auto i = 0; i < pCreateInfo->queueFamilyIndexCount; i++) {
+ if (pCreateInfo->pQueueFamilyIndices[i] >=
+ pPhysicalDevice->numOfQueueFamilies) {
+ skipCall |= LOG_ERROR_QUEUE_FAMILY_INDEX_TOO_LARGE(
+ VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT,
+ pPhysicalDevice, "VkPhysicalDevice",
+ pCreateInfo->pQueueFamilyIndices[i],
+ pPhysicalDevice->numOfQueueFamilies);
+ }
+ }
+ }
+
// Validate pCreateInfo values with the results of
// vkGetPhysicalDeviceSurfaceCapabilitiesKHR():
if (!pPhysicalDevice || !pPhysicalDevice->gotSurfaceCapabilities) {