[webkit-changes] [WebKit/WebKit] 60684f: [WebGPU] GPUBindGroup can surprisingly be garbage ...

mwyrzykowski noreply at github.com
Thu Jun 6 23:27:21 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 60684f4b340f3ecd15a876319eefec9a27e9c7a6
      https://github.com/WebKit/WebKit/commit/60684f4b340f3ecd15a876319eefec9a27e9c7a6
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2024-06-06 (Thu, 06 Jun 2024)

  Changed paths:
    A LayoutTests/fast/webgpu/regression/repro_275198-expected.txt
    A LayoutTests/fast/webgpu/regression/repro_275198.html
    A LayoutTests/fast/webgpu/regression/repro_275198b-expected.txt
    A LayoutTests/fast/webgpu/regression/repro_275198b.html
    M Source/WebGPU/WebGPU/ComputePassEncoder.h
    M Source/WebGPU/WebGPU/ComputePassEncoder.mm
    M Source/WebGPU/WebGPU/PipelineLayout.h
    M Source/WebGPU/WebGPU/RenderBundleEncoder.h
    M Source/WebGPU/WebGPU/RenderBundleEncoder.mm
    M Source/WebGPU/WebGPU/RenderPassEncoder.h
    M Source/WebGPU/WebGPU/RenderPassEncoder.mm

  Log Message:
  -----------
  [WebGPU] GPUBindGroup can surprisingly be garbage collected
https://bugs.webkit.org/show_bug.cgi?id=275198
<radar://129272402>

Reviewed by Dan Glastonbury.

We should hold a RefPtr and not a WeakPtr since a GC which occurs in the middle
of an encoder can result in the pipeline's ref count reaching zero.

There is not a risk of a retain cycle as the *Encoders are not retained by
any other objects.

* LayoutTests/fast/webgpu/regression/repro_275198-expected.txt: Added.
* LayoutTests/fast/webgpu/regression/repro_275198.html: Added.
* LayoutTests/fast/webgpu/regression/repro_275198b-expected.txt: Added.
* LayoutTests/fast/webgpu/regression/repro_275198b.html: Added.
* Source/WebGPU/WebGPU/ComputePassEncoder.h:
* Source/WebGPU/WebGPU/ComputePassEncoder.mm:
(WebGPU::ComputePassEncoder::setBindGroup):
* Source/WebGPU/WebGPU/PipelineLayout.h:
* Source/WebGPU/WebGPU/RenderBundleEncoder.h:
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::setBindGroup):
* Source/WebGPU/WebGPU/RenderPassEncoder.h:
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::setBindGroup):

Canonical link: https://commits.webkit.org/279796@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