BindGroupLayouts
BindGroupLayouts are a fundamental concept in modern graphics APIs like Vulkan and WebGPU that define the structure and binding points of resources that can be bound to a graphics pipeline for use by shaders. Think of a BindGroupLayout as a blueprint for a set of resources. It specifies what types of resources will be available to a shader (e.g., textures, uniform buffers, storage buffers), how they should be bound (e.g., by binding point index), and their properties (e.g., read-only or read-write access).
When a shader is compiled, it declares its resource needs. These declarations are then matched against the
A BindGroupLayout itself doesn't contain the actual resource data. Instead, it's used to create a BindGroup.