Skip to content
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

Move out invalidity from the Registry #6243

Merged
merged 26 commits into from
Sep 10, 2024
Merged

Conversation

teoxoy
Copy link
Member

@teoxoy teoxoy commented Sep 9, 2024

Another step towards #5121.

This moves out resource invalidity from the Registry; by storing a new Fallible type in the Registry instead.
Note that there are a few types that can't be invalid or have internal invalidity (ex Device), those don't need to be wrapped in a Fallible.

PR doesn't need to be squashed, each commit builds by itself.

…r()` and use them for adapters

This works because we never assign errors to adapters (they are never invalid).
This works because we never assign errors to surfaces (they are never invalid).
…rusty

This is fine from the WebGPU spec's perspective as device creation returns a promise that can reject.
This works because we never assign errors to queues (they are never invalid).
This works because we never assign errors to devices (they are never invalid).
@teoxoy teoxoy requested a review from a team as a code owner September 9, 2024 15:44
@teoxoy teoxoy self-assigned this Sep 9, 2024
Copy link
Contributor

@nical nical left a comment

Choose a reason for hiding this comment

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

Splendid

@teoxoy teoxoy merged commit c4110af into gfx-rs:trunk Sep 10, 2024
25 checks passed
@teoxoy teoxoy deleted the move-out-invalidity branch September 10, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants