Skip to content
  • Sjoerd Simons's avatar
    gl/egl: Determine correct format on dmabuf import · 99ac4e66
    Sjoerd Simons authored and Nicolas Dufresne's avatar Nicolas Dufresne committed
    When importing an egl image from dmabuf gst_gl_format_from_video_info
    was used to work what the result GL format will be. Unfortunately that
    will only work if the conventional format and the choosen DRM fourcc for
    the format match up.
    
    On etnaviv platforms there is no support for GL_EXT_texture_rg, so the
    GL format chosen for YUY2 ends up being GST_GL_LUMINANCE_ALPHA. However
    DRM does not do luminance + alpha as it's a legacy GL thing, so the
    dmabuf import ends up using DRM_FORMAT_GR88.
    
    To fix this, tie the DRM_FORMAT and the GL format together so they
    always match up.
    99ac4e66