[webkit-changes] [WebKit/WebKit] 5cc1b3: [WebGPU] Retain references used during executeBund...
mwyrzykowski
noreply at github.com
Tue Jan 7 12:14:44 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5cc1b3d0aeaff99ac627a3ae8a238bcbf2af4766
https://github.com/WebKit/WebKit/commit/5cc1b3d0aeaff99ac627a3ae8a238bcbf2af4766
Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
Date: 2025-01-07 (Tue, 07 Jan 2025)
Changed paths:
M Source/WebGPU/WebGPU/CommandEncoder.h
M Source/WebGPU/WebGPU/CommandEncoder.mm
M Source/WebGPU/WebGPU/RenderPassEncoder.mm
Log Message:
-----------
[WebGPU] Retain references used during executeBundles until command buffer completes
https://bugs.webkit.org/show_bug.cgi?id=284880
rdar://141683758
Reviewed by Tadeu Zagallo.
Metal should retain these resources until the MTLCommandBuffer completes,
but we have seen some false positives when shader validation is enabled
and the resource ref count would otherwise reach zero prior to the command
buffer completing.
It costs very little to manually retain, we could probably even call
-[MTLCommandBufferDescriptor setRetainedReferences:NO] at this point which
would eliminate the overhead from protecting against the false positives.
* Source/WebGPU/WebGPU/CommandEncoder.h:
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::CommandEncoder):
(WebGPU::CommandEncoder::addICB):
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::executeBundles):
Canonical link: https://commits.webkit.org/288556@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