[webkit-changes] [WebKit/WebKit] c28e06: [WebGPU] optional counter sample indices are not r...
mwyrzykowski
noreply at github.com
Fri Jan 31 16:47:07 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c28e06df6892d9222e4d75c59f24c9933362dcd6
https://github.com/WebKit/WebKit/commit/c28e06df6892d9222e4d75c59f24c9933362dcd6
Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
Date: 2025-01-31 (Fri, 31 Jan 2025)
Changed paths:
A LayoutTests/fast/webgpu/nocrash/fuzz-286689-expected.txt
A LayoutTests/fast/webgpu/nocrash/fuzz-286689.html
M Source/WebGPU/WebGPU/CommandBuffer.mm
M Source/WebGPU/WebGPU/CommandEncoder.h
M Source/WebGPU/WebGPU/CommandEncoder.mm
M Source/WebGPU/WebGPU/HardwareCapabilities.mm
M Source/WebGPU/WebGPU/QuerySet.mm
M Source/WebGPU/WebGPU/Queue.h
M Source/WebGPU/WebGPU/Queue.mm
M Source/WebGPU/WebGPU/RenderPassEncoder.mm
Log Message:
-----------
[WebGPU] optional counter sample indices are not respected
https://bugs.webkit.org/show_bug.cgi?id=286689
rdar://143805885
(Reland with ASAN crash regression fixed)
Reviewed by Dan Glastonbury.
The specification says a sample index which is not specified should
be treated as 'don't sample' instead of sampling the counter.
* LayoutTests/fast/webgpu/nocrash/fuzz-286689-expected.txt: Added.
* LayoutTests/fast/webgpu/nocrash/fuzz-286689.html: Added.
Add regression test.
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::timestampWriteIndex):
(WebGPU::CommandEncoder::beginComputePass):
(WebGPU::CommandEncoder::beginRenderPass):
Don't sample non-specified counter values and ensure counter sample
buffers are retained for the lifetime of the command buffer.
* Source/WebGPU/WebGPU/HardwareCapabilities.mm:
(WebGPU::baseFeatures):
* Source/WebGPU/WebGPU/Queue.h:
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::retainEncoder):
(WebGPU::Queue::releaseEncoder):
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::clampIndexBufferToValidValues):
(WebGPU::checkForIndirectDrawDeviceLost):
(WebGPU::RenderPassEncoder::executeBundles):
We need to manually retain the CommandEncoder until the completion handler
completes, otherwise a sample counter buffer may be released resulting
in a retain on a release pointer. Tracked by rdar://143905417
Canonical link: https://commits.webkit.org/289644@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