Validtion error in lesson 03.03.01 Command buffers

Open
#436 0 comments 0 reactions 1 assignee View on GitHub

@SaschaWillems is already working on this.

Since Jul 23, 2026.

Assessment

This issue has not been assessed yet.

Description

Following the tutorial there is an validation error from using vkCmdPipelineBarrier2() without enabling the extension. This function was introduced for placing a barrier for transitioning the image layout of the framebuffer.
This function requires an extension to use but the tutorial doesn't mention this being required and the linked C++ code also doesn't update either the isDeviceSuitable() or createLogicalDevice() functions to reflect this new required extension.
The C++ code in the next chapter does have isDeviceSuitable() and createLogicalDevice() functions to enable this feature by checking and setting VkPhysicalDeviceVulkan13Features.synchronization2.

bool supportsRequiredFeatures = features.template get<vk::PhysicalDeviceVulkan11Features>().shaderDrawParameters &&
                                features.template get<vk::PhysicalDeviceVulkan13Features>().dynamicRendering &&
                                features.template get<vk::PhysicalDeviceVulkan13Features>().synchronization2 &&
                                features.template get<vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>().extendedDynamicState;
// query for Vulkan 1.3 features
vk::StructureChain<vk::PhysicalDeviceFeatures2,
                   vk::PhysicalDeviceVulkan11Features,
                   vk::PhysicalDeviceVulkan13Features,
                   vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>
    featureChain = {
        {},                                                          // vk::PhysicalDeviceFeatures2
        {.shaderDrawParameters = true},                              // vk::PhysicalDeviceVulkan11Features
        {.synchronization2 = true, .dynamicRendering = true},        // vk::PhysicalDeviceVulkan13Features
        {.extendedDynamicState = true}                               // vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT
    };
Dominant language
C++
Stars
424
Forks
127
Avg merge
2d 22h
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KhronosGroup/Vulkan-Tutorial

All issues in KhronosGroup/Vulkan-Tutorial

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.