Skip to content

Minimal Example of using Descriptor Buffer with Vulkan 1.3

Notifications You must be signed in to change notification settings

Roy-Fokker/vulkan-minimal

Repository files navigation

Vulkan 1.3 Minimal Example


Aim of this project is to create a purely minimal example of using Vulkan-Hpp, Vulkan Memory Allocator, vk-bootstrap and glm.

It does not use any "framework" style scaffolding.

Project Setup

Project uses CMake 3.31.x, Ninja 1.12.1 and VCPKG, for a cross-platform build (Windows and Linux) C++23 support is required, including C++ Modules. Vulkan SDK is at 1.4.304, which was latest available SDK, and vk-bootstrap is at 1.4.304.

For Linux build, it requires LLVM/Clang version 18.1.x or better. For Windows build, it requires MSVC version 17.10.x or better.

There are two presets in the config, one for windows and one for linux. Both builds assume Vulkan sdk is setup correctly.

For few of the dependencies VCPKG overlays are being used as these either don't exist in VCPKG's port repo or version in their repo was/is outdated.

Dependencies

Code Layout

All the code is in vk-min-src.cpp file. Have made best effort to document/comment how it's being used.

Vulkan features used

  • Viewport height negative, to get +X right, +Y up, +Z into screen (LHS)
  • Dynamic Rendering
  • Shader Device Address
  • Descriptor Buffers
    • Uniform buffer
    • Texture buffer, image + sampler

References

Screenshot

DDS Textured Triangles