Skip to content

Draft: Add a VK_MESA_legacy_dma_buf_drm_format_modifier_query extension #2505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gfxstrand
Copy link
Contributor

@gfxstrand gfxstrand commented Mar 6, 2025

This extension provides a way to query a legacy Linux dma-buf for its embedded modifier. This is needed by emulation layers which implement OpenGL on top of Vulkan and need to interact with legacy window-system components as the X server. This extension is not intended for general-purpose use and modifiers should be passed explicitly between applications or components whenever possible.

@gfxstrand gfxstrand force-pushed the VK_MESA_legacy_dma_buf_drm_format_modifier_query branch from becceed to 32ea34b Compare March 6, 2025 19:42
@gfxstrand gfxstrand changed the title Add a VK_MESA_legacy_dma_buf_drm_format_modifier_query extension Draft: Add a VK_MESA_legacy_dma_buf_drm_format_modifier_query extension Mar 6, 2025
@gfxstrand
Copy link
Contributor Author

Both sides of the Mesa implementation are here: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33932

@cubanismo
Copy link

There's an internal MR with an alternative solution for this. We should probably reconcile the two rather than have two separate solutions.

@gfxstrand
Copy link
Contributor Author

There's an internal MR with an alternative solution for this. We should probably reconcile the two rather than have two separate solutions.

A quick search isn't finding it. Can you throw me a # or tag me on the internal one?

@gfxstrand
Copy link
Contributor Author

I looked it up. That's a very different extension for solving a very different problem. Mechanically, the implementation of the two may end up being similar on some implementations but they're not the same at all. This extension exists to solve a problem you really only hit if you're either using Vulkan to write an X11 compositor or are somehow inside the X server itself (such as when Zink is used by the modesetting driver) and need to composite buffers coming from Mesa GL drivers.

@orowith2os
Copy link

are somehow inside the X server itself (such as when Zink is used by the modesetting driver) and need to composite buffers coming from Mesa GL drivers.

This is the case inside of Flatpak, where you may be using nouveau GL or a CPU renderer, or perhaps some other GL driver (in the case of a multi-gpu system).

Systems with several GPUs/drivers, especially mixed with containers, are funky :)

rannlangel

This comment was marked as outdated.

rannlangel

This comment was marked as outdated.

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.

4 participants