Closed f1shel closed 2 years ago
Some code here: https://gist.github.com/f1shel/3707292d6b6683c5eec3a4a12d6f4781
Solved. Finally, I found that only ray generation shader was added to the shader group when creating shader binding table.
I just ran into this myself, and it looks like the fix here was correct - it looks like if the device segfaults (e.g. when trying to access a shader group not in the shader binding table), the current Vulkan Validation Layer first emits this semaphore error before we catch VK_ERROR_DEVICE_LOST
.
Hi! As the title says, I encountered some very strange bugs and the program will exit unproperly in:
On my local machine, the swapchain creates 3 entries and so has 3 somaphore pairs (readSemaphore and writeSemaphore). The brief code of my program is shown below:
When the loop goes through the 2nd (also 3rd) time,
submitFrame()::present()::vkQueuePresentKHR()
trigers Vulkan Validation Layer Error:According to the Vulkan spec which states:
The error is most likely caused by a semaphore that will never be signaled. However, this is weird. I debugged the code and found that the waitSemaphore in
vkQueuePresentKHR()
should have been signaled byvkQueueSubmit()
insubmitFrame()
.vkQueueSubmit:
set presentInfo in vkQueuePresentKHR:
presentInfo.pWaitSemaphores
andsubmitInfo.pSignalSemaphores
actually are same:The strangest thing is that this bug seems to be related to my shader code. When I simply generate uv in ray generation, the program runs fine. When I try to generate a distance image in ray tracing, say:
or
this error will occur. And if I make a small adjustment:
the bug disappears.
Could you please help me? Thanks in advance.