Closed Bug 1709462 Opened 3 years ago Closed 3 years ago

WebGPU: Crash when getBindGroupLayout is used

Categories

(Core :: Graphics: WebGPU, defect)

Firefox 90
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: matus.talcik, Assigned: kvark)

References

Details

Attachments

(2 files)

Attached file library.zip

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 Edg/90.0.818.51

Steps to reproduce:

  1. Created basic skeleton for WebGPU project
  2. Used getBindGroupLayou when I added UBOs to the shader
  3. Ran my program

In attached file:

  • src has the original code that is compiled using webpack
  • dist_good contains code using manual layout - this doesn't crash
  • dist_bad contains code using getBinGroupLayout

Actual results:

Firefox crashed after some amount frames. The amount ranges from 200 to 470 roughly.

Expected results:

Firefox shouldn't have crashed

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebGPU' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Graphics: WebGPU
Product: Firefox → Core

Thanks for the test case!

Assignee: nobody → dmalyshau
Severity: -- → S3

When the pipeline layout is implicit at pipeline creation,
we collect the IDs of BGLs, to be able to produce GPUBindGroupLayout
object upon user request. However, the produced object didn't know if
it owns the ID or borrows it, so it would issue a "drop" when going out of scope.

This change establishes this distinction. In addition, it gets the Pipeline Layout ID,
and together with the BGL ids, they are sent to GPU process upon pipeline destruction.

When the GPU process is done with these IDs used, it will kick back a message to the
Content process, allowing the IDs to be reclaimed.

See Also: → 1710365
Pushed by dmalyshau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dfd34fb1aade
Fix freeing of WebGPU bind group layouts r=jimb
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Depends on: 1711868
Regressions: 1711868
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: