-
Notifications
You must be signed in to change notification settings - Fork 180
[meta] Async all the things #175
Comments
I did some digging and as far as I can tell, |
Some of the async API changes are available in #193, but callbacks haven't been implemented for native though. |
The call to wgpu_device_poll in the https://doc.rust-lang.org/beta/std/future/trait.Future.html#runtime-characteristics
In regards to What I don't understand is how it's actually getting plumbed into the runtime. With networking, the socket is registered with epoll/kqueue/iocp. It's not clear (to me) how this would work with the GPU. I think there needs to be some sort of "IO driver" that's monitoring fences/semaphores/submissions/etc and waking up tasks when the resource it's waiting on has transitioned. |
I agree with @aloucks. I traced |
Polling isn't supposed to block, by definition. What makes you think it does? |
That's what we're saying. The problem is that |
I had some ideas about how to go about tackling this but it depended on timeline semaphores. It didn't look like The general idea was basically to have the |
Can we not discuss |
Well, |
We probably don't have to worry too much about It would be good to change these functions to return futures (even if they're immediately resolved) as a first step towards having consistent functions signatures between native and wasm. This should be partially resolved by #204 |
I marked request adapter/device as complete here because any further changes for use of callbacks/polling/etc. for these functions would happen in wgpu-native and webgpu-headers |
Uh oh!
There was an error while loading. Please reload this page.
All the asynchronous methods of the Web API should be async here as well:
At the very least, we can return a future that is resolved instantly.
The text was updated successfully, but these errors were encountered: