-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WGPUFuture #199
Comments
After a bunch of discussion in the webgpu.h meeting we've decided we'll tentatively go forward with my proposal, except for the OS-interop bits that are very tricky and may or may not turn out to be necessary. (Chromium will most likely end up with interesting answers about what we decide to do.) Slide-deck version of the WGPUFuture proposal: https://docs.google.com/presentation/d/1_0lZlaja_9IJxBMZaQGKvAV8bPZoOosNouiF1WiuEBw/edit?usp=sharing EDIT: Forgot to paste the meeting notes from aug 10:
|
Making some tweaks to make it so we can choose not to polyfill and incrementally improve later:
|
|
|
Just a note: This struct has to be extensible, but WGPUInstanceDescriptor is also extensible, so we end up with: typedef struct WGPUInstanceFeatures {
WGPUChainedStruct const * nextInChain;
} WGPUInstanceFeatures WGPU_STRUCTURE_ATTRIBUTE;
typedef struct WGPUInstanceDescriptor {
WGPUChainedStruct const * nextInChain;
WGPUInstanceFeatures features;
} WGPUInstanceDescriptor WGPU_STRUCTURE_ATTRIBUTE;
WGPU_EXPORT WGPUSomeStatusEnum wgpuGetInstanceFeatures(WGPUInstanceFeatures* features) WGPU_FUNCTION_ATTRIBUTE; This is kind of redundant but I guess it's fine? We could extend only one or the other, and/or make wgpuGetInstanceFeatures take a WGPUInstanceDescriptor, but those solutions seem worse. |
meeting:
|
We forgot to revisit the question of how to report errors but I think one of the points of always returning a future (as I did in an earlier version of the proposal already) was that now we can return the null future when there's an error, so I propose that being our error mechanism. (With implementation-defined logging for the details.) |
Oh, Loko pointed out that if it's an enum (rather than flags that have invalid combinations) then we can probably just crash if you pass |
Dec 21 meeting
|
Jan 11 meeting:
|
Bug: webgpu-native/webgpu-headers#199 Change-Id: Id30ec55b2eb727ddf6dd0bf09b612ddee99b88da Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/173620 Commit-Queue: Austin Eng <enga@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Loko Kung <lokokung@google.com> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Mar 7 meeting:
|
Issues @lokokung raised during implementation of DeviceLost:
|
Mar 28 meeting:
|
Docs were added in #314! |
It looks like that pr also adds new functions to the spec. What part of WGPUFuture is still missing now? I'm curious to what extent I can already start implementing async support in wgpu-py 😊 |
I don't remember for sure, probably WGPUFuture is more or less landed, though there are some changes we need to make to the async functions' signatures for various reasons. I'll review at some point soon.... That said, this header doesn't yet match wgpu-native or Dawn, so please use the header that corresponds with your implementation. (Dawn has implemented WGPUFuture hasn't done all the signature changes yet either.) |
Thanks for your reply!
It's on the way 🚀 gfx-rs/wgpu-native#427 Reading through some of the docs referenced here, I saw that if one uses the futures for all events (once its implemented) its not longer necessary to call |
Just FYI, my PR doesn't really implement |
IIRC we want to guarantee that stuff like this happens periodically as long as you're submitting work (e.g. in queue.submit()). Though I did have an unused proposal for a function that would do this, if we find it's needed: https://docs.google.com/document/d/1qJRTJRY318ZEqhK6ryw4P-91FumYQfOnNP6LpANYy6A/edit#heading=h.l3149w38ebmt |
I think this is done. |
jk, we're at least missing any usages of |
Ah, that was just due to a generator typo, I'll close this again and the open PR can track the fix. |
I've been working on this for a while, but haven't filed a tracking issue until now.
The main problem is that ProcessEvents is a polling-based API, so there's no way to get notified/woken when an event happens (like posix
poll
, orvkWaitForFences
). A bunch of other issues also crop up around:Expect more from me on this soon.
This issue also subsumes:
TODO:
The text was updated successfully, but these errors were encountered: