Skip to content

opengl/formats: query EGL formats before modifiers

Link Mauve requested to merge linkmauve/libplacebo:fix-egl-dmabuf into master

EGL_EXT_image_dma_buf_import_modifiers defines two functions, one to query the supported formats and one to query each format’s modifiers.

This patch removes the spurious EGL_BAD_PARAMETER that were displayed when running the opengl_surfaceless test on Mesa (tested on Lima and Iris), by only querying modifiers for formats we know are supported.

Also noteworthy is that out of the tested formats, only R8 and R16 are supported on Iris, only R8 on Lima. On both tested drivers, RG88 isn’t supported (GR88 is though), neither is RA24 (rgba8, but AR24/argb8 is) nor RG24 (rgb8). It might make sense to change our component ordering preferences in order to support Mesa drivers better.

Merge request reports