[Mesa-dev] [PATCH V2 kmscube] cube-tex: make use of modifiers

Daniel Stone daniel at fooishbar.org
Mon Apr 2 12:55:36 UTC 2018


Hi Christian,

On 2 April 2018 at 12:49, Christian Gmeiner <christian.gmeiner at gmail.com> wrote:
> Fixes rendering issues with mode rgba on etnaviv. I have applied
> the same change for nv12 variants but they are not supported on
> etnaviv.
>
> [...]
>
> +       EGLint attr[] = {
>                 EGL_WIDTH, texw,
>                 EGL_HEIGHT, texh,
>                 EGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_ABGR8888,
>                 EGL_DMA_BUF_PLANE0_FD_EXT, fd,
>                 EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0,
>                 EGL_DMA_BUF_PLANE0_PITCH_EXT, stride,
> +               EGL_NONE, EGL_NONE,     /* modifier lo */
> +               EGL_NONE, EGL_NONE,     /* modifier hi */
>                 EGL_NONE
>         };
> +
> +       if (egl->modifiers_supported) {
> +               unsigned size =  ARRAY_SIZE(attr);
> +               attr[size - 5] = EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT;
> +               attr[size - 4] = modifier & 0xFFFFFFFF;
> +               attr[size - 3] = EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT;
> +               attr[size - 2] = modifier >> 32;
> +       }

All these checks should be 'if (egl->modifiers_supported && modifier
!= DRM_FORMAT_MOD_INVALID)'.

With that fixed, and I suppose with the same weak-symbol handling as
the others, this is:
Reviewed-by: Daniel Stone <daniels at collabora.com>

Cheers,
Daniel


More information about the mesa-dev mailing list