Skip to content

Creating the graphics pipeline

Choose a tag to compare

@nnewson nnewson released this 03 Aug 17:46
· 123 commits to main since this release

This release takes fireEngine beyond swapchain creation and builds the first Vulkan graphics pipeline needed to render a triangle.

Shaders are now written in Slang and compiled to SPIR-V 1.6 during the build using the compiler supplied through vcpkg. A single shader module contains the vertex and fragment entry points, transforming each vertex with a frame uniform and passing its colour to the fragment stage.

The graphics pipeline uses Vulkan 1.4 dynamic rendering and targets the selected swapchain format without requiring a traditional render pass. Vulkan 1.4 maintenance5 support allows the compiled SPIR-V to be supplied directly during pipeline creation, avoiding temporary VkShaderModule objects.

A push-descriptor layout has also been introduced for the future frame uniform buffer. The pipeline defines the vertex position and colour layout, triangle-list assembly, rasterisation, colour output, and dynamic viewport and
scissor state needed when command recording is added.

Included in this release

  • Build-time Slang shader compilation to SPIR-V 1.6.
  • Vertex and fragment shaders for a coloured triangle.
  • A shared C++ vertex format containing position and colour.
  • Vulkan 1.4 dynamic-rendering graphics-pipeline creation.
  • Pipeline compatibility with the selected swapchain colour format.
  • Dynamic viewport and scissor state.
  • Push-descriptor layout for a frame uniform buffer.
  • Direct SPIR-V pipeline creation using Vulkan 1.4 maintenance5.
  • Physical-device checks for push descriptors and maintenance5.
  • Logical-device enablement of the required Vulkan 1.4 features.
  • Shader compilation through the vcpkg-provided Slang compiler.
  • Project version updated to 0.4.0.
  • Updated startup diagnostics and smoke-test coverage for pipeline creation.

No rendering happens yet—the vertex and uniform buffers have not been populated or bound, and no drawing commands are recorded or submitted. The next milestone can create the required GPU resources and command infrastructure, then begin rendering and presenting the first triangle.