diff options
Diffstat (limited to 'layers/swapchain.cpp')
| -rw-r--r-- | layers/swapchain.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index ff768167..9a3c2faf 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -1705,8 +1705,14 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR( VkFence fence, uint32_t* pImageIndex) { -// TODO: Record/update the state of the swapchain, in case an error occurs -// (e.g. VK_ERROR_OUT_OF_DATE_KHR). +// TODOs: +// +// - Address the timeout. Possibilities include looking at the state of the +// swapchain's images, depending on the timeout value. +// - Validate that semaphore and fence are either VK_NULL_HANDLE or valid +// handles. +// - Record/update the state of the swapchain, in case an error occurs +// (e.g. VK_ERROR_OUT_OF_DATE_KHR). VkResult result = VK_SUCCESS; VkBool32 skipCall = VK_FALSE; layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); @@ -1757,6 +1763,11 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR( __FUNCTION__, __FUNCTION__); } } + if (!pImageIndex) { + skipCall |= LOG_ERROR_NULL_POINTER(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, + device, + "pImageIndex"); + } if (VK_FALSE == skipCall) { // Call down the call chain: |
