[Mesa-dev] [RFC] EGL extension for additional DRM_BUFFER_FORMATs

Daniel Stone daniel at fooishbar.org
Tue Feb 7 09:50:39 UTC 2017


Hi Nicolai,

On 7 February 2017 at 09:07, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> On 06.02.2017 20:57, Dave Airlie wrote:
>> I just saw this, EGL_MESA_drm_image is really not a good place to start,
>>
>> we have two specs instead,
>> EGL_EXT_image_dma_buf_import.
>> EGL_MESA_image_dma_buf_export
>>
>> does one of those not cover this?
>
> Sometimes you just have to push things to flush out the comments :)
>
> Glamor uses EGL_MESA_drm_image here:
> https://cgit.freedesktop.org/xorg/xserver/tree/glamor/glamor_egl.c?id=f4a41155479e68bf55740c1dfffafc78e4c02087#n112
>
> This code path is used for allocating the main framebuffer, i.e. without
> this extension 16-bit or 30-bit (10bpc) modes do not work.
>
> We do have to actually _create_ an image of the correct format with the
> scanout flag somewhere. Importing and exporting alone doesn't solve that
> problem.

Given that exporting doesn't seem to be used at all in Glamor, and it
only uses GEM name -> EGLImage importing, this could in fact just be
replaced with EGL_EXT_image_dma_buf_import. That also has the
advantage of EGL_EXT_image_dma_buf_import_modifiers support, so you
can both import buffers with modifiers, as well as query the
implementation for which formats/modifiers it supports.

Cheers,
Daniel


More information about the mesa-dev mailing list