Skip to main content

global_bind_group_layout

Function global_bind_group_layout 

Source
pub fn global_bind_group_layout(
    device: &Device,
    bindings: GlobalBindings,
    texel_arrays: bool,
) -> BindGroupLayout
Expand description

Build the global bind-group layout a pipeline with bindings declares.

The camera, frame-globals and view uniforms are always present; the arrays are present exactly when bindings names them. The array path is the device’s answer rather than the pipeline’s, so texel_arrays is passed in: a device with storage buffers binds each array as one, a device without them — WebGL2 — binds the same bytes as a texture.

The built-in lit variants build their global layout here, so a caller’s own pipeline declares the same group by the same rules.