FNA-XNA / FNA3D

FNA3D - 3D Graphics Library for FNA
http://fna-xna.github.io/
Other
287 stars 48 forks source link

Vulkan: Fix multisample and depth stencil RT texture leaks #76

Closed thatcosmonaut closed 3 years ago

thatcosmonaut commented 3 years ago

This patch fixes VULKAN_AddDisposeRenderbuffer not disposing textures created when generating a render target.

jeffphilp commented 3 years ago

I think the 1e4b66b commit combined with 491a26e can lead to a segmentation fault, as the disposal code for render buffers VULKAN_INTERNAL_DestroyRenderBuffer invoked from VULKAN_INTERNAL_PerformDeferredDestroys destroys the textures but it wasn't originally getting invoked due to the typo fixed in 1e4b66b. So now with 491a26e also scheduling a destory it ends up happening twice.

thatcosmonaut commented 3 years ago

@jeffphilp You are absolutely right! Nice catch. I'll fix this.