Skip to content

Conversation

@eafton
Copy link
Contributor

@eafton eafton commented Sep 30, 2025

This adds an use_opaque_ext variable to SDL_EGL_CreateSurface. If surface creation fails due to a EGL_BAD_ATTRIBUTE error, this variable is set to false, and the function jumps back to the start.

@slouken
Copy link
Collaborator

slouken commented Sep 30, 2025

Can you add a description that more fully explains what you're doing and is suitable as a merge commit note?

@eafton
Copy link
Contributor Author

eafton commented Sep 30, 2025

Can you add a description that more fully explains what you're doing and is suitable as a merge commit note?

Done.

@slouken
Copy link
Collaborator

slouken commented Sep 30, 2025

That describes the code mechanically, I'm thinking more like "what is this fixing, why does it fix this?"

@eafton
Copy link
Contributor Author

eafton commented Sep 30, 2025

When using EGL with X11 on an NVIDIA system, the eglCreateWindowSurface call fails due to a EGL_BAD_ATTRIBUTE error, this error comes from the EGL_DISPLAY extension being used.

This PR fixes this by retrying surface creation without the EGL_DISPLAY extension if eglCreateWindowSurface errors out with EGL_BAD_ATTRIBUTE .

@slouken
Copy link
Collaborator

slouken commented Sep 30, 2025

Perfect, thanks!

@slouken slouken added this to the 3.4.0 milestone Oct 8, 2025
@slouken slouken merged commit 98eaa05 into libsdl-org:main Oct 8, 2025
42 checks passed
@slouken
Copy link
Collaborator

slouken commented Oct 8, 2025

Merged, thanks!

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.

2 participants