You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one of my demos I was getting an occasional validation errors:
[ UNASSIGNED-CoreValidation-DrawState-SwapchainTooManyImages ] Object: 0x2 (Type = 27) | vkAcquireNextImageKHR: Application has already acquired the maximum number of images (0x1)
[ UNASSIGNED-CoreValidation-DrawState-QueueForwardProgress ] Object: 0x77 (Type = 5) | Queue 0x1cdf7a0ca60 is waiting on semaphore 0x77 that has no way to be signaled.
While VL reports errors it doesn't provide several important details:
VL didn't report an error on vkQueuePresentKHR that was preceding the failing vkAcquireNextImageKHR. The source error happened on presentation and Vulkan returned an error code: -1000001004 which signals that the swap chain presentation request failed because swapchain is no longer valid (in my case it was resized). VL didn't report that failure although I had the following bits set: VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_DEBUG_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT
I think this sort of errors should be called out at least under WARNING, something like: Presentation failed because swapchain was invalidated. Applicaiton is responsible for recreating the swapchain now, and subsequent calls using swapchain will fail.
The vkAcquireNextImageKHR validation error reports that the maximum number of images got acquired which is incorrect. The correct error message should be: "There are no images in the swapchain, because it's invalid, go recreate the swapchain". The vkAcquireNextImageKHR actually reports the same error code -1000001004, which VL should report inside it's messaging.
The subsequent queue error is caused by the fact, that a failed vkAcquireNextImageKHR will not signal the semaphore. It would be beneficial for me to see a message about this in VL output as well. A messag e on a failed vkAcquireNextImageKHR should be extended to say: "Because the vkAcquireNextImageKHR failed, the semaphore will not be signaled."
Last but not least, the error happened because my demo would create the swapchain and then switch to fullscreen mode. This somehow invalidated the swapchain on the first presentation call, and not on the first vkAcquireNextImageKHR. I am not sure if it's feasible for VLs to catch that, and it would be great if it is.
The text was updated successfully, but these errors were encountered:
@alexander-a-kharlamov, thanks for the issue. In general, the validation layers avoid generating messages for failure codes documented in the specification. The parameter validation layer previously warned on non-success return codes, but this capability was removed due to overwhelming user feedback. There is an existing issue and plan to implement these checks as part of the Assistant Layer (#24): "Add warnings for non-success driver return values".
Similarly, as far as it is practical, we attempt to do the same for warnings. The assistant layer tracking issue also calls out an item "#2089 No error when recreating swapchain while rendering to an existing swapchain image" which will hopefully cover the warnings that would help in this situation. Please feel free to comment on #24 to add ideas for additional warnings or information.
In one of my demos I was getting an occasional validation errors:
[ UNASSIGNED-CoreValidation-DrawState-SwapchainTooManyImages ] Object: 0x2 (Type = 27) | vkAcquireNextImageKHR: Application has already acquired the maximum number of images (0x1)
[ UNASSIGNED-CoreValidation-DrawState-QueueForwardProgress ] Object: 0x77 (Type = 5) | Queue 0x1cdf7a0ca60 is waiting on semaphore 0x77 that has no way to be signaled.
While VL reports errors it doesn't provide several important details:
VL didn't report an error on vkQueuePresentKHR that was preceding the failing vkAcquireNextImageKHR. The source error happened on presentation and Vulkan returned an error code: -1000001004 which signals that the swap chain presentation request failed because swapchain is no longer valid (in my case it was resized). VL didn't report that failure although I had the following bits set: VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_DEBUG_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT
I think this sort of errors should be called out at least under WARNING, something like: Presentation failed because swapchain was invalidated. Applicaiton is responsible for recreating the swapchain now, and subsequent calls using swapchain will fail.
The vkAcquireNextImageKHR validation error reports that the maximum number of images got acquired which is incorrect. The correct error message should be: "There are no images in the swapchain, because it's invalid, go recreate the swapchain". The vkAcquireNextImageKHR actually reports the same error code -1000001004, which VL should report inside it's messaging.
The subsequent queue error is caused by the fact, that a failed vkAcquireNextImageKHR will not signal the semaphore. It would be beneficial for me to see a message about this in VL output as well. A messag e on a failed vkAcquireNextImageKHR should be extended to say: "Because the vkAcquireNextImageKHR failed, the semaphore will not be signaled."
Last but not least, the error happened because my demo would create the swapchain and then switch to fullscreen mode. This somehow invalidated the swapchain on the first presentation call, and not on the first vkAcquireNextImageKHR. I am not sure if it's feasible for VLs to catch that, and it would be great if it is.
The text was updated successfully, but these errors were encountered: