gfx icon indicating copy to clipboard operation
gfx copied to clipboard

Stale docs for Device::destroy_framebuffer() in 0.6?

Open nickwilcox-2b opened this issue 5 years ago • 3 comments

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.

nickwilcox-2b avatar Aug 24 '20 03:08 nickwilcox-2b

Yep, that's a documentation bug. Thank you for noticing!

kvark avatar Aug 24 '20 04:08 kvark

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

nickwilcox-2b avatar Aug 24 '20 05:08 nickwilcox-2b

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

kvark avatar Aug 24 '20 17:08 kvark