SasisaDev / BetelEngine

An engine for creating pixel-perfect games and more.
0 stars 0 forks source link

Window Fullscreen or Minimization causes Semaphore errors #2

Open SasisaDev opened 5 days ago

SasisaDev commented 5 days ago

Minimize error, happens every frame.

Validation Error: [ VUID-vkQueueSubmit-pWaitSemaphores-03238 ] 
Object 0: handle = 0x564fdd0000000069, type = VK_OBJECT_TYPE_SEMAPHORE; 
Object 1: handle = 0x255830db020, type = VK_OBJECT_TYPE_QUEUE; 
| MessageID = 0xb50452b0 
| vkQueueSubmit(): pSubmits[0].pWaitSemaphores[0] queue (VkQueue 0x255830db020[]) 
is waiting on semaphore (VkSemaphore 0x564fdd0000000069[]) that has no way to be signaled. 
The Vulkan spec states: All elements of the pWaitSemaphores member of all elements of 
pSubmits created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY 
must reference a semaphore signal operation that has been submitted for execution and 
any semaphore signal operations on which it depends must have also been submitted for execution 
(https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkQueueSubmit-pWaitSemaphores-03238)

Fullscreen error, happens on swapchain recreation

Validation Error: [ VUID-vkQueueSubmit-pWaitSemaphores-03238 ] 
Object 0: handle = 0x44349c0000000060, type = VK_OBJECT_TYPE_SEMAPHORE; 
Object 1: handle = 0x255830db020, type = VK_OBJECT_TYPE_QUEUE; 
| MessageID = 0xb50452b0 
| vkQueueSubmit(): pSubmits[0].pWaitSemaphores[0] queue (VkQueue 0x255830db020[]) 
is waiting on semaphore (VkSemaphore 0x44349c0000000060[]) that has no way to be signaled. 
The Vulkan spec states: All elements of the pWaitSemaphores member of all elements of pSubmits 
created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY must reference a semaphore 
signal operation that has been submitted for execution and any semaphore signal operations on 
which it depends must have also been submitted for execution 
(https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkQueueSubmit-pWaitSemaphores-03238)

Also Swapchain Recreation function gets called twice.

SasisaDev commented 5 days ago

Only error left currently is Minimize Error. Problem with it is that context surface is invalidated, and can't be updated. Therefore swapchain is invalid too, semaphores can't signal, which raises error. We shouldn't attempt submitting or presenting anything from composition, that's currently invalid.