Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 668a3349c7066b8b0fbc2a7bddb4df995266d6c0
https://github.com/WebKit/WebKit/commit/668a3349c7066b8b0fbc2a7bddb4df995266d6c0
Author: Mike Wyrzykowski <[email protected]>
Date: 2024-01-02 (Tue, 02 Jan 2024)
Changed paths:
M Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.cpp
M Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.h
M Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUQueue.h
M Source/WebGPU/WebGPU/Queue.h
M Source/WebGPU/WebGPU/Queue.mm
M Source/WebGPU/WebGPU/WebGPU.h
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h
Log Message:
-----------
rdar://120053975 ([WebGPU] writeBuffer and writeTexture should use noCopy
variants when creating temporary buffers (266821))
https://bugs.webkit.org/show_bug.cgi?id=266821
<radar://120053975>
Reviewed by Tadeu Zagallo.
Some more complex demos can copy 300MB textures or buffers and copying
these is expensive and leads to OOM situations.
Establish a threshold, currently 32MB, where we use the no-copy variant
to avoid duplicating the memory. It requires us to submit the command buffer
immedietly, otherwise the memory may get deallocated too soon. That is the
trade off with the no-copy variants.
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.cpp:
(WebCore::WebGPU::QueueImpl::writeBuffer):
(WebCore::WebGPU::QueueImpl::writeTexture):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.h:
* Source/WebCore/Modules/WebGPU/InternalAPI/WebGPUQueue.h:
* Source/WebGPU/WebGPU/Queue.h:
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::writeBuffer):
(WebGPU::Queue::writeTexture):
(wgpuQueueWriteBuffer):
(wgpuQueueWriteTexture):
* Source/WebGPU/WebGPU/WebGPU.h:
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.cpp:
(WebKit::WebGPU::RemoteQueueProxy::writeBuffer):
(WebKit::WebGPU::RemoteQueueProxy::writeTexture):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteQueueProxy.h:
Canonical link: https://commits.webkit.org/272596@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes