WebGPU IPC bind-group-layout entry serialization (refactor)
Component: WebKit WebGPU IPC | 94fa535
Source/WebKit/Shared/WebGPU/WebGPUBindGroupLayoutDescriptor.cpp
Source/WebKit/Shared/WebGPU/WebGPUBindGroupLayoutEntry.h
A bind group layout descriptor declares the resources a shader can bind — buffers, samplers, textures, storage textures, external textures — with per-entry binding index, stage visibility and type parameters, and every decoded field is attacker-controlled from the GPU process's point of view. The IPC copies of BindGroupLayoutEntry and its five binding-layout types now alias the ::WebGPU value types, serialized directly by their .serialization.in files; six converter files are deleted and descriptor converters copy the entries Vector wholesale.
Significance
The WebContent-to-GPU path for bind group layouts is now defined by the generated IPC encoder/decoder alone, with no hand-written conversion layer in between. The old converters were pass-through copies, so validation behavior is effectively unchanged.
Audit directions
Narrow: check that each .serialization.in field list matches every member of the ::WebGPU structs, since a missed or reordered field would leave it default-initialized on the GPU side, and whether the ::WebGPU structs carry padding or default member initializers that differ from the old IPC structs. Wider: trace whether the Metal-side createBindGroupLayout validates entries with several or none of buffer/sampler/texture/storageTexture/externalTexture set, binding-index uniqueness, minBindingSize and per-stage limits — a question sharpened by this week's [1] and the duplicate-@binding fix in 9589788. Also review the Vector copy in convertFromBacking for large entry counts and the lifetime of span-borrowed entries against the caller.