← WebKit — 2026-W36

0ad38fbf95da61a6e207e81b6d5a940f53ff6e71  GPUDevice.createBindGroup fast path is broken for external textures

severity low class LogicError confidence 0.4 signal score 7.77 Source/WebCore/Modules
Primitive: Bind-group entry equality never matched a bare GPUBuffer resource
Triage note: GPUBindGroupEntry::equal() previously returned false for a Ref<GPUBuffer> arm, so a bare buffer binding was never recognized as equal; the new equal(GPUBuffer&, GPUBindingResource&) overload fixes the matching. This is a resource-aliasing/validation helper whose memory impact is downstream and not demonstrable in this diff.
Structural signals: smartptr_member_added (+6.47), surgical (+1.3)

Commit message

GPUDevice.createBindGroup fast path is broken for external textures
https://bugs.webkit.org/show_bug.cgi?id=323117
rdar://186379208

Reviewed by Dan Glastonbury.

GPUBuffer is now allowed in GPUBindingResource, but we always returned
false from the GPUBuffer path. This prevented bind group reuse for
external video textures.

Test: fast/webgpu/bind-group-reuse-with-buffer-entry.html

* LayoutTests/fast/webgpu/bind-group-reuse-with-buffer-entry-expected.txt: Added.
* LayoutTests/fast/webgpu/bind-group-reuse-with-buffer-entry.html: Added.
* Source/WebCore/Modules/WebGPU/GPUBindGroupEntry.h:
(WebCore::GPUBindGroupEntry::equal):

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

Before / after

Loading diff…