[webkit-changes] [WebKit/WebKit] 9977d0: [WebGPU] onSubmittedWorkDone hangs when the device...

mwyrzykowski noreply at github.com
Thu Dec 5 09:03:05 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9977d02fa8cf6ef8c9511ce7e460b4b29d3660ec
      https://github.com/WebKit/WebKit/commit/9977d02fa8cf6ef8c9511ce7e460b4b29d3660ec
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2024-12-05 (Thu, 05 Dec 2024)

  Changed paths:
    A LayoutTests/fast/webgpu/regression/repro_284053-expected.txt
    A LayoutTests/fast/webgpu/regression/repro_284053.html
    M Source/WebGPU/WebGPU/Device.mm
    M Source/WebGPU/WebGPU/Queue.h
    M Source/WebGPU/WebGPU/Queue.mm

  Log Message:
  -----------
  [WebGPU] onSubmittedWorkDone hangs when the device is destroyed
rdar://140888787
https://bugs.webkit.org/show_bug.cgi?id=284053

Reviewed by Cameron McCormack.

There was a race with the command buffer completion handler returning
and the device being destroyed.

We were using the Device to get to the Instance to schedule work on the
WebGPU main thread, but if the device was destroyed then we would not
schedule the callback.

Avoid this by storing Instance in Queue.

* Source/WebGPU/WebGPU/Device.mm:
(WebGPU::Device::Device):
* Source/WebGPU/WebGPU/Queue.h:
(WebGPU::Queue::create):
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::Queue):
(WebGPU::Queue::onSubmittedWorkDone):
(WebGPU::Queue::commitMTLCommandBuffer):
(WebGPU::Queue::scheduleWork):

Canonical link: https://commits.webkit.org/287402@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list