Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draw_geometry (new chapter 3) attaches to wrong image format #109

Open
tom-leys opened this issue May 4, 2024 · 0 comments
Open

draw_geometry (new chapter 3) attaches to wrong image format #109

tom-leys opened this issue May 4, 2024 · 0 comments

Comments

@tom-leys
Copy link

tom-leys commented May 4, 2024

In Chapter 3 Draw geometry begins with the following code (attaching using VK_IMAGE_LAYOUT_GENERAL):

void VulkanEngine::draw_geometry(VkCommandBuffer cmd)
{
	//begin a render pass  connected to our draw image
	VkRenderingAttachmentInfo colorAttachment = vkinit::attachment_info(_drawImage.imageView, nullptr, VK_IMAGE_LAYOUT_GENERAL);

However we just transitioned to VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. Surely that's the argument required to attachment_info.

vkutil::transition_image(cmd, _drawImage.image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);

draw_geometry(cmd);
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

No branches or pull requests

1 participant