Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8f1919db1fce2079da646cf3a1cc11d50449fcde
https://github.com/WebKit/WebKit/commit/8f1919db1fce2079da646cf3a1cc11d50449fcde
Author: Mike Wyrzykowski <[email protected]>
Date: 2025-03-10 (Mon, 10 Mar 2025)
Changed paths:
M Source/WebGPU/WebGPU/Buffer.mm
M Source/WebGPU/WebGPU/Device.h
M Source/WebGPU/WebGPU/Device.mm
M Source/WebGPU/WebGPU/RenderPassEncoder.mm
Log Message:
-----------
[WebGPU] Memory barriers in vertex shader validation routines are problematic
on M1
https://bugs.webkit.org/show_bug.cgi?id=289147
rdar://146219177
Reviewed by Tadeu Zagallo.
We were using memory barriers with a single temporary indirect buffer
shared across multiple draw calls. This seemed to work fine on M2 Macs
but results with some command buffer errors on M1 macs (error code = Internal
Error).
It appears due to having the barrier on the same indirect buffer many times in
a single
render pass encoder.
We can resolve this by replacing the setBytes call with a temporary buffer and
use that buffer
instead of the single shared buffer we had previously been using. This will
result in very
little or possibly reduced memory usage since now we don't need to create an
indirect
buffer (in addition to the temporary one) for Index buffers.
* Source/WebGPU/WebGPU/Device.h:
(WebGPU::Device::safeCreateBufferWithData const):
Add helper to create a buffer from byte data. Internally
the data is copied at the call site so we don't need to worry
about its lifetime.
* Source/WebGPU/WebGPU/Device.mm:
(WebGPU::Device::copyIndexIndirectArgsPipeline): Deleted.
Remove unused code.
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::clampIndexBufferToValidValues):
Use a temporary buffer instead of the setBytes: call.
* Source/WebGPU/WebGPU/Buffer.mm:
(WebGPU::Buffer::Buffer):
We no longer need to create this persistent secondary indirect buffer
for index buffers, only ones which are (also) indirect.
Canonical link: https://commits.webkit.org/291897@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes