Skip to content

Conversation

@ids1024
Copy link
Member

@ids1024 ids1024 commented Jun 2, 2025

The unwrap_or_else() call here in import_shm_buffer() has a call to self.gl.GenTextures(), but self.egl.make_current() was only being called in the next block.

It appears this was the cause of some issues I saw on a multi-GPU system, where GenTextures ended up being called on the last current context, which if it was on the other GPU, caused this GlesTexture to be using the same texture ID as whatever other texture was assigned the same ID.

The `unwrap_or_else()` call here in `import_shm_buffer()` has a call to
`self.gl.GenTextures()`, but `self.egl.make_current()` was only being
called in the next block.

It appears this was the cause of some issues I saw on a multi-GPU
system, where `GenTextures` ended up being called on the last current
context, which if it was on the other GPU, caused this `GlesTexture` to
be using the same texture ID as whatever other texture was assigned the
same ID.
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

nice catch!

@Drakulix Drakulix merged commit bc19fd6 into Smithay:master Jun 2, 2025
12 of 13 checks passed
@ids1024 ids1024 deleted the make-current branch June 2, 2025 16:30
ids1024 added a commit to pop-os/cosmic-comp that referenced this pull request Jun 2, 2025
Drakulix pushed a commit to pop-os/cosmic-comp that referenced this pull request Jun 2, 2025
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