Bug 236934 - [WebGPU] Tracer bullet part 12: Add block-based callbacks in addition to C function pointer callbacks
Summary: [WebGPU] Tracer bullet part 12: Add block-based callbacks in addition to C fu...
Status: RESOLVED FIXED
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:
Blocks: 236879 236935
  Show dependency treegraph
 
Reported: 2022-02-20 00:56 PST by Myles C. Maxfield
Modified: 2022-02-21 14:10 PST (History)
2 users (show)

See Also:


Attachments
Patch (14.04 KB, patch)
2022-02-20 01:02 PST, Myles C. Maxfield
dino: review+
Details | Formatted Diff | Diff
Patch for committing (22.33 KB, patch)
2022-02-21 13:49 PST, 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-02-20 00:56:00 PST
Instead of a userdata/function pointer pair, we can just use a block.
Comment 1 Myles C. Maxfield 2022-02-20 00:57:45 PST
It turns out we can't actually use this just yet because blocks have to be copyable, which means any lambdas we convert to blocks have to be copyable, but in the GPU Process we receive a CompletionHandler to call back with a reply, but CompletionHandlers are not copyable, so we can't construct the block to pass in to WebGPU.framework.
Comment 2 Myles C. Maxfield 2022-02-20 01:02:28 PST
Created attachment 452684 [details]
Patch
Comment 3 Myles C. Maxfield 2022-02-21 13:49:01 PST
Created attachment 452770 [details]
Patch for committing
Comment 4 Myles C. Maxfield 2022-02-21 14:09:59 PST
Committed r290270 (247595@trunk): <https://commits.webkit.org/247595@trunk>
Comment 5 Radar WebKit Bug Importer 2022-02-21 14:10:20 PST
<rdar://problem/89255880>