Skip to content

WIP: Event loop sketch#377

Closed
grovesNL wants to merge 2 commits intogfx-rs:masterfrom
grovesNL:event-loop
Closed

WIP: Event loop sketch#377
grovesNL wants to merge 2 commits intogfx-rs:masterfrom
grovesNL:event-loop

Conversation

@grovesNL
Copy link
Copy Markdown
Collaborator

@grovesNL grovesNL commented Nov 8, 2019

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.

@grovesNL grovesNL requested a review from kvark November 8, 2019 04:55
};
let mut token = Token::root();
global
.event_loops
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I'm avoiding the global registry for now until we know it's needed

kvark added a commit to kvark/wgpu that referenced this pull request Jun 3, 2021
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>
@cwfitzgerald
Copy link
Copy Markdown
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants