Bug 264111

Summary: [WebGPU] Buffer synchronization is implemented incorrectly leading to data races between the CPU and GPU
Product: WebKit Reporter: Mike Wyrzykowski <mwyrzykowski>
Component: WebGPUAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Description Mike Wyrzykowski 2023-11-02 12:59:29 PDT
[WebGPU] Buffer synchronization is implemented incorrectly leading to data races between the CPU and GPU

Specifically, calling GPUCommandEncoder.copyXToBuffer() and then mapping the buffer contents returns the pointer, but the copy command may still be in flight.

This leads to data races
Comment 1 Radar WebKit Bug Importer 2023-11-02 12:59:44 PDT
<rdar://problem/117869389>
Comment 2 Mike Wyrzykowski 2023-11-03 00:21:41 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19938
Comment 3 EWS 2023-11-03 12:14:34 PDT
Committed 270195@main (1ab3947e3854): <https://commits.webkit.org/270195@main>

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