Open Bug 1941600 Opened 10 months ago Updated 8 months ago

When WebGPU is enabled, the DOOM gallery experience flashes black on macOS

Categories

(Core :: Graphics: WebGPU, defect)

defect

Tracking

()

People

(Reporter: mstange, Unassigned)

References

(Blocks 1 open bug)

Details

Steps to reproduce:

  1. Go to https://www.newgrounds.com/portal/view/960452
  2. Click on "Play Game"
  3. Watch and do nothing.

Expected results:
After the progress bar disappears, the big white rounded rectangle with the play button should remain visible.

Actual results:
When dom.webgpu.enabled is true, the game area keeps flashing black. Around 200ms visible and 800ms-1500ms black, I'd estimate.

I cannot reproduce this on my Windows 11 workstation (the game runs fine), but on my M1 MacBook Pro with latest macOS, this is reproducing with cycles in the logs as follows:

[WebGPU] Device lost:  
GPUDeviceLostInfo { message: "Creation of a resource failed for a reason other than running out of memory." }
c3runtime.js:465:8021
[Construct] WebGPU device lost c3runtime.js:2171:15789
[Construct] Suspending c3runtime.js:2176:34444
Uncaptured WebGPU error: Creation of a resource failed for a reason other than running out of memory.
Uncaptured WebGPU error: Device with '' label is invalid.
Uncaptured WebGPU error: QuerySet with '' label is invalid
Uncaptured WebGPU error: Command encoder is locked by a previously created render/compute pass. Before recording any new commands, the pass must be ended.
Uncaptured WebGPU error: Buffer with '' label has been destroyed
Uncaptured WebGPU error: Command encoder is invalid
Uncaptured WebGPU error: CommandBuffer with '' label is invalid
[WebGPU] Error recycling buffer, assuming device was lost:  DOMException: Mapping WebGPU buffer failed: Context lost c3runtime.js:475:766
Uncaptured WebGPU error: Buffer with '' label is invalid
Uncaught (in promise) DOMException: Mapping WebGPU buffer failed: Invalid buffer c3runtime.js:1441:874
[WebGPU] Error recycling buffer, assuming device was lost:  DOMException: Mapping WebGPU buffer failed: Invalid buffer c3runtime.js:475:766
Uncaught (in promise) DOMException: Mapping WebGPU buffer failed: Invalid buffer c3runtime.js:1441:874
[Construct] Resuming c3runtime.js:2176:34642
[Construct] WebGPU device restored

:teoxoy, I think we were running into this in some other bugs, but I don't recall details. Do you remember?

Flags: needinfo?(ttanasoaia)
Blocks: webgpu-apps
Severity: -- → S3

I don't remember seeing "Creation of a resource failed for a reason other than running out of memory." on macOS, the only place where we return ResourceCreationFailed in the Metal backend is here: https://github.com/gfx-rs/wgpu/blob/6c10e0be732d8e2dea4f37248ed94b203367ac35/wgpu-hal/src/metal/device.rs#L1384-L1402. Maybe we are missing more query set validation?

Flags: needinfo?(ttanasoaia)

This is working for me now, on Mac M1 with recent nightly.

I'm not able to reproduce this issue either, but the web console now says, [C3 runtime] Hosted in DOM, rendering with WebGL 2 [Apple M1, or similar]. I'm not sure how to force WebGPU.

You need to log in before you can comment on or make changes to this bug.