gl-renderer: query EGL to determine if GL_TEXTURE_EXTERNAL_OES should be used

Graphics / Wayland / Weston - Michael Olbrich [pengutronix.de] - 25 May 2020 11:06 UTC

Using the number of planes to determine if GL_TEXTURE_EXTERNAL_OES should be used is incorrect with some modifiers: For example RGBA with a I915_FORMAT_MOD_Y_TILED_CCS modifier has two planes.

Use eglQueryDmaBufModifiersEXT() to query if the current format/modifier only supports GL_TEXTURE_EXTERNAL_OES.

Use the current code as fallback of modifiers are not supported.

40c519a3 gl-renderer: query EGL to determine if GL_TEXTURE_EXTERNAL_OES should be used
libweston/renderer-gl/gl-renderer-internal.h | 1 +
libweston/renderer-gl/gl-renderer.c | 112 +++++++++++++++++++++++++--
2 files changed, 108 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share