Skip to content

More egl platforms v3#2083

Draft
stefan11111 wants to merge 17 commits intoX11Libre:masterfrom
stefan11111:more-egl-platforms-v3
Draft

More egl platforms v3#2083
stefan11111 wants to merge 17 commits intoX11Libre:masterfrom
stefan11111:more-egl-platforms-v3

Conversation

@stefan11111
Copy link
Copy Markdown
Contributor

@stefan11111 stefan11111 commented Feb 13, 2026

A combination of #1758 and the glamor code from Xfbdev.

With this, hw acceleration works on 470 and 390 cards with the modesetting driver.
From my testing, performance is slightly better than in Xfbdev, but not the same as what I get with the 580 driver with dri enabled.

I only tested this with me gtx 1050, with the 470 and 390 drivers. I don't have an older card to test with.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
…p_internal`

If we can't directly import a bo from an EGLImage, export the image
as dmabufs and import a bo from dmabufs.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
… reuse

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
… supported

If there is not even one (format, modifier) pair, then glamor cannot function.
This allows drivers, notably modesetting, to detect early that
glamor cannot be used, and fall back to something else.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@stefan11111 stefan11111 marked this pull request as draft February 13, 2026 16:44
It isn't actually useful for now.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@stefan11111 stefan11111 force-pushed the more-egl-platforms-v3 branch from 2582d08 to 2c528c0 Compare February 13, 2026 16:59
Not used anywhere

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@stefan11111 stefan11111 force-pushed the more-egl-platforms-v3 branch from 1d660de to 93fc249 Compare February 13, 2026 19:07
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@stefan11111 stefan11111 force-pushed the more-egl-platforms-v3 branch from 93fc249 to af92de7 Compare February 13, 2026 19:10
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@stefan11111 stefan11111 force-pushed the more-egl-platforms-v3 branch from 2ba2d46 to c6c5107 Compare February 13, 2026 19:35
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
…latform

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@stefan11111 stefan11111 force-pushed the more-egl-platforms-v3 branch from e2c8503 to 95937d4 Compare February 13, 2026 20:15
… compat with drivers

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@stefan11111 stefan11111 force-pushed the more-egl-platforms-v3 branch from c30443c to 6dd5780 Compare February 13, 2026 20:59
This extension is not available with the 390 nvidia driver

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@stefan11111 stefan11111 requested a review from a team February 13, 2026 22:40
@stefan11111
Copy link
Copy Markdown
Contributor Author

@notbabaisyou ping

@stefan11111 stefan11111 marked this pull request as ready for review February 13, 2026 22:41
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
@stefan11111 stefan11111 marked this pull request as draft February 15, 2026 13:31
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Merge Conflict found

2 similar comments
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Merge Conflict found

@github-actions
Copy link
Copy Markdown

Merge Conflict found

stefan11111 added a commit to stefan11111/xserver that referenced this pull request Apr 17, 2026
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.

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>
stefan11111 added a commit to stefan11111/xserver that referenced this pull request Apr 17, 2026
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.

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>
stefan11111 added a commit to stefan11111/xserver that referenced this pull request Apr 17, 2026
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>
stefan11111 added a commit to stefan11111/xserver that referenced this pull request Apr 17, 2026
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>
stefan11111 added a commit to stefan11111/xserver that referenced this pull request Apr 17, 2026
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>
stefan11111 added a commit to stefan11111/xserver that referenced this pull request Apr 17, 2026
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>
stefan11111 added a commit to stefan11111/xserver that referenced this pull request Apr 17, 2026
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>
stefan11111 added a commit to stefan11111/xserver that referenced this pull request Apr 17, 2026
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