Mesa (master): gallium/dri: Remove lowered_yuv tracking for plane mapping.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat May 30 03:02:39 UTC 2020
Module: Mesa
Branch: master
Commit: 7e4c8949c6f79090b7d8675b488c7bdc90477e26
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e4c8949c6f79090b7d8675b488c7bdc90477e26
Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date: Fri May 29 13:47:00 2020 +0200
gallium/dri: Remove lowered_yuv tracking for plane mapping.
Just heard that etnaviv is also compatible with it even
in the non-lowered cases, so let us enable it for everyone.
Reviewed-by: Lucas Stach <l.stach at pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5253>
---
src/gallium/frontends/dri/dri2.c | 16 +++++-----------
src/gallium/frontends/dri/dri_screen.h | 1 -
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c
index 9facc47d1da..fbc9f1115ad 100644
--- a/src/gallium/frontends/dri/dri2.c
+++ b/src/gallium/frontends/dri/dri2.c
@@ -801,7 +801,6 @@ dri2_create_image_from_winsys(__DRIscreen *_screen,
img->layer = 0;
img->use = 0;
img->loader_private = loaderPrivate;
- img->lowered_yuv = use_lowered;
return img;
}
@@ -1011,7 +1010,6 @@ dri2_create_image_common(__DRIscreen *_screen,
img->dri_fourcc = map->dri_fourcc;
img->dri_components = 0;
img->use = use;
- img->lowered_yuv = false;
img->loader_private = loaderPrivate;
return img;
@@ -1262,7 +1260,6 @@ dri2_dup_image(__DRIimage *image, void *loaderPrivate)
/* This should be 0 for sub images, but dup is also used for base images. */
img->dri_components = image->dri_components;
img->loader_private = loaderPrivate;
- img->lowered_yuv = image->lowered_yuv;
return img;
}
@@ -1552,16 +1549,13 @@ dri2_map_image(__DRIcontext *context, __DRIimage *image,
if (!image || !data || *data)
return NULL;
- if (image->lowered_yuv) {
- unsigned plane = image->plane;
- if (plane >= dri2_get_mapping_by_format(image->dri_format)->nplanes)
- return NULL;
-
- while (plane--)
- resource = resource->next;
- } else if (dri2_get_mapping_by_format(image->dri_format)->nplanes > 1)
+ unsigned plane = image->plane;
+ if (plane >= dri2_get_mapping_by_format(image->dri_format)->nplanes)
return NULL;
+ while (plane--)
+ resource = resource->next;
+
if (flags & __DRI_IMAGE_TRANSFER_READ)
pipe_access |= PIPE_TRANSFER_READ;
if (flags & __DRI_IMAGE_TRANSFER_WRITE)
diff --git a/src/gallium/frontends/dri/dri_screen.h b/src/gallium/frontends/dri/dri_screen.h
index d6f7850a264..e330aa1f2ac 100644
--- a/src/gallium/frontends/dri/dri_screen.h
+++ b/src/gallium/frontends/dri/dri_screen.h
@@ -106,7 +106,6 @@ struct __DRIimageRec {
uint32_t dri_components;
unsigned use;
unsigned plane;
- bool lowered_yuv;
void *loader_private;
More information about the mesa-commit
mailing list