Skip to content

(release/25.0) glamor/glamor_egl: Add a fallback path to glamor_gbm_bo_from_pixmap_internal - #4010

Open
metux wants to merge 1 commit into
release/25.0from
pr/release/25.0-glamor-glamor-egl-add-a-fallback-path-to-glamor-gbm-bo-from-pixmap-internal-_2026-10-16_20-10-18
Open

metux wants to merge 1 commit into
release/25.0from
pr/release/25.0-glamor-glamor-egl-add-a-fallback-path-to-glamor-gbm-bo-from-pixmap-internal-_2026-10-16_20-10-18

Conversation

@metux

@metux metux commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

nvidia's gbm backend has issues dealing with importing a gbm bo directly from an EGLImage

This exports the image as dmabufs and imports a bo from dmabufs

This is needed for DRI3 export on nvidia

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14047

v2: Don't pass usage flags

Reviewed-by: James Jones jajones@nvidia.com
Signed-off-by: stefan11111 stefan11111github@gmail.com
Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2321
(cherry picked from commit b522485)

…internal`

nvidia's gbm backend has issues dealing with importing a gbm bo directly from an EGLImage

This exports the image as dmabufs and imports a bo from dmabufs

This is needed for DRI3 export on nvidia

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14047

v2: Don't pass usage flags

Reviewed-by: James Jones <jajones@nvidia.com>
Signed-off-by: stefan11111 <stefan11111github@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2321>
(cherry picked from commit b522485)
@metux metux self-assigned this Oct 16, 2026
@metux
metux requested a review from a team October 16, 2026 18:11
metux pushed a commit that referenced this pull request Oct 16, 2026
…rom_pixmap_internal`

nvidia's gbm backend has issues dealing with importing a gbm bo directly from an EGLImage

This exports the image as dmabufs and imports a bo from dmabufs

This is needed for DRI3 export on nvidia

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14047

v2: Don't pass usage flags

Reviewed-by: James Jones <jajones@nvidia.com>
Signed-off-by: stefan11111 <stefan11111github@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2321>
(cherry picked from commit b522485)
PR: #4010
@metux

metux commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated review — generated by Starfleet ship Enterprise (model: cruiser) on behalf of @metux. Not a human review.

🤖 Automated review — generated by Starfleet ship Enterprise on behalf of @metux. Not a human review.

Summary: Adds an EGL_MESA_image_dma_buf_export fallback path in glamor_gbm_bo_from_pixmap_internal() (glamor_egl.c). When the primary gbm_bo_import(EGL_IMAGE) fails OR the driver lacks image_dma_buf_export support, the code now attempts an alternative DMA-buf import path. Adds has_image_dma_buf_export capability flag and modifier data handling.

Assessment:

  • Backport-worthiness: Advisory. This is a feature/fallback addition for EGL/DMABUF import, not a clear crash/DoS/security fix. It may improve compatibility with certain drivers but is not release-critical.
  • Driver-ABI impact: No - changes are in glamor_egl.c EGL/GBM interaction code. No driver-visible struct layout or _X_EXPORT symbol changes.
  • Correctness: The fallback is gated by has_image_dma_buf_export and only triggers when the primary path fails or capability is absent. Structurally sound.

Label: bot-review-passed

@metux metux added the bot-review-passed Automated bot review found no blocking issues label Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-passed Automated bot review found no blocking issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants