Skip to content

glamor/glamor_egl: xfree86/glamor_egl: try more egl platforms#2202

Open
stefan11111 wants to merge 1 commit intoX11Libre:masterfrom
stefan11111:more-egl-platforms-v4
Open

glamor/glamor_egl: xfree86/glamor_egl: try more egl platforms#2202
stefan11111 wants to merge 1 commit intoX11Libre:masterfrom
stefan11111:more-egl-platforms-v4

Conversation

@stefan11111
Copy link
Copy Markdown
Contributor

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: #2083

v2: #1758

v1: #1729

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