[webkit-changes] [WebKit/WebKit] fb4599: Enable Swift C++ interop in WebGPU.framework.
Commit Queue
noreply at github.com
Tue Sep 24 09:49:36 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fb45993e8c151ffe248aa67fb775667021afb1c5
https://github.com/WebKit/WebKit/commit/fb45993e8c151ffe248aa67fb775667021afb1c5
Author: Nitin Mahendru <nitinmahendru at apple.com>
Date: 2024-09-24 (Tue, 24 Sep 2024)
Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WTF/wtf/StdLibExtras.h
M Source/WTF/wtf/text/StringCommon.h
M Source/WTF/wtf/text/StringConcatenate.h
M Source/WTF/wtf/text/WTFString.h
M Source/WebCore/Configurations/WebCore.xcconfig
M Source/WebCore/Modules/WebGPU/Implementation/WebGPUBufferImpl.cpp
M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
M Source/WebGPU/Configurations/WebGPU.xcconfig
M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
M Source/WebGPU/WebGPU/Buffer.h
M Source/WebGPU/WebGPU/Buffer.mm
A Source/WebGPU/WebGPU/Buffer.swift
M Source/WebGPU/WebGPU/WebGPU.h
M Source/WebGPU/WebGPU/WebGPU.modulemap
M Source/WebGPU/WebGPU/WebGPUExt.h
A Source/WebGPU/WebGPU/WebGPUSwift.h
A Source/WebGPU/WebGPU/WebGPUSwiftInternal.h
M Source/WebKit/Configurations/WebKit.xcconfig
M Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBuffer.cpp
M Tools/Scripts/webkitperl/FeatureList.pm
Log Message:
-----------
Enable Swift C++ interop in WebGPU.framework.
rdar://135914808
Reviewed by Geoffrey Garen and Mike Wyrzykowski.
This change will serve as an exemplar for using Swift Code in WebGPU.framework.
The swift generated header has been marked no-install to intentionally keep it hidden
and not expose from the WebGPU.framework.
The actual change of moving the RemoteBuffer::copy operation to swift has no relevance
per se. It's a randomly chosen operation to use a swift API.
As a result of this change, the WebGPU module(WebGPU.modulemap) is consumed by the swift compiler for consuming
WebGPU types in Swift if needed.
Swift compiler is aliasing both UChar and uint16_t to unsigned short and thus it's not able to compile certain utilities
that are ifdefed out.
The changes are disabled and manual testing has been performed at desk by:
1. make release BUILD_WEBKIT_OPTIONS="--webGpuSwift"
2. Running ./Tools/Scripts/run-webkit-tests --release --no-build --force http/tests/webgpu/webgpu/api/operation/buffers http/tests/webgpu/webgpu/api/validation/buffer
* Source/WTF/wtf/PlatformHave.h:
* Source/WTF/wtf/StdLibExtras.h:
* Source/WTF/wtf/text/StringCommon.h:
* Source/WTF/wtf/text/StringConcatenate.h:
* Source/WTF/wtf/text/WTFString.h:
* Source/WebCore/Configurations/WebCore.xcconfig:
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUBufferImpl.cpp:
(WebCore::WebGPU::BufferImpl::copy):
* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebGPU/Configurations/WebGPU.xcconfig:
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:
* Source/WebGPU/WebGPU/Buffer.h:
* Source/WebGPU/WebGPU/Buffer.mm:
(WebGPU::Buffer::copy):
(wgpuBufferCopy):
* Source/WebGPU/WebGPU/Buffer.swift: Added.
(copySpan(_:source:)):
* Source/WebGPU/WebGPU/WebGPU.h:
* Source/WebGPU/WebGPU/WebGPU.modulemap:
* Source/WebGPU/WebGPU/WebGPUExt.h:
* Source/WebGPU/WebGPU/WebGPUSwift.h: Added.
* Source/WebGPU/WebGPU/WebGPUSwiftInternal.h: Added.
* Source/WebKit/Configurations/WebKit.xcconfig:
* Source/WebKit/GPUProcess/graphics/WebGPU/RemoteBuffer.cpp:
(WebKit::RemoteBuffer::copy):
* Tools/Scripts/webkitperl/FeatureList.pm:
Canonical link: https://commits.webkit.org/284166@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