diff options
| author | Ian Elliott <ianelliott@google.com> | 2016-03-23 08:28:54 -0600 |
|---|---|---|
| committer | Ian Elliott <ianelliott@google.com> | 2016-03-23 08:53:00 -0600 |
| commit | 0234cd2e5685ff7b3787877b38870c0fcdf2bae4 (patch) | |
| tree | 71d93a814709816882cef1fcef491f6fdc9c8f5f /layers/swapchain.cpp | |
| parent | 0218c000b4641d9f26de8cdf89ed4ac6f212bdac (diff) | |
| download | usermoji-0234cd2e5685ff7b3787877b38870c0fcdf2bae4.tar.xz | |
layers: GH117: swapchain layer warns if app uses neither semaphore nor fence.
This addresses github issue #117. Applications should call
vkAcquireNextImageKHR with either a valid semaphore and/or fence. Issue a
warning if both are set to VK_NULL_HANDLE.
Diffstat (limited to 'layers/swapchain.cpp')
| -rw-r--r-- | layers/swapchain.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index d513208f..84bcaad1 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -1743,6 +1743,11 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(VkDevice de "%s() called even though the %s extension was not enabled for this VkDevice.", __FUNCTION__, VK_KHR_SWAPCHAIN_EXTENSION_NAME); } + if ((semaphore == VK_NULL_HANDLE) && (fence == VK_NULL_HANDLE)) { + skipCall |= LOG_WARNING(VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, device, "VkDevice", SWAPCHAIN_NO_SYNC_FOR_ACQUIRE, + "%s() called with both the semaphore and fence parameters set to " + "VK_NULL_HANDLE (at least one should be used).", __FUNCTION__); + } SwpSwapchain *pSwapchain = &my_data->swapchainMap[swapchain]; if (pSwapchain) { // Look to see if the application is trying to own too many images at |
