[webkit-reviews] review granted: [Bug 198591] [WebGPU] Remove GPUBuffer.setSubData and implement GPUDevice.createBufferMapped : [Attachment 371464] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 7 15:00:11 PDT 2019


Myles C. Maxfield <mmaxfield at apple.com> has granted Justin Fan
<justin_fan at apple.com>'s request for review:
Bug 198591: [WebGPU] Remove GPUBuffer.setSubData and implement
GPUDevice.createBufferMapped
https://bugs.webkit.org/show_bug.cgi?id=198591

Attachment 371464: Patch

https://bugs.webkit.org/attachment.cgi?id=371464&action=review




--- Comment #3 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 371464
  --> https://bugs.webkit.org/attachment.cgi?id=371464
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371464&action=review

> Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm:226
> +    if (!m_device->tryGetQueue() || !(queue =
m_device->tryGetQueue()->platformQueue()))

The group will investigate and probably add the idea of multiple queues. We
should figure out how this will work in that world.

> Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm:233
> +    stagingMtlBuffer = adoptNS([m_device->platformDevice()
newBufferWithLength:static_cast<NSUInteger>(m_byteLength)
options:MTLResourceCPUCacheModeDefaultCache]);

Can we cache these somehow? It seems silly to continually create and destroy
these.


More information about the webkit-reviews mailing list