gfx
gfx copied to clipboard
Stale docs for Device::destroy_framebuffer() in 0.6?
Switching over my code to 0.6 and I came across some possibly stale documentation:
Device::destroy_framebuffer() notes the framebuffer shouldn't be destroyed until any submitted command buffers referencing it have finished executing. This is what is also says for 0.5.
This goes against what the quad and color_uniform example do in the new 0.6 swapchain model.
Yep, that's a documentation bug. Thank you for noticing!
I just tried running the colour-uniform example and I get vulkan validation errors that back-up the docs.
VALIDATION [VUID-vkDestroyFramebuffer-framebuffer-00892 (-617577710)] : Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] Object 0: handle = 0x7fcdff033c18, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xdb308312 | Cannot call vkDestroyFramebuffer on VkFramebuffer 0x290000000029[] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892)
object info: (type: DEVICE, hndl: 140522723425304)
GFX version: hal 0.6 + vulkan 0.6.1 (c6fc5d5e95497fc6f7f51d0419cef59440307d78) OS: MacOS Mojave 10.14.6 MoltenVK: 1.2.135.0 GPU: AMD Radeon Pro 450
This error appears to be a bug in Vulkan validation layers. See #3015, #3184, and https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/12#issuecomment-678526213