glamor/glamor_egl: xfree86/glamor_egl: try more egl platforms#2202
Open
stefan11111 wants to merge 1 commit intoX11Libre:masterfrom
Open
glamor/glamor_egl: xfree86/glamor_egl: try more egl platforms#2202stefan11111 wants to merge 1 commit intoX11Libre:masterfrom
stefan11111 wants to merge 1 commit intoX11Libre:masterfrom
Conversation
With this, glamor_egl now tries the platforms
`EGL_PLATFORM_GBM_{KHR,MESA}`, `EGL_PLATFORM_DEVICE_EXT`,
and `EGL_PLATFORM_SURFACELESS_MESA`
`EGL_PLATFORM_SURFACELESS_MESA` is used as a fallback,
and is probably not very useful in practice, since if
it is supported, the GBM or Device platform is probably
also supported.
After it, we try all platforms with `EGL_DEFAULT_DISPLAY`
as the `native_display` argument.
Like Surfaceless, there are probably not very useful, and are
there as a last-resort fallback path if we're sure they cannot
break anything.
These fallbacks only take up 6 extra lines of code (excluding comments),
and they allow us to be robust with our fallback paths.
The interesting platform in this patch is `EGL_PLATFORM_DEVICE_EXT`
This one can be used without a dri fd, and is the only plaform
supported on old nvidia cards (<= nvidia-470), regardless of whether
a dri fd is passed or not.
As a side note, while I don't currently have any
concete plans, this is a step forward towards `EGLStream` support.
A further patch will add support for the nvidia-390 driver,
since it does not support `EGL_KHR_no_config_context`,
which glamor currently requires.
For related Xwayland `EGLStream` code, see:
https://gitlab.freedesktop.org/xorg/xserver/-/commit/feb35a2e6b0357bcbdb77ad10c3b8285c0e2f055
Though not very useful, here are the previous iterations
of the patch:
v3: X11Libre#2083
v2: X11Libre#1758
v1: X11Libre#1729
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
03016b2 to
168d930
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this, glamor_egl now tries the platforms
EGL_PLATFORM_GBM_{KHR,MESA},EGL_PLATFORM_DEVICE_EXT, andEGL_PLATFORM_SURFACELESS_MESAEGL_PLATFORM_SURFACELESS_MESAis used as a fallback, and is probably not very useful in practice, since if it is supported, the GBM or Device platform is probably also supported.After it, we try all platforms with
EGL_DEFAULT_DISPLAYas thenative_displayargument.Like Surfaceless, there are probably not very useful, and are there as a last-resort fallback path if we're sure they cannot break anything.
These fallbacks only take up 6 extra lines of code (excluding comments), and they allow us to be robust with our fallback paths.
The interesting platform in this patch is
EGL_PLATFORM_DEVICE_EXTThis one can be used without a dri fd, and is the only plaform supported on old nvidia cards (<= nvidia-470), regardless of whether a dri fd is passed or not.As a side note, while I don't currently have any
concete plans, this is a step forward towards
EGLStreamsupport.A further patch will add support for the nvidia-390 driver, since it does not support
EGL_KHR_no_config_context, which glamor currently requires.For related Xwayland
EGLStreamcode, see:https://gitlab.freedesktop.org/xorg/xserver/-/commit/feb35a2e6b0357bcbdb77ad10c3b8285c0e2f055
Though not very useful, here are the previous iterations of the patch:
v3: #2083
v2: #1758
v1: #1729