Bug 262350

Summary: [WGSL] Support for atomic functions
Product: WebKit Reporter: Mike Wyrzykowski <mwyrzykowski>
Component: WebGPUAssignee: Tadeu Zagallo <tzagallo>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Description Mike Wyrzykowski 2023-09-28 17:50:35 PDT
The cornell box sample https://webgpu.github.io/webgpu-samples/samples/cornell uses atomic functions:

83:2: unresolved call target 'atomicAdd'
84:2: unresolved call target 'atomicAdd'
85:2: unresolved call target 'atomicAdd'
121:25: unresolved call target 'atomicLoad'
134:6: unresolved call target 'atomicStore'
135:6: unresolved call target 'atomicStore'
136:6: unresolved call target 'atomicStore'


Atomic add can be found on page 242 of the metal specification (atomic_fetch_add_explicit)
atomic_store_explicit and atomic_load_explicit are around page 239 and 240
Comment 1 Radar WebKit Bug Importer 2023-09-28 17:50:56 PDT
<rdar://problem/116211761>
Comment 2 Tadeu Zagallo 2023-10-03 12:11:49 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18570
Comment 3 EWS 2023-10-04 01:19:42 PDT
Committed 268832@main (ac4a3aa79eaa): <https://commits.webkit.org/268832@main>

Reviewed commits have been landed. Closing PR #18570 and removing active labels.