# Render pipeline error wgpu

**URL:** <https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913>\
**Category:** help\
**Created:** [October 9, 2026, 1:45am UTC](https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913 "2026-10-09T01:45:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LordVagous](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/lordvagous/32/37178_2.png) [@LordVagous](https://users.rust-lang.org/u/LordVagous)\
**Post date:** [October 9, 2026, 1:45am UTC](https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913/1 "2026-10-09T01:45:04Z")

</div>

```rust
let render_pipeline_layout = device.create_pipeline_layout(&PipelineLayoutDescriptor {
            label: None,
            bind_group_layouts: &[Some(&default_bgl), Some(&camera_bgl)],
            immediate_size: 0,
        });

        let shader = device.create_shader_module(include_wgsl!("shaders/shader.wgsl"));

        let render_pipeline = device.create_render_pipeline(&RenderPipelineDescriptor {
            label: None,
            layout: Some(&render_pipeline_layout),
            vertex: VertexState {
                module: &shader,
                entry_point: Some("vs_main"),
                buffers: &[],
                compilation_options: PipelineCompilationOptions::default(),
            },
            fragment: Some(FragmentState {
                // 3.
                module: &shader,
                entry_point: Some("fs_main"),
                targets: &[Some(ColorTargetState {
                    // 4.
                    format: config.format,
                    blend: Some(BlendState::REPLACE),
                    write_mask: ColorWrites::ALL,
                })],
                compilation_options: PipelineCompilationOptions::default(),
            }),
            primitive: PrimitiveState {
                topology: PrimitiveTopology::TriangleList, // 1.
                strip_index_format: None,
                front_face: FrontFace::Ccw, // 2.
                cull_mode: Some(Face::Back),
                // Setting this to anything other than Fill requires Features::NON_FILL_POLYGON_MODE
                polygon_mode: PolygonMode::Fill,
                // Requires Features::DEPTH_CLIP_CONTROL
                unclipped_depth: false,
                // Requires Features::CONSERVATIVE_RASTERIZATION
                conservative: false,
            },
            depth_stencil: Some(wgpu::DepthStencilState {
                format: TextureFormat::Depth32Float,
                depth_write_enabled: Some(true), // write new depth values
                depth_compare: Some(CompareFunction::Less), // closer to camera wins
                stencil: StencilState::default(),
                bias: DepthBiasState::default(),
            }),
            multisample: MultisampleState {
                count: 8,
                mask: !0,
                alpha_to_coverage_enabled: false,
            },
            multiview_mask: None,
            cache: None,
        });

```

thread 'main' (50701) panicked at /home/alpha/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-30.0.1/src/backend/wgpu\_core.rs:1414:26:  
wgpu error: Validation Error

Caused by:  
In Device::create\_render\_pipeline  
Error matching ShaderStages(VERTEX) shader requirements against the pipeline  
Shader global ResourceBinding { group: 1, binding: 1 } is not available in the pipeline layout  
Binding is missing from the pipeline layout

pretty sure it's available in the pipeline layout

---

<div class="post-metadata">

**Author:** ![nerditation](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nerditation](https://users.rust-lang.org/u/nerditation)\
**Post date:** [October 9, 2026, 2:18am UTC](https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913/2 "2026-10-09T02:18:07Z")

</div>

> [@LordVagous](#):
>
> pretty sure it's available in the pipeline layout

code please? what's the value `default_bgl` and `&camera_bgl`, and the corresponding vertex shader code?

---

<div class="post-metadata">

**Author:** ![LordVagous](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/lordvagous/32/37178_2.png) [@LordVagous](https://users.rust-lang.org/u/LordVagous)\
**Post date:** [October 9, 2026, 2:21am UTC](https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913/3 "2026-10-09T02:21:45Z")

</div>

```rust
let default_bgl = device.create_bind_group_layout(&BindGroupLayoutDescriptor {
            label: None,
            entries: &[
                BindGroupLayoutEntry {
                    binding: 0,
                    visibility: ShaderStages::VERTEX,
                    ty: BindingType::Buffer {
                        ty: BufferBindingType::Uniform,
                        has_dynamic_offset: false,
                        min_binding_size: None,
                    },
                    count: None,
                },
                BindGroupLayoutEntry {
                    binding: 1,
                    visibility: ShaderStages::VERTEX,
                    ty: BindingType::Buffer {
                        ty: BufferBindingType::Storage { read_only: true },
                        has_dynamic_offset: false,
                        min_binding_size: None,
                    },
                    count: None,
                },
            ],
        });

let camera_bgl = device.create_bind_group_layout(&BindGroupLayoutDescriptor {
            label: None,
            entries: &[BindGroupLayoutEntry {
                binding: 0,
                visibility: ShaderStages::VERTEX,
                ty: BindingType::Buffer {
                    ty: BufferBindingType::Uniform,
                    has_dynamic_offset: false,
                    min_binding_size: None,
                },
                count: None,
            }],
        });

```

---

<div class="post-metadata">

**Author:** ![nerditation](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nerditation](https://users.rust-lang.org/u/nerditation)\
**Post date:** [October 9, 2026, 3:17am UTC](https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913/4 "2026-10-09T03:17:55Z")

</div>

> [@LordVagous](#):
>
> Shader global ResourceBinding { group: 1, binding: 1 } is not available

you didn't show the shader code, but this error message is self explanatory:

your layout was created with two groups:

- `default_bgl` is group 0, which has two bindings

- `camera_bgl` is group 1, which has only one binding:

the validation message indicates your shader references the binding of group 1 index 1, which is not available in your pipeline layout apparently.

either you forgot to include the other binding in the layout, or you have a mistake in the shader code.

---

<div class="post-metadata">

**Author:** ![LordVagous](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/lordvagous/32/37178_2.png) [@LordVagous](https://users.rust-lang.org/u/LordVagous)\
**Post date:** [October 9, 2026, 6:42pm UTC](https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913/5 "2026-10-09T18:42:14Z")

</div>

Switched their positions and this is the error:

Caused by:  
In Device::create\_bind\_group  
Number of bindings in bind group descriptor (1) does not match the number of bindings defined in the bind group layout (2)

there is no bind group descriptor in wgpu so i'm confused.

---

<div class="post-metadata">

**Author:** ![nerditation](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nerditation](https://users.rust-lang.org/u/nerditation)\
**Post date:** [October 9, 2026, 11:48pm UTC](https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913/6 "2026-10-09T23:48:11Z")

</div>

> [@LordVagous](#):
>
> Number of bindings in bind group descriptor (1) does not match the number of bindings defined in the bind group layout (2)

a descriptor describes the actual resource you use when you create the bind group. they must match the layout of the group.

for instance, if the layout of a group has two bindings, 0 for a uniform buffer, 1 for a storage buffer, then the descriptor must have two entries, entry 0 must be a uniform buffer resource, and entry 1 must be a storage buffer resource.

> [@LordVagous](#):
>
> there is no bind group descriptor in wgpu so i'm confused

yes, there is.

it is the argument to the [`Device::create_bind_group()`](https://docs.rs/wgpu/latest/wgpu/struct.Device.html#method.create_bind_group) method.
