Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 04ec766364a1e6941b1bf785e45f71401917f435
https://github.com/WebKit/WebKit/commit/04ec766364a1e6941b1bf785e45f71401917f435
Author: Kimmo Kinnunen <[email protected]>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M Source/WebGPU/WebGPU/BindGroup.mm
M Source/WebGPU/WebGPU/BindGroupLayout.h
M Source/WebGPU/WebGPU/BindGroupLayout.mm
M Source/WebGPU/WebGPU/Pipeline.mm
M Source/WebGPU/WebGPU/RenderPipeline.mm
M Source/WebGPU/WebGPU/ShaderModule.mm
Log Message:
-----------
WebGPU: Do not store WGPU*BindingLayout structs in BindGroupLayout::Entry
https://bugs.webkit.org/show_bug.cgi?id=325144
rdar://188276534
Reviewed by Mike Wyrzykowski.
BindGroupLayout::Entry stored the binding layout as a Variant of the
WGPUBufferBindingLayout, WGPUSamplerBindingLayout,
WGPUTextureBindingLayout, WGPUStorageTextureBindingLayout and
WGPUExternalTextureBindingLayout API structs. Storing API structs in
implementation objects is poor form: the structs communicate the wgpu
API call parameters for the duration of the call only. None of these
have pointer fields today, but in the standard webgpu.h each of them
has nextInChain, which would dangle in the stored copy.
Store internal structs with the same fields instead, converted with
BindGroupLayout::bindingLayoutFromAPI() in Device::createBindGroupLayout
and in the shader-generated layout path.
This is work towards being able to add nextInChain to the WebGPU.h
descriptors.
* Source/WebGPU/WebGPU/BindGroup.mm:
(WebGPU::validateTextureSampleType):
(WebGPU::sampleType):
(WebGPU::validateStorageTextureViewFormat):
(WebGPU::usageForTexture):
(WebGPU::usageForStorageTexture):
(WebGPU::validateTextureOrBindGroup):
(WebGPU::Device::createBindGroup):
* Source/WebGPU/WebGPU/BindGroupLayout.h:
* Source/WebGPU/WebGPU/BindGroupLayout.mm:
(WebGPU::BindGroupLayout::bindingLayoutFromAPI):
(WebGPU::Device::createBindGroupLayout):
(WebGPU::isEqual):
(WebGPU::BindGroupLayout::equalBindingEntries):
* Source/WebGPU/WebGPU/Pipeline.mm:
(WebGPU::errorValidatingBindGroup):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::makeBindingLayout):
(WebGPU::toBindingLayout):
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::convertBindingLayout):
Canonical link: https://commits.webkit.org/321803@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications