mellinoe / veldrid-samples

Sample projects for Veldrid
https://mellinoe.github.io/veldrid-docs/
121 stars 48 forks source link

GettingStarted & Vulkan & Debug=True - throws exception on SwapBuffers after window resizing #24

Open RawRCoder opened 4 years ago

RawRCoder commented 4 years ago

Conditions:

Runs fine, but window resizing or maximization leads to following exception:

Unhandled Exception: Veldrid.VeldridException: A Vulkan validation error was encountered: [ErrorEXT] (SwapchainKHREXT)  [ UNASSIGNED-CoreValidation-DrawState-SwapchainImageNotAcquired ] Object: 0x364d940000000031 (Type = 27) | vkQueuePresentKHR: Swapchain image index 0 has not been acquired.
   at Veldrid.Vk.VkGraphicsDevice.DebugCallback(UInt32 flags, VkDebugReportObjectTypeEXT objectType, UInt64 object, UIntPtr location, Int32 messageCode, Byte* pLayerPrefix, Byte* pMessage, Void* pUserData) in C:\projects\veldrid\src\Veldrid\Vk\VkGraphicsDevice.cs:line 602
   at Vulkan.VulkanNative.vkQueuePresentKHR(VkQueue queue, VkPresentInfoKHR& pPresentInfo)
   at Veldrid.Vk.VkGraphicsDevice.SwapBuffersCore(Swapchain swapchain) in C:\projects\veldrid\src\Veldrid\Vk\VkGraphicsDevice.cs:line 334
   at GettingStarted.Program.Draw() in D:\Projects\veldrid-samples\src\GettingStarted\Program.cs:line 166
   at GettingStarted.Program.Main(String[] args) in D:\Projects\veldrid-samples\src\GettingStarted\Program.cs:line 67

PS: At the same time, TexturedCube sample with same alterations made in SampleBase runs without any issues PS: Debug set to false prevents exception, but in this case when I resize window - image does not stretch with the window as expected

IGCBOOM commented 4 years ago

Getting the same error as well with same settings and an 2080Ti.