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

Headless with independent eventsloop #1152

Closed
msiglreith opened this issue May 3, 2019 · 3 comments
Closed

Headless with independent eventsloop #1152

msiglreith opened this issue May 3, 2019 · 3 comments

Comments

@msiglreith
Copy link
Member

I'm trying to create a 'true' headless context (no present or event polling at all) along a shared windowed context. Therefore I would like to create an own eventloop for these independent of the windowed context. The docs state:

One notable limitation of the Wayland backend when it comes to shared Contexts is that both contexts must use the same events loop.

Is there further information which parts prevent this? Or what would be the issue when violation this limitation?

@goddessfreya
Copy link
Contributor

goddessfreya commented May 3, 2019

You will get an EGL_BAD_MATCH error.

Egl specs, §3.7.1.6:

An EGL_BAD_MATCH error is generated if an OpenGL or OpenGL ES context is requested and any of:
[..]

  • share context was created on a different display than the one
    referenced by config

With Wayland, different connections to Wayland result in a different EGL display. I cannot recall the details. This is not the case with X11, because they all get the same connection.

Depending on how you interpret the specs, you could argue that this is a bug in the mesa* impl of context sharing.

*If I remember correctly, this wasn't caused by mesa, but instead by libglvnd.so or something of that likes which calls mesa. The details are fuzzy now.

@msiglreith
Copy link
Member Author

I looked a bit into this and it appears that mesa doesn't currently allow sharing across different displays as you mentioned. I haven't looked how deep this is rooted in the driver.

@kchibisov
Copy link
Member

kchibisov commented Sep 3, 2022

Not relevant after #1435.

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

No branches or pull requests

3 participants