Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 54d1dc60d078f8c06406b320ce13517ba849b33c
      
https://github.com/WebKit/WebKit/commit/54d1dc60d078f8c06406b320ce13517ba849b33c
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUAdapterImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUBindGroupImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUBindGroupLayoutImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUBufferImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUCommandBufferImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUCommandEncoderImpl.cpp
    M 
Source/WebCore/Modules/WebGPU/Implementation/WebGPUComputePassEncoderImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUComputePipelineImpl.cpp
    M 
Source/WebCore/Modules/WebGPU/Implementation/WebGPUConvertToBackingContext.h
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUDeviceImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUPipelineLayoutImpl.cpp
    M 
Source/WebCore/Modules/WebGPU/Implementation/WebGPUPresentationContextImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUQuerySetImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.cpp
    M 
Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderBundleEncoderImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderBundleImpl.cpp
    M 
Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderPassEncoderImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderPipelineImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUSamplerImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUShaderModuleImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUTextureImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUTextureViewImpl.cpp
    M Source/WebGPU/WebGPU/APIConversions.h
    M Source/WebGPU/WebGPU/BindGroup.mm
    M Source/WebGPU/WebGPU/BindGroupLayout.mm
    M Source/WebGPU/WebGPU/Buffer.mm
    M Source/WebGPU/WebGPU/CommandBuffer.mm
    M Source/WebGPU/WebGPU/CommandEncoder.mm
    M Source/WebGPU/WebGPU/ComputePassEncoder.mm
    M Source/WebGPU/WebGPU/ComputePipeline.mm
    M Source/WebGPU/WebGPU/Device.mm
    M Source/WebGPU/WebGPU/PipelineLayout.mm
    M Source/WebGPU/WebGPU/QuerySet.mm
    M Source/WebGPU/WebGPU/Queue.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/Sampler.h
    M Source/WebGPU/WebGPU/Sampler.mm
    M Source/WebGPU/WebGPU/ShaderModule.mm
    M Source/WebGPU/WebGPU/Texture.mm
    M Source/WebGPU/WebGPU/TextureView.mm
    M Source/WebGPU/WebGPU/WebGPU.h
    M Source/WebGPU/WebGPU/WebGPUExt.h
    M Source/WebGPU/WebGPU/XRSubImage.mm

  Log Message:
  -----------
  WebGPU: Use WGPUStringView for most descriptor labels
https://bugs.webkit.org/show_bug.cgi?id=324816
rdar://188073588

Reviewed by Mike Wyrzykowski.

Use WGPUStringView instead of const char* for most descriptor labels.
This makes the WebGPU.h more consistent with standard webgpu.h. Since
WebGPU.h arbitrarily mimics webgpu.h, there is no benefit in deviating.

Allows passing the always known string length with the strings.

WebGPU::Sampler would store WGPUSamplerDescriptor m_descriptor, which
is poor form, borderline layering violation. This leaked the illogical
behavior of using WTF::String in the WGPUSamplerDescriptor. Instead,
store the sampler descriptor fields, business as usual.

The only label not made consistent is
WGPUCommandBufferDescriptor::label, which has been converted to
WTF::String (a layering violation). Using GPUStringView would need a
unsafe swift declaration, so this is left to be addressed in isolation
in a future commit.

This is work towards being able to use WebGPU.h in ANGLE/WebGPU that
uses the standard webgpu.h interface.

* Source/WebCore/Modules/WebGPU/Implementation/WebGPUAdapterImpl.cpp:
(WebCore::WebGPU::AdapterImpl::requestDevice):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUBindGroupImpl.cpp:
(WebCore::WebGPU::BindGroupImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUBindGroupLayoutImpl.cpp:
(WebCore::WebGPU::BindGroupLayoutImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUBufferImpl.cpp:
(WebCore::WebGPU::BufferImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUCommandBufferImpl.cpp:
(WebCore::WebGPU::CommandBufferImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUCommandEncoderImpl.cpp:
(WebCore::WebGPU::CommandEncoderImpl::beginRenderPass):
(WebCore::WebGPU::CommandEncoderImpl::pushDebugGroup):
(WebCore::WebGPU::CommandEncoderImpl::insertDebugMarker):
(WebCore::WebGPU::CommandEncoderImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUComputePassEncoderImpl.cpp:
(WebCore::WebGPU::ComputePassEncoderImpl::pushDebugGroup):
(WebCore::WebGPU::ComputePassEncoderImpl::insertDebugMarker):
(WebCore::WebGPU::ComputePassEncoderImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUComputePipelineImpl.cpp:
(WebCore::WebGPU::ComputePipelineImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUConvertToBackingContext.h:
(WebCore::WebGPU::BackingStringView::BackingStringView):
(WebCore::WebGPU::toBackingStringView):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUDeviceImpl.cpp:
(WebCore::WebGPU::DeviceImpl::createBuffer):
(WebCore::WebGPU::DeviceImpl::createTexture):
(WebCore::WebGPU::DeviceImpl::createSampler):
(WebCore::WebGPU::DeviceImpl::importExternalTexture):
(WebCore::WebGPU::DeviceImpl::createBindGroupLayout):
(WebCore::WebGPU::DeviceImpl::createPipelineLayout):
(WebCore::WebGPU::DeviceImpl::createBindGroup):
(WebCore::WebGPU::DeviceImpl::createShaderModule):
(WebCore::WebGPU::convertToBacking):
(WebCore::WebGPU::DeviceImpl::createCommandEncoder):
(WebCore::WebGPU::DeviceImpl::createRenderBundleEncoder):
(WebCore::WebGPU::DeviceImpl::createQuerySet):
(WebCore::WebGPU::DeviceImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUImpl.cpp:
(WebCore::WebGPU::GPUImpl::createPresentationContext):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUPipelineLayoutImpl.cpp:
(WebCore::WebGPU::PipelineLayoutImpl::setLabelInternal):
* 
Source/WebCore/Modules/WebGPU/Implementation/WebGPUPresentationContextImpl.cpp:
(WebCore::WebGPU::PresentationContextImpl::configure):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUQuerySetImpl.cpp:
(WebCore::WebGPU::QuerySetImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.cpp:
(WebCore::WebGPU::QueueImpl::setLabelInternal):
* 
Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderBundleEncoderImpl.cpp:
(WebCore::WebGPU::RenderBundleEncoderImpl::pushDebugGroup):
(WebCore::WebGPU::RenderBundleEncoderImpl::insertDebugMarker):
(WebCore::WebGPU::RenderBundleEncoderImpl::finish):
(WebCore::WebGPU::RenderBundleEncoderImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderBundleImpl.cpp:
(WebCore::WebGPU::RenderBundleImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderPassEncoderImpl.cpp:
(WebCore::WebGPU::RenderPassEncoderImpl::pushDebugGroup):
(WebCore::WebGPU::RenderPassEncoderImpl::insertDebugMarker):
(WebCore::WebGPU::RenderPassEncoderImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPURenderPipelineImpl.cpp:
(WebCore::WebGPU::RenderPipelineImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUSamplerImpl.cpp:
(WebCore::WebGPU::SamplerImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUShaderModuleImpl.cpp:
(WebCore::WebGPU::ShaderModuleImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUTextureImpl.cpp:
(WebCore::WebGPU::TextureImpl::createView):
(WebCore::WebGPU::TextureImpl::setLabelInternal):
* Source/WebCore/Modules/WebGPU/Implementation/WebGPUTextureViewImpl.cpp:
(WebCore::WebGPU::TextureViewImpl::setLabelInternal):
* Source/WebGPU/WebGPU/APIConversions.h:
(WebGPU::fromAPI):
(WebGPU::toAPI):
* Source/WebGPU/WebGPU/BindGroup.mm:
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(wgpuBindGroupLayoutSetLabel):
* Source/WebGPU/WebGPU/Buffer.mm:
(wgpuBufferSetLabel):
* Source/WebGPU/WebGPU/CommandBuffer.mm:
(wgpuCommandBufferSetLabel):
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(wgpuCommandEncoderInsertDebugMarker):
(wgpuCommandEncoderPushDebugGroup):
(wgpuCommandEncoderSetLabel):
* Source/WebGPU/WebGPU/ComputePassEncoder.mm:
(wgpuComputePassEncoderInsertDebugMarker):
(wgpuComputePassEncoderPushDebugGroup):
(wgpuComputePassEncoderSetLabel):
* Source/WebGPU/WebGPU/ComputePipeline.mm:
(wgpuComputePipelineSetLabel):
* Source/WebGPU/WebGPU/Device.mm:
* Source/WebGPU/WebGPU/PipelineLayout.mm:
(wgpuPipelineLayoutSetLabel):
* Source/WebGPU/WebGPU/QuerySet.mm:
(WebGPU::Device::createQuerySet):
(wgpuQuerySetSetLabel):
* Source/WebGPU/WebGPU/Queue.mm:
* Source/WebGPU/WebGPU/RenderBundle.mm:
(wgpuRenderBundleSetLabel):
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::finish):
(wgpuRenderBundleEncoderInsertDebugMarker):
(wgpuRenderBundleEncoderPushDebugGroup):
(wgpuRenderBundleEncoderSetLabel):
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(wgpuRenderPassEncoderInsertDebugMarker):
(wgpuRenderPassEncoderPushDebugGroup):
(wgpuRenderPassEncoderSetLabel):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::Device::generatePipelineLayout):
(wgpuRenderPipelineSetLabel):
* Source/WebGPU/WebGPU/Sampler.h:
(WebGPU::Sampler::isComparison const):
(WebGPU::Sampler::isFiltering const):
* Source/WebGPU/WebGPU/Sampler.mm:
(WebGPU::createMetalDescriptorFromDescriptor):
(WebGPU::Sampler::Sampler):
(WebGPU::Sampler::setLabel):
(WebGPU::Sampler::tryCacheSamplerState const):
(wgpuSamplerSetLabel):
* Source/WebGPU/WebGPU/ShaderModule.mm:
(wgpuShaderModuleSetLabel):
* Source/WebGPU/WebGPU/Texture.mm:
(wgpuTextureSetLabel):
* Source/WebGPU/WebGPU/TextureView.mm:
(wgpuTextureViewSetLabel):
* Source/WebGPU/WebGPU/WebGPU.h:
* Source/WebGPU/WebGPU/WebGPUExt.h:
* Source/WebGPU/WebGPU/XRSubImage.mm:
(WebGPU::XRSubImage::update):

Canonical link: https://commits.webkit.org/321677@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to