From 025f39a46bdb70521d06e7f18dca76262bdeb0b2 Mon Sep 17 00:00:00 2001 From: Ian Elliott Date: Mon, 28 Sep 2015 11:24:53 -0600 Subject: WSI Validation: Removed 2 checks that are driver-specific. The purpose of this layer is to validate the application's usage of WSI, not to validate the driver's conformance with WSI. --- layers/swapchain.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'layers/swapchain.cpp') diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index 97fbd145..bfcd2ab8 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -896,6 +896,9 @@ VK_LAYER_EXPORT VkResult VKAPI vkGetSwapchainImagesKHR(VkDevice device, VkSwapch result = device_dispatch_table(device)->GetSwapchainImagesKHR( device, swapchain, pCount, pSwapchainImages); +// TBD: Should we validate that this function was called once with +// pSwapchainImages set to NULL (and record pCount at that time), and then +// called again with a non-NULL pSwapchainImages? if ((result == VK_SUCCESS) && pSwapchain &&pSwapchainImages && pCount && (*pCount > 0)) { // Record the images and their state: @@ -977,22 +980,6 @@ VK_LAYER_EXPORT VkResult VKAPI vkAcquireNextImageKHR(VkDevice device, VkSwapchai if (((result == VK_SUCCESS) || (result == VK_SUBOPTIMAL_KHR)) && pSwapchain) { - if (*pImageIndex >= pSwapchain->imageCount) { - LOG_ERROR(VK_OBJECT_TYPE_SWAPCHAIN_KHR, swapchain, - "VkSwapchainKHR", - SWAPCHAIN_INDEX_TOO_LARGE, - "%s() returned an index that's too large (i.e. %d). " - "There are only %d images in this VkSwapchainKHR.", - __FUNCTION__, *pImageIndex, pSwapchain->imageCount); - } - if (pSwapchain->images[*pImageIndex].ownedByApp) { - LOG_ERROR(VK_OBJECT_TYPE_SWAPCHAIN_KHR, swapchain, - "VkSwapchainKHR", - SWAPCHAIN_INDEX_ALREADY_IN_USE, - "%s() returned an index (i.e. %d) for an image that " - "is already owned by the application.\n", - __FUNCTION__, *pImageIndex); - } // Change the state of the image (now owned by the application): pSwapchain->images[*pImageIndex].ownedByApp = true; } -- cgit v1.2.3