kitty/gpu
Kovid Goyal 67dac47940
Pass the uniform parameters of shaders in a single push constant block
Declare the uniform parameters of every program as a single Params
struct, shared by all stages of the program, in a push constant block,
instead of as uniform parameters of the entry points. Slang lays out
the uniform parameters of each entry point starting at offset zero, so
the vertex and fragment parameters overlap, which Vulkan does not allow
in push constants. A single block shared by all stages is also what
Metal wants, and it is still emitted as loose uniforms for OpenGL.

The build now fails if a program has entry point uniform parameters or
more than 128 bytes of them, the push constant size guaranteed by Vulkan.

Since a program now has at most one block of uniform parameters, drop
the stage from GPUParamBlock, bump the GPU API version, and simplify
the lookup of parameters by name in kitty, as each name is now present
in only one parameter block.
2026-11-19 19:57:33 +05:30
..
opengl fix build on macOS 2026-11-19 19:57:33 +05:30
api.h Pass the uniform parameters of shaders in a single push constant block 2026-11-19 19:57:33 +05:30