Skip to content

fix vkb initialization and transitions#119

Open
prathikkaranth wants to merge 1 commit intovblanco20-1:all-chapters-2from
prathikkaranth:chapter_5_bug_fix
Open

fix vkb initialization and transitions#119
prathikkaranth wants to merge 1 commit intovblanco20-1:all-chapters-2from
prathikkaranth:chapter_5_bug_fix

Conversation

@prathikkaranth
Copy link
Copy Markdown

@prathikkaranth prathikkaranth commented Aug 23, 2024

Fix for assertion error:

Assertion failed: features_13.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES

and validation error:

Validation Error: [ VUID-VkImageMemoryBarrier2-oldLayout-01197 ] Object 0: handle = 0x13572e86d80, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xcfef35000000000a, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x2c8c6e7d | vkCmdPipelineBarrier2(): pDependencyInfo->pImageMemoryBarriers[0].image (VkImage 0xcfef35000000000a[]) cannot transition the layout of aspect=1, level=0, layer=0 from VK_IMAGE_LAYOUT_GENERAL when the previous known layout is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. The Vulkan spec states: If srcQueueFamilyIndex and dstQueueFamilyIndex define a queue family ownership transfer or oldLayout and newLayout define an image layout transition, oldLayout must be VK_IMAGE_LAYOUT_UNDEFINED or the current layout of the image subresources affected by the barrier

Comment thread chapter-5/vk_engine.cpp
SDL_Vulkan_CreateSurface(_window, _instance, &_surface);

VkPhysicalDeviceVulkan13Features features13 {};
features13.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES;
Copy link
Copy Markdown

@MikeWhy MikeWhy Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also #128

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