kitty/gpu
Kovid Goyal e180aa2ffa
Declare texture and uniform block binding slots in the shaders
Every texture and uniform block in kitty's shaders now declares its
binding slot with [[vk::binding(N)]], from a single documented table,
SHADER_BINDING_SLOTS, which the shader build verifies. Slots are unique
across shaders and kinds of resource, as Vulkan requires, and so that
resources bound once and used by many programs, such as the sprite
textures, are never displaced by another program's bindings.

The slots are passed to the C code in the program metadata, which no
longer hard codes texture units or uniform buffer binding points, and no
longer sets sampler uniforms or calls glUniformBlockBinding() equivalents.
Instead the driver receives the slots when a pipeline is created. The
OpenGL driver applies them to the linked program since OpenGL 3 has no
layout(binding) qualifiers; targets where the slots are part of the
compiled code can ignore them.
2026-11-19 19:57:33 +05:30
..
opengl Declare texture and uniform block binding slots in the shaders 2026-11-19 19:57:33 +05:30
api.h Declare texture and uniform block binding slots in the shaders 2026-11-19 19:57:33 +05:30