[Mesa-dev] [PATCH v13 02/36] egl/main: add support for fourth plane tokens

Emil Velikov emil.l.velikov at gmail.com
Mon May 22 14:01:15 UTC 2017


On 22 May 2017 at 13:47, Daniel Stone <daniel at fooishbar.org> wrote:
> Hey,
>
> On 22 May 2017 at 13:43, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> On 19 May 2017 at 10:37, Daniel Stone <daniels at collabora.com> wrote:
>>> The EGL_EXT_dma_buf_import_modifiers extension adds support for a
>>> fourth plane, just like DRM KMS API does.
>>>
>>> Bump maximum dma_buf plane count to four.
>>
>> Patch 1 and 2 are
>> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
>> Feel free to push instead of constantly rebasing.
>>
>> Aside:
>> AFAICT the EXT_image_dma_buf_import_modifiers extension does not
>> mention much about the 4th plane fd/pitch/other properties.
>> Might want to add a small note that all they behave just like PLANE0-2
>> in EXT_image_dma_buf_import.
>
> There is this, from lines 123-135:
>     For semi-planar and planar YUV formats, or other formats which require
>     multiple memory planes, planes 1, 2 and 3 are specified by the following
>     attributes, which have the same meanings as defined above for plane 0:
>
>         * [...]
>         * EGL_DMA_BUF_PLANE3_FD_EXT
>         * EGL_DMA_BUF_PLANE3_OFFSET_EXT
>         * EGL_DMA_BUF_PLANE3_PITCH_EXT
>
I was thinking about the error conditions as seen in below hunk [from
EXT_image_dma_buf_import].
The existing "see plane 0 meaning" should imply the error handling as
well, so I think we're spot on.

Thanks for the correction!
Emil

Add to the list of error conditions for eglCreateImageKHR:

   * If <target> is EGL_LINUX_DMA_BUF_EXT, and the EGL_LINUX_DRM_FOURCC_EXT
     attribute indicates a single-plane format, EGL_BAD_ATTRIBUTE is
     generated if any of the EGL_DMA_BUF_PLANE1_* or EGL_DMA_BUF_PLANE2_*
     attributes are specified.


More information about the mesa-dev mailing list