Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ccabb81a323018bdf1f9985be5659da5360065a2
https://github.com/WebKit/WebKit/commit/ccabb81a323018bdf1f9985be5659da5360065a2
Author: Richard Robinson <[email protected]>
Date: 2025-11-18 (Tue, 18 Nov 2025)
Changed paths:
M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj
M Source/WebGPU/WebGPU/Buffer.mm
M Source/WebGPU/WebGPU/Buffer.swift
M Source/WebGPU/WebGPU/CommandEncoder.mm
M Source/WebGPU/WebGPU/CommandEncoder.swift
A Source/WebGPU/WebGPU/CxxBridging.h
R Source/WebGPU/WebGPU/Internal/Logging.cpp
R Source/WebGPU/WebGPU/Internal/Logging.h
M Source/WebGPU/WebGPU/Internal/WebGPUSwiftInternal.h
M Source/WebGPU/WebGPU/Internal/module.modulemap
M Source/WebGPU/WebGPU/Queue.mm
M Source/WebGPU/WebGPU/Queue.swift
M Source/WebGPU/WebGPU/StdLibExtras.swift
Log Message:
-----------
[Swift in WebKit] Work towards proper WebGPU modularization (part 1)
https://bugs.webkit.org/show_bug.cgi?id=302588
rdar://164821471
Reviewed by BJ Burg and Mike Wyrzykowski.
- Add missing headers to the Xcode project
- Remove unnessecary Logging files and functions
- Properly mark the internal module umbrella header as an umbrella header
- The internal module umbrella header should only contain includes of project
headers; remove all others
- Move all declarations from the umbrella header to a regular header file
instead
- Remove unnecessary declarations, including `WTFRangeSizeT`,
`stdDynamicExtent`, `WGPU_COPY_STRIDE_UNDEFINED_`, and `MTLBlitOptionNone_`
- Change the namespace name to `CxxBridging` since the namespace name
`WebGPU_Internal` doesn't really make sense or reflect its purpose
- Remove `checkedDifferenceSizeT` since it wasn't doing anything in actuality
- Remove `clampDouble` in favor of a native Swift function
- Fix some inconsistent formatting
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:
* Source/WebGPU/WebGPU/Buffer.mm:
* Source/WebGPU/WebGPU/Buffer.swift:
(WebGPU.getMappedRange(_:size:)):
(computeRangeSize(_:offset:)): Deleted.
* Source/WebGPU/WebGPU/CommandEncoder.mm:
* Source/WebGPU/WebGPU/CommandEncoder.swift:
(WebGPU.finish(_:)):
(WebGPU.options):
(WebGPU.errorString(_:)):
(WebGPU.errorValidatingCopyTextureToTexture(_:destination:copySize:)):
(WebGPU.errorValidatingCopyTextureToBuffer(_:destination:copySize:)):
(WebGPU.errorValidatingImageCopyBuffer(_:)):
(WebGPU.errorValidatingCopyBufferToTexture(_:destination:copySize:)):
(WebGPU.errorValidatingRenderPassDescriptor(_:)):
(WebGPU.errorValidatingTimestampWrites(_:)):
(WebGPU.isMultisampleTexture(_:)):
(WebGPU.beginRenderPass(_:)):
(WebGPU.hasValidDimensions(_:width:height:depth:)):
(WebGPU.copyBufferToBuffer(_:sourceOffset:destination:destinationOffset:size:)):
(WebGPU.copyTextureToBuffer(_:destination:copySize:)):
(WebGPU.copyBufferToTexture(_:destination:copySize:)):
(WebGPU.clearBuffer(_:offset:size:)):
(WebGPU.copyTextureToTexture(_:destination:copySize:)):
(WebGPU.beginComputePass(_:)):
(CommandEncoder_beginRenderPass_thunk(_:descriptor:)):
(CommandEncoder_beginComputePass_thunk(_:descriptor:)):
(CommandEncoder_runClearEncoder_thunk(_:attachmentsToClear:depthStencilAttachmentToClear:depthAttachmentToClear:stencilAttachmentToClear:depthClearValue:stencilClearValue:existingEncoder:)):
Deleted.
(CommandEncoder_finish_thunk(_:descriptor:)):
(WebGPU.clearTextureIfNeeded(_:_:_:_:_:)): Deleted.
(WebGPU.runClearEncoder(_:depthStencilAttachmentToClear:depthAttachmentToClear:stencilAttachmentToClear:depthClearValue:stencilClearValue:existingEncoder:)):
Deleted.
(WebGPU.resolveQuerySet(_:firstQuery:queryCount:destination:destinationOffset:)):
Deleted.
(WebGPU.validateResolveQuerySet(_:firstQuery:queryCount:destination:destinationOffset:)):
Deleted.
* Source/WebGPU/WebGPU/CxxBridging.h: Copied from
Source/WebGPU/WebGPU/Internal/WebGPUSwiftInternal.h.
(roundUpToMultipleOfNonPowerOfTwoCheckedUInt32UnsignedLong):
(roundUpToMultipleOfNonPowerOfTwoUInt32UInt32):
(CxxBridging::isValidToUseWithTextureViewCommandEncoder):
(CxxBridging::isValidToUseWithQuerySetCommandEncoder):
(CxxBridging::isValidToUseWithBufferCommandEncoder):
(CxxBridging::isValidToUseWithTextureCommandEncoder):
(CxxBridging::isValidToUseWith):
(CxxBridging::areBuffersEqual):
(CxxBridging::convertWTFStringToNSString):
(CxxBridging::commandBufferThreadSafeWeakPtr):
* Source/WebGPU/WebGPU/Internal/Logging.cpp: Removed.
* Source/WebGPU/WebGPU/Internal/Logging.h: Removed.
* Source/WebGPU/WebGPU/Internal/WebGPUSwiftInternal.h:
(WebGPU_Internal::logString): Deleted.
(WebGPU_Internal::roundUpToMultipleOfNonPowerOfTwoCheckedUInt32UnsignedLong):
Deleted.
(WebGPU_Internal::roundUpToMultipleOfNonPowerOfTwoUInt32UInt32): Deleted.
(WebGPU_Internal::checkedDifferenceSizeT): Deleted.
(WebGPU_Internal::isValidToUseWithTextureViewCommandEncoder): Deleted.
(WebGPU_Internal::isValidToUseWithQuerySetCommandEncoder): Deleted.
(WebGPU_Internal::isValidToUseWithBufferCommandEncoder): Deleted.
(WebGPU_Internal::isValidToUseWithTextureCommandEncoder): Deleted.
(WebGPU_Internal::isValidToUseWith): Deleted.
(WebGPU_Internal::clampDouble): Deleted.
(WebGPU_Internal::areBuffersEqual): Deleted.
(WebGPU_Internal::convertWTFStringToNSString): Deleted.
(WebGPU_Internal::commandBufferThreadSafeWeakPtr): Deleted.
* Source/WebGPU/WebGPU/Internal/module.modulemap:
* Source/WebGPU/WebGPU/Queue.mm:
* Source/WebGPU/WebGPU/Queue.swift:
* Source/WebGPU/WebGPU/StdLibExtras.swift:
(Comparable.clamped(to:)):
Canonical link: https://commits.webkit.org/303206@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications