diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-02-25 13:56:57 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-02-29 08:53:05 -0700 |
| commit | 5faa4540a1dda99d67ade15ee2b66186c48ff627 (patch) | |
| tree | 2d3fbbc0a355401c4b425ac53d0f71f8a3085670 /layers/swapchain.cpp | |
| parent | c63539ba5667a01daf432e88af78dcf14d2783dd (diff) | |
| download | usermoji-5faa4540a1dda99d67ade15ee2b66186c48ff627.tar.xz | |
layers: GL107, Validate queueFamilyIndices for CreateSwapchain
Diffstat (limited to 'layers/swapchain.cpp')
| -rw-r--r-- | layers/swapchain.cpp | 15 |
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) { |
