KhronosGroup / KhronosGroup/EGL-Registry

EXT_image_dma_buf_import format enumeration

Open
#142 8 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
HTML
Stars
151
Forks
115
PR merge metrics
No merged PRs in 30d

Description

`EXT_image_dma_buf_import` allows one to import DMA-BUFs, but doesn't allow one to enumerate the list of supported formats. `EXT_image_dma_buf_import_modifiers` fixes this by adding `eglQueryDmaBufFormatsEXT`.

The ability to enumerate formats is key for proper format negotiation, e.g. in a Wayland compositor. The latest linux-dmabuf protocol version doesn't allow clients to import DMA-BUFs for formats not advertised by the compositor.

Some drivers don't support modifiers. Because format enumeration is important, Mesa will still advertise `EXT_image_dma_buf_import_modifiers` for these drivers (and return an empty list in `eglQueryDmaBufModifiersEXT`).

But none of this is documented anywhere. It would be nice to settle on a solution and add it to the EGL specs. Here are two possible proposals:

1. Document that drivers supporting `EXT_image_dma_buf_import` should also support `EXT_image_dma_buf_import_modifiers` even if they don't support modifiers.
2. Add a new `EXT_image_dma_buf_import_formats` extension, which is a subset of `EXT_image_dma_buf_import_modifiers`: it would contain only `eglQueryDmaBufFormatsEXT` but not `eglQueryDmaBufModifiersEXT`. Slightly more work, but if it makes sense to you I'm willing to send patches around.

Thoughts?

cc @cubanismo @fooishbar

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the existing EXT_image_dma_buf_import and EXT_image_dma_buf_import_modifiers specifications, then review the two proposals in this issue and the comment thread. A maintainer decision is needed before implementation can begin; done means the chosen format-enumeration behavior is settled and incorporated into the EGL specifications.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.