Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 57ae1268754271fe3e80a72f98e2a7749bb2fde8
https://github.com/WebKit/WebKit/commit/57ae1268754271fe3e80a72f98e2a7749bb2fde8
Author: Ruthvik Konda <[email protected]>
Date: 2026-06-29 (Mon, 29 Jun 2026)
Changed paths:
A LayoutTests/fast/webgpu/bind-group-duplicate-binding-expected.txt
A LayoutTests/fast/webgpu/bind-group-duplicate-binding.html
M Source/WebGPU/WebGPU/BindGroup.mm
Log Message:
-----------
[WebGPU] Reject duplicate binding entries in Device::createBindGroup
https://bugs.webkit.org/show_bug.cgi?id=314684
rdar://176482460
Reviewed by Mike Wyrzykowski.
Device::createBindGroup checked that descriptor.entryCount matched the
layout's entry count, but not that each entry.binding was unique.
Duplicate entries caused dynamicBuffers and m_dynamicOffsetsIndices to
be built with extra records, so dynamic-offset validation in setBindGroup
no longer corresponded to the offsets applied at dispatch.
Track seen binding indices with a HashSet at the top of the per-entry
loop and reject duplicates with a validation error, mirroring the
existing check in Device::createBindGroupLayout.
* LayoutTests/fast/webgpu/bind-group-duplicate-binding-expected.txt: Added.
* LayoutTests/fast/webgpu/bind-group-duplicate-binding.html: Added.
* Source/WebGPU/WebGPU/BindGroup.mm:
(WebGPU::Device::createBindGroup):
Originally-landed-as: 305413.903@safari-7624-branch (b49e6e956529).
rdar://180428744
Canonical link: https://commits.webkit.org/316038@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications