Bug 236899 - [WebGPU] Tracer bullet part 6: Give a RunLoop to Instance
Summary: [WebGPU] Tracer bullet part 6: Give a RunLoop to Instance
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: 236891
Blocks: 236879
  Show dependency treegraph
 
Reported: 2022-02-19 16:39 PST by Myles C. Maxfield
Modified: 2022-02-21 11:59 PST (History)
3 users (show)

See Also:


Attachments
Patch (4.17 KB, patch)
2022-02-19 16:40 PST, Myles C. Maxfield
dino: review+
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-19 16:39:28 PST
The shared header has a function, wgpuInstanceProcessEvents(), which is supposed to synchronously call all outstanding callbacks. A natural way to do this is to hook this up to [NSRunLoop runMode:beforeDate:].
Comment 1 Myles C. Maxfield 2022-02-19 16:40:46 PST
Created attachment 452663 [details]
Patch
Comment 2 Dean Jackson 2022-02-21 09:26:49 PST
Comment on attachment 452663 [details]
Patch

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

> Source/WebGPU/ChangeLog:10
> +        The shared header has a function, wgpuInstanceProcessEvents(), which is supposed
> +        to synchronously call all outstanding callbacks. A natural way to do this is to
> +        hook this up to [NSRunLoop runMode:beforeDate:].

What's the layering between WebGPU and Foundation? How would a non-Apple port do this?
Comment 3 Myles C. Maxfield 2022-02-21 11:46:49 PST
Comment on attachment 452663 [details]
Patch

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

>> Source/WebGPU/ChangeLog:10
>> +        hook this up to [NSRunLoop runMode:beforeDate:].
> 
> What's the layering between WebGPU and Foundation? How would a non-Apple port do this?

Non-Apple ports wouldn't use WebGPU.framework at all. They would use Dawn or wgpu. So the layering is just "Foundation is below WebGPU.framework."
Comment 4 Myles C. Maxfield 2022-02-21 11:58:57 PST
Committed r290258 (?): <https://commits.webkit.org/r290258>
Comment 5 Radar WebKit Bug Importer 2022-02-21 11:59:21 PST
<rdar://problem/89249380>