Bug 240220

Summary: [WebGPU] Make the first few buffer mapping tests pass
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: WebGPUAssignee: Myles C. Maxfield <mmaxfield>
Status: ASSIGNED ---    
Severity: Normal CC: cdumez, esprehn+autocc, ews-watchlist, kondapallykalyan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 240441    
Bug Blocks: 240435, 240436, 240437, 240438    
Attachments:
Description Flags
WIP
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch none

Description Myles C. Maxfield 2022-05-08 17:34:24 PDT
.
Comment 1 Myles C. Maxfield 2022-05-08 17:34:49 PDT
Created attachment 459018 [details]
WIP
Comment 2 Myles C. Maxfield 2022-05-08 23:10:14 PDT
Created attachment 459028 [details]
Patch
Comment 3 Myles C. Maxfield 2022-05-08 23:16:44 PDT
Comment on attachment 459028 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=459028&action=review

> Source/WebGPU/WebGPU/Buffer.mm:212
> +    ASSERT(m_buffer.contents);

We probably need some kind of zero-filling logic. Mapping a buffer for write is supposed to zero-fill it, if JS actually ends up reading the ArrayBuffer.
Comment 4 Myles C. Maxfield 2022-05-08 23:40:25 PDT
Oh, mapping a buffer for reading on discrete GPU systems requires a call to synchronizeResource().
Comment 5 Myles C. Maxfield 2022-05-08 23:45:40 PDT
What if JavaScript specifies the sentinel?
Comment 6 Myles C. Maxfield 2022-05-15 14:50:13 PDT
Created attachment 459384 [details]
Patch
Comment 7 Radar WebKit Bug Importer 2022-05-15 17:35:13 PDT
<rdar://problem/93318423>
Comment 8 Myles C. Maxfield 2022-05-15 18:50:09 PDT
Created attachment 459386 [details]
Patch
Comment 9 Myles C. Maxfield 2022-05-17 20:07:18 PDT
Pull request: https://github.com/WebKit/WebKit/pull/714