GPUBindGroupLayout - Web APIs | MDN

Instance properties

label

A string providing a label that can be used to identify the object, for example in GPUError messages or console warnings.

Examples

Basic example

Our basic compute demo shows an example of creating a bind group layout and then using that as a template when creating a bind group.

js

// …

const bindGroupLayout = device.createBindGroupLayout({
  entries: [
    {
      binding: 0,
      visibility: GPUShaderStage.COMPUTE,
      buffer: {
        type: "storage",
      },
    },
  ],
});

const bindGroup = device.createBindGroup({
  layout: bindGroupLayout,
  entries: [
    {
      binding: 0,
      resource: {
        buffer: output,
      },
    },
  ],
});

// …

Specifications

Specification
WebGPU
# gpubindgrouplayout

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.