gl-renderer: Don't use TEXTURE_EXTERNAL for multi-planar formats

There's just no good reason to do this.

The query entrypoints already tell us if we need to use
GL_TEXTURE_EXTERNAL_OES for a particular format/modifier. We also have
RGB -> YUV fallbacks which should be able to work well with TEXTURE_2D.

TEXTURE_EXTERNAL pessimises quite hard, forcing GPU-side reloads as well
as bad filtering. Allowing multi-planar formats to use TEXTURE_2D should
thus result in performance and quality improvements.

Signed-off-by: Daniel Stone <daniels@collabora.com>
dev
Daniel Stone 3 years ago committed by Pekka Paalanen
parent 67fc71214d
commit f36d77a199
  1. 3
      libweston/renderer-gl/gl-renderer.c

@ -2530,9 +2530,6 @@ choose_texture_target(struct gl_renderer *gr,
} }
} }
if (attributes->n_planes > 1)
return GL_TEXTURE_EXTERNAL_OES;
switch (attributes->format & ~DRM_FORMAT_BIG_ENDIAN) { switch (attributes->format & ~DRM_FORMAT_BIG_ENDIAN) {
case DRM_FORMAT_YUYV: case DRM_FORMAT_YUYV:
case DRM_FORMAT_YVYU: case DRM_FORMAT_YVYU:

Loading…
Cancel
Save