Godot Version
4.2
Question
I’m reading the compute shader tutorial that describes an input data buffer like this,
layout(set = 0, binding = 0, std430) restrict buffer MyDataBuffer { ...
The docs say compute shaders are directly written in GLSL, so I’m referencing keywords with the GLSL docs.
I’ve found and understand:
- The memory layout specifier std430
- Binding points for buffer blocks (binding = 0)
- The restrict memory qualifier
But I cannot for the life of me find the docs for layout(set = 0)
.
The closest I’ve come are opaque references in the Vulkan docs.
IIUC, GLSL compiles to SPIR-V which then uses the Vulkan API, so Vulkan docs don’t exactly apply.
set
basically seems like a way of specifying memory layout, but what does it mean at a driver/hardware level?
What’s the difference between set
and binding
? When does set
need to increment?
Where can I learn more?