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>
This commit is contained in:
parent
67fc71214d
commit
f36d77a199
|
@ -2522,7 +2522,7 @@ choose_texture_target(struct gl_renderer *gr,
|
|||
|
||||
for (i = 0; i < format->num_modifiers; ++i) {
|
||||
if (format->modifiers[i] == attributes->modifier[0]) {
|
||||
if(format->external_only[i])
|
||||
if (format->external_only[i])
|
||||
return GL_TEXTURE_EXTERNAL_OES;
|
||||
else
|
||||
return GL_TEXTURE_2D;
|
||||
|
@ -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) {
|
||||
case DRM_FORMAT_YUYV:
|
||||
case DRM_FORMAT_YVYU:
|
||||
|
|
Loading…
Reference in New Issue