WIP: Event loop sketch#377
WIP: Event loop sketch#377grovesNL wants to merge 2 commits intogfx-rs:masterfrom grovesNL:event-loop
Conversation
wgpu-native/src/event_loop.rs
Outdated
| }; | ||
| let mut token = Token::root(); | ||
| global | ||
| .event_loops |
There was a problem hiding this comment.
do we have to go through the global at all here? Perhaps, instead we should just return a pointer to the boxed structure and receive it where appropriate?
There was a problem hiding this comment.
I wasn't sure whether we need to track the event loop, i.e. for validation or some other use internally.
Relatedly I was also wondering whether the event loop should become bound to the adapter or device so that we only have to provide it once. For example, if it was pass into request_adapter and it becomes bound, then we could attach the event loop to anything created from that adapter (device, resources, etc.).
There was a problem hiding this comment.
Alright, I'm avoiding the global registry for now until we know it's needed
377: Update with minBufferBindingSize r=cwfitzgerald a=kvark Depends on gfx-rs#726 Also reverts gfx-rs#373 : buffer bindings now have to include at least one element of an unsized struct portion, so they can't be zero-sized. Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
|
Considering this PR is nearly old enough to talk, and the branch is deleted, I'm going to close it as mildly out of date. |
I started to sketch out we might manage the event loop and wanted to get some feedback before proceeding much further.
Currently it's only implemented in the triangle example for
request_adapter_async, but this should at least show the concept.