kitty/gpu
Kovid Goyal d96a5b2a0c
Add a Vulkan GPU driver
On Linux and BSD, kitty now renders using Vulkan 1.3, falling back to
OpenGL if Vulkan is not available, see the gpu_driver option. The driver
is built when the Vulkan headers are present, libvulkan is loaded at
runtime.

The driver implements the immediate mode GPU API on top of a small ring
of command buffers, submitted when windows are presented or when the CPU
needs results, such as when reading back pixels. It uses dynamic
rendering, synchronization2, push descriptors for textures and uniform
buffers and push constants for the uniform parameters of pipelines.
Buffers are host visible and written only by the CPU, with copy on write
of storage still in use by the GPU, which preserves the OpenGL semantics
the rest of kitty relies on without the CPU ever waiting for the GPU.
Pipelines have variants for each render target format, blend mode and
set of vertex input formats, created when first used. Vertex strides are
dynamic state.

Rendering is pixel identical to OpenGL in the screenshot comparisons,
with the validation layers reporting no errors.

Integer textures are now declared in the shaders with their actual
number of channels, as Vulkan requires the format of the image in the
SPIR-V to match the texture. Drivers that cannot determine the size of
uniform blocks, such as Vulkan without SPIR-V reflection, can now report
it as zero.
2026-11-18 08:26:41 +05:30
..
opengl Use the coordinate conventions of Vulkan and Metal for the GPU API 2026-11-18 08:26:41 +05:30
vulkan Add a Vulkan GPU driver 2026-11-18 08:26:41 +05:30
api.h Add a Vulkan GPU driver 2026-11-18 08:26:41 +05:30