Skip to content

It's not allowed to transition swapchain images without first acquiring them #1

@ratchetfreak

Description

@ratchetfreak

https://github.com/GPUOpen-LibrariesAndSDKs/Anvil/blob/f50cfeb203b500bd3a95ba17b9f9c8fa84c49ec5/src/wrappers/swapchain.cpp#L325

Here you setup a resource transition for each image in the swapchain which you run during initialize without acquiring them. This is not allowed.

https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/xhtml/vkspec.html#_wsi_swapchain

Use of a presentable image must occur only after the image is returned by vkAcquireNextImageKHR, and before it is presented by vkQueuePresentKHR. This includes transitioning the image layout and rendering commands.

Instead you can set the initialLayout of the renderpass attachment to VK_IMAGE_LAYOUT_UNDEFINED. Implying that you don't care about the existing data (which can then be made explicit by a load_op_clear). This will need to happen in the usage code.

For more info see http://stackoverflow.com/q/37524032/731620

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions