aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/frontends/dri
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2020-05-29 13:47:00 +0200
committerMarge Bot <[email protected]>2020-05-30 02:49:54 +0000
commit7e4c8949c6f79090b7d8675b488c7bdc90477e26 (patch)
treee9fb9fa7bc9052a8399f3dad335dc2a4cc531f43 /src/gallium/frontends/dri
parent13735c4f476f997966baa8a1f4c071867d78b401 (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5253>
Diffstat (limited to 'src/gallium/frontends/dri')
-rw-r--r--src/gallium/frontends/dri/dri2.c16
-rw-r--r--src/gallium/frontends/dri/dri_screen.h1
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;