diff options
author | Chris Forbes <chrisforbes@google.com> | 2016-09-22 16:40:27 +1200 |
---|---|---|
committer | Chris Forbes <chrisforbes@google.com> | 2016-09-27 09:08:44 +1300 |
commit | 449670637ef4214b33018f497cf10daeff9dc85b (patch) | |
tree | 2832f380be8efc36e8b6bbff6fab9c4590f09113 /layers/core_validation.cpp | |
parent | 87070d81bca386e4a3fb1295e8d7dc232ec48622 (diff) |
layers: Move ACQUIRE_NO_SYNC check from Swapchain to Core Validation
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r-- | layers/core_validation.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<std::mutex> 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<uint64_t &>(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, |