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

Update glow to 0.14 #1195

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Update glow to 0.14 #1195

merged 1 commit into from
Sep 27, 2024

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Nov 1, 2023

No description provided.

@ids1024
Copy link
Member Author

ids1024 commented Nov 1, 2023

Hm, looking at the clippy error, it seems a change, in particular grovesNL/glow@d62451c7, make glow::Context no longer Send/Sync by adding a raw pointer to it, and not explicitly implementing those traits.

Show glow be implementing those wrappers, or should we wrap it to make it Sync? Assuming we need the renderer to be Send/Sync.

@Drakulix
Copy link
Member

Drakulix commented Nov 1, 2023

Hm, looking at the clippy error, it seems a change, in particular grovesNL/glow@d62451c7, make glow::Context no longer Send/Sync by adding a raw pointer to it, and not explicitly implementing those traits.

Show glow be implementing those wrappers, or should we wrap it to make it Sync? Assuming we need the renderer to be Send/Sync.

It is kinda right for glow to not explicitly implement those, given that this depends on the platform and even on unix this is not clear cut. As long as the context is only made current on one thread at a time, you can move it around, but otherwise stuff breaks.

So I guess it would be more correct for our wrapper to implement Send/Sync and make sure to uphold that invariant.

@ids1024
Copy link
Member Author

ids1024 commented Nov 1, 2023

Yeah, so using it with multiple threads can be unsafe. But glow is all unsafe, and it's up to the caller to know what safety constraints apply to their platform and use of glow.

So I guess it's a matter of taste whether or not such a type should be Send or Sync.

@SuperSonicHub1
Copy link

I'm trying to upgrade the egui and egui-glow dependencies in smithay-egui to 0.28 and was blocked by this PR still having not gone through. I'd like to help; what needs to be done to merge this PR?

@ids1024
Copy link
Member Author

ids1024 commented Jul 4, 2024

I guess we're still waiting for glow 0.14 to fix the Send + Sync bound? It was changed but not released yet: grovesNL/glow#267

`smithay-egui` also needs to be updated with `egui-glow` 0.29 to match.
@ids1024
Copy link
Member Author

ids1024 commented Sep 26, 2024

Updated to 0.14, and updated Smithay/smithay-egui#16.

@Drakulix Drakulix merged commit 3b0ecce into Smithay:master Sep 27, 2024
13 checks passed
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