From 6a441764d9b4f423860811e1be23d6afdc4a5bc2 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 22 Sep 2016 16:40:27 +1200 Subject: layers: Move ACQUIRE_NO_SYNC check from Swapchain to Core Validation Signed-off-by: Chris Forbes --- layers/core_validation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 114a34ec..129ab922 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -11314,6 +11314,14 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainK bool skip_call = false; std::unique_lock lock(global_lock); + + if (fence == VK_NULL_HANDLE && semaphore == VK_NULL_HANDLE) { + skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, + reinterpret_cast(device), __LINE__, DRAWSTATE_NO_SYNC_FOR_ACQUIRE, "DS", + "vkAcquireNextImageKHR: Semaphore and fence cannot both be VK_NULL_HANDLE. There would be no way " + "to determine the completion of this operation."); + } + auto pSemaphore = getSemaphoreNode(dev_data, semaphore); if (pSemaphore && pSemaphore->signaled) { skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, -- cgit v1.2.3