[webkit-changes] [WebKit/WebKit] 98da47: [WebGPU] webgpu:api, operation, buffers, * is not pas...
mwyrzykowski
noreply at github.com
Fri Nov 17 04:31:46 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 98da47e2740e302d72a02213c42ad421a9c871a7
https://github.com/WebKit/WebKit/commit/98da47e2740e302d72a02213c42ad421a9c871a7
Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
Date: 2023-11-17 (Fri, 17 Nov 2023)
Changed paths:
M LayoutTests/http/tests/webgpu/webgpu/api/operation/buffers/map-expected.txt
M LayoutTests/http/tests/webgpu/webgpu/api/operation/buffers/map_ArrayBuffer-expected.txt
M LayoutTests/http/tests/webgpu/webgpu/api/operation/buffers/map_detach-expected.txt
M LayoutTests/http/tests/webgpu/webgpu/api/operation/buffers/map_oom-expected.txt
M Source/JavaScriptCore/runtime/ArrayBuffer.cpp
M Source/JavaScriptCore/runtime/ArrayBuffer.h
M Source/WebCore/Modules/WebGPU/GPUBuffer.cpp
M Source/WebCore/bindings/js/SerializedScriptValue.cpp
Log Message:
-----------
[WebGPU] webgpu:api,operation,buffers,* is not passing
https://bugs.webkit.org/show_bug.cgi?id=264825
rdar://118406537
Reviewed by Dan Glastonbury and Yusuke Suzuki.
The WebGPU specification prevents ArrayBuffers returned from getMappedRange from
being transferred via postMessage calls.
* LayoutTests/http/tests/webgpu/webgpu/api/operation/buffers/map-expected.txt:
* LayoutTests/http/tests/webgpu/webgpu/api/operation/buffers/map_ArrayBuffer-expected.txt:
* LayoutTests/http/tests/webgpu/webgpu/api/operation/buffers/map_detach-expected.txt:
* LayoutTests/http/tests/webgpu/webgpu/api/operation/buffers/map_oom-expected.txt:
Add passing expectations.
* Source/JavaScriptCore/runtime/ArrayBuffer.cpp:
(JSC::ArrayBuffer::transferTo):
Use helper.
* Source/JavaScriptCore/runtime/ArrayBuffer.h:
(JSC::ArrayBuffer::isDetachable const):
Add helper member function to determine if an ArrayBuffer can be detached.
* Source/WebCore/Modules/WebGPU/GPUBuffer.cpp:
(WebCore::makeArrayBuffer):
(WebCore::GPUBuffer::internalUnmap):
Pin and unpin the buffer to prevent transferring.
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::create):
Throw a type error if we try to transfer an ArrayBuffer which can not
be detached.
Canonical link: https://commits.webkit.org/270882@main
More information about the webkit-changes
mailing list