Skip to content

[gles] create_bind_group fails for buffers with MAP_WRITE #3058

Closed
@Wumpf

Description

@Wumpf

Description
Gles backend crashes when creating a bind group for a freshly created buffer that has MAP_WRITE usage.

Only got a vague wasm callstack, but pretty sure it's this unwrap here https://github.com/gfx-rs/wgpu/blob/v0.13/wgpu-hal/src/gles/device.rs#L903 failing because when going this early out path we don't have a raw buffer just yet https://github.com/gfx-rs/wgpu/blob/v0.13/wgpu-hal/src/gles/device.rs#L364

Repro steps

  • create buffer with wgpu::BufferUsages::MAP_WRITE and wgpu::BufferUsages::UNIFORM
  • create simple bindgroup like this
        let bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor {
            label: None,
            layout: &bind_group_layout,
            entries: &[wgpu::BindGroupEntry {
                binding: 0,
                resource: uniform_buffer.as_entire_binding(),
            }],
        });

observe crash on unwrap.

Platform
Tested with webgl on the web

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions