Bug 240220 - [WebGPU] Make the first few buffer mapping tests pass
Summary: [WebGPU] Make the first few buffer mapping tests pass
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on: 240441
Blocks: 240435 240436 240437 240438
  Show dependency treegraph
 
Reported: 2022-05-08 17:34 PDT by Myles C. Maxfield
Modified: 2022-05-17 20:08 PDT (History)
5 users (show)

See Also:


Attachments
WIP (11.47 KB, patch)
2022-05-08 17:34 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (12.54 KB, patch)
2022-05-08 23:10 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (168.96 KB, patch)
2022-05-15 14:50 PDT, Myles C. Maxfield
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (166.29 KB, patch)
2022-05-15 18:50 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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