Skip to content

Fix image layout transition in 'pick' pass#111

Merged
hyv1001 merged 1 commit into
BoomingTech:mainfrom
AirGuanZ:main
Apr 14, 2022
Merged

Fix image layout transition in 'pick' pass#111
hyv1001 merged 1 commit into
BoomingTech:mainfrom
AirGuanZ:main

Conversation

@AirGuanZ
Copy link
Copy Markdown
Contributor

The current 'pick' implementation uses an image barrier before the copy command, which transfers the rendered image from VK_IMAGE_LAYOUT_UNDEFINED to VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL. According to vk spec, doing so will cause the contents of the image’s memory to be undefined. The expected oldLayout is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL specified in the finalLayout field of subpass description.

Similarly, an earlier barrier transfers the image's layout from VK_IMAGE_LAYOUT_UNDEFINED to VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. This transition is presented again in the renderpass description.

This commit fixes #42 by correcting these layout values.

@hyv1001 hyv1001 merged commit f3d3d56 into BoomingTech:main Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

无法在视口中点击鼠标左键选中物体

2 participants