Skip to content

gles: Define a GlesContext, with a CurrentGlesContext guard#1750

Draft
ids1024 wants to merge 2 commits intoSmithay:masterfrom
ids1024:gles-context
Draft

gles: Define a GlesContext, with a CurrentGlesContext guard#1750
ids1024 wants to merge 2 commits intoSmithay:masterfrom
ids1024:gles-context

Conversation

@ids1024
Copy link
Member

@ids1024 ids1024 commented Jun 2, 2025

Still working through issues to use this everywhere. The goal is to prevent things like #1748.

In particular, GlesFrame needs to be updated to hold a CurrentGlesContext. Things like blit_to/bllit_from are a little funny here since they call a function that makes a different context current, then restore the context.

@ids1024
Copy link
Member Author

ids1024 commented Jun 2, 2025

I guess EGLContext::wait() should also require a current context.

Edit: For modularity the egl module could define an ActiveContext trait, and require that for create/wait instead of the requirement being in the doc comment but not enforced in any way.

Start using `GlesContext` helper

Use GlesContext helper in more places

import_egl_image() needs to take `&mut self`

Use context helper more

WIP

WIP

WIP

WIP

TODO call_without_current

WIP

XXX

XXX

texture_program

call_without_current

Make current

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

1 participant