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 | 6a441764d9b4f423860811e1be23d6afdc4a5bc2 (patch) | |
| tree | 30430fb6af7843e336fe7edcc96a77bf49b1c1d2 /layers/core_validation.cpp | |
| parent | 24ef81b5f1ce35b94050521724ba2750bcc85b1d (diff) | |
| download | usermoji-6a441764d9b4f423860811e1be23d6afdc4a5bc2.tar.xz | |
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, |
