mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-19 14:45:29 +00:00
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. |
||
|---|---|---|
| .. | ||
| opengl | ||
| api.h | ||