Skip to content

[bug]: Wasm builds fail on WGPU>=22.0.0 with Grab WGPU Adapter failure #6490

Closed
@lexi-the-cute

Description

@lexi-the-cute

Description
Updating from WGPU=0.20.1 to any version greater breaks the ability to grab the WGPU adapter on WASM. The version of winit does not matter.

Repro steps
A working example is at:

The broken example is at:

Expected vs observed behavior
The WASM build should be able to grab the WGPU adapter and continue execution to render the screen. On WGPU>=22.0.0, the WASM fails to grab the WGPU adapter and mentions being unable to recursively acquire a mutex as well as a message about already borrowing something with BorrowMutError

Extra materials

Screenshot of program with version of WGPU which works on WASM:
Screenshot of working version

Screenshot of program with version of WGPU which doesn't work on WASM:
Screenshot of broken version

Log of Failure to Grab WGPU Adapter:
wasm-wgpu-adapter-fail.log

This is related to closed issue: #5881 and the same bug was discovered in pull request #5709

I'll be able to provide more details when I get some more free time in a few days. Currently, it does not appear to be possible to generate source maps for the wasm, so I'll have to rely on logging for the meantime

Platform

  • Arch Linux (6.11.5-arch1-1)
  • WGPU>=22.0.0 (tests for screenshot and logs on 23.0.0)
  • rustc 1.82.0 (f6e511eec 2024-10-15)
  • Firefox 131.0.3 (64-bit)
  • Chromium Version 130.0.6723.91 (Official Build) Arch Linux (64-bit)
  • Wasm Pack 0.13.0

WGPU uses default features plus "webgl" and "fragile-send-sync-non-atomic-wasm"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions