Closed phr00t closed 5 years ago
This is likely the validation line where the problem is occurring:
Error: [ VUID-VkFramebufferCreateInfo-pAttachments-00882 ] Object: VK_NULL_HANDLE (Type = 0) | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #1 mip level 0 has dimensions smaller than the corresponding framebuffer dimensions. Here are the respective dimensions for attachment #1, framebuffer: width: 1280, 1398 height: 720, 825 layerCount: 1, 1 The Vulkan spec states: Each element of pAttachments must have dimensions at least as large as the corresponding framebuffer dimension (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-00882) ([0] Validation)
In CommandList.cs, I don't think the new resized backbuffers are getting passed in ClearState().. I think the old backbuffers are being passed, which causes Vulkan to get lost. When newly resized buffers are created in ResizeBackBuffers() in Vulkan Swapchain, it needs to report back to CommandList or GraphicsDevice.Presenter the new backbuffer(s)... (theory)
Vulkan Swapchain needs a " public override Texture BackBuffer => backBuffer;" kinda thing?
BackBuffer is already implemented. Backbuffers are getting passed to ClearState(). Still unsure of the root cause of this problem. Device is still "getting lost" shortly after buffers are resized.
SharpVulkan exception "Error Device Lost" happens on submission after resizing the game window. Likely due to an event where buffers are trying to be resized.