SaschaWillems / Vulkan-glTF-PBR

Physical based rendering with Vulkan using glTF 2.0 models
MIT License
979 stars 132 forks source link

Fix OUT_OF_DEVICE_MEMORY on window resize #20

Closed rmstyrczula closed 5 years ago

rmstyrczula commented 5 years ago

Dragging the window edge on Linux causes dozens of XCB_CONFIGURE_NOTIFY events which quickly causes a VK_ERROR_OUT_OF_DEVICE_MEMORY in one of the calls to vkAllocateMemory in VulkanExampleBase::setupFrameBuffer().

This adds a small change to clean up the allocated memory for the multisampleTarget images.

SaschaWillems commented 5 years ago

Thanks for your PR, very much appreciated.

One thing I noticed: Multisampling is controlled by settings.multisampling, so deletion has to check for that. Will add that myself after merging.