Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fcf2b0b8900ccf5d83c50776e38035263c84b282
https://github.com/WebKit/WebKit/commit/fcf2b0b8900ccf5d83c50776e38035263c84b282
Author: Kimmo Kinnunen <[email protected]>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M Source/WebCore/Headers.cmake
A Source/WebCore/Modules/WebGPU/Implementation/WebGPUAPIUtilities.h
M Source/WebCore/Modules/WebGPU/Implementation/WebGPUBindGroupLayoutImpl.h
M Source/WebCore/Modules/WebGPU/Implementation/WebGPUShaderModuleImpl.cpp
M Source/WebCore/PlatformCocoa.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebGPU/WebGPU/APIConversions.h
M Source/WebGPU/WebGPU/Adapter.mm
M Source/WebGPU/WebGPU/BindGroup.mm
M Source/WebGPU/WebGPU/BindGroupLayout.mm
M Source/WebGPU/WebGPU/CommandEncoder.mm
M Source/WebGPU/WebGPU/ComputePipeline.mm
M Source/WebGPU/WebGPU/PipelineLayout.mm
M Source/WebGPU/WebGPU/PresentationContextIOSurface.mm
M Source/WebGPU/WebGPU/RenderBundle.mm
M Source/WebGPU/WebGPU/RenderBundleEncoder.mm
M Source/WebGPU/WebGPU/RenderPassEncoder.mm
M Source/WebGPU/WebGPU/RenderPipeline.mm
M Source/WebGPU/WebGPU/ShaderModule.mm
M Source/WebGPU/WebGPU/Texture.mm
M Source/WebGPU/WebGPU/WebGPU.h
Log Message:
-----------
WebGPU: Remove unrelated helpers from WebGPU.h
https://bugs.webkit.org/show_bug.cgi?id=324964
rdar://188180617
Reviewed by Mike Wyrzykowski.
WebGPU.h would have C++ helpers: free functions on return value types
and C++ member functions on the descriptor structs. Remove these,
as they are incorrect and make the WebGPU.h deviate from
the standard webgpu.h. Also, having C++ in logically extern "C" API is
unexpected.
The free functions (messagesSpan) operating on API return values are
not part of WebGPU.framework API. They are the logic of the caller
project, where each caller project has their bespoke logic for them.
Move the function to to
WebCore/Modules/WebGPU/Implementation/WebGPUAPIUtilities.h.
The descriptor member functions are not API functions. The clients do
not generally operate on the descriptors, rather their internal domain
types. The API implementation does operate on the descriptors. Move the
functions as free functions in WebGPU/WebGPU/APIConversions.h.
This is work towards being able to use WebGPU.h in ANGLE/WebGPU that
uses the standard webgpu.h interface.
* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUShaderModuleImpl.cpp:
(WebCore::WebGPU::ShaderModuleImpl::compilationInfo):
* Source/WebCore/PlatformCocoa.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebGPU/WebGPU/APIConversions.h:
(WebGPU::bindGroupLayoutsSpan):
(WebGPU::colorFormatsSpan):
(WebGPU::entriesSpan):
(WebGPU::constantsSpan):
(WebGPU::hintsSpan):
(WebGPU::viewFormatsSpan):
(WebGPU::attributesSpan):
(WebGPU::requiredFeaturesSpan):
(WebGPU::colorAttachmentsSpan):
(WebGPU::buffersSpan):
(WebGPU::targetsSpan):
* Source/WebGPU/WebGPU/Adapter.mm:
(WebGPU::Adapter::requestDevice):
* Source/WebGPU/WebGPU/BindGroup.mm:
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(WebGPU::Device::createBindGroupLayout):
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::beginRenderPass):
* Source/WebGPU/WebGPU/ComputePipeline.mm:
(WebGPU::Device::createComputePipeline):
* Source/WebGPU/WebGPU/PipelineLayout.mm:
(WebGPU::Device::createPipelineLayout):
* Source/WebGPU/WebGPU/PresentationContextIOSurface.mm:
* Source/WebGPU/WebGPU/RenderBundle.mm:
(WebGPU::RenderBundle::RenderBundle):
(WebGPU::RenderBundle::validateRenderPass const):
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::Device::createRenderBundleEncoder):
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::RenderPassEncoder):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::createVertexDescriptor):
(WebGPU::Device::createRenderPipeline):
(WebGPU::RenderPipeline::validateRenderBundle const):
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::earlyCompileShaderModule):
* Source/WebGPU/WebGPU/Texture.mm:
(WebGPU::Device::createTexture):
* Source/WebGPU/WebGPU/WebGPU.h:
(WGPUPipelineLayoutDescriptor::bindGroupLayoutsSpan const): Deleted.
(WGPURenderBundleEncoderDescriptor::colorFormatsSpan const): Deleted.
(WGPUBindGroupDescriptor::entriesSpan const): Deleted.
(messagesSpan): Deleted.
(WGPUComputeState::constantsSpan const): Deleted.
(WGPUShaderModuleDescriptor::hintsSpan const): Deleted.
(WGPUTextureDescriptor::viewFormatsSpan const): Deleted.
(WGPUVertexBufferLayout::attributesSpan const): Deleted.
(WGPUBindGroupLayoutDescriptor::entriesSpan const): Deleted.
(WGPUDeviceDescriptor::requiredFeaturesSpan const): Deleted.
(WGPURenderPassDescriptor::colorAttachmentsSpan const): Deleted.
(WGPUVertexState::buffersSpan const): Deleted.
(WGPUVertexState::constantsSpan const): Deleted.
(WGPUFragmentState::targetsSpan const): Deleted.
(WGPUFragmentState::constantsSpan const): Deleted.
Canonical link: https://commits.webkit.org/321778@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications