[Mesa-stable] [PATCH] st/dri: enable 32-bit RGBX/RGBA formats only on Android
Tomasz Figa
tfiga at chromium.org
Sat Jul 29 15:02:46 UTC 2017
X/GLX can't handle them. This removes almost 500 GLX visuals that were
incorrectly exposed.
This replaces the revert originally requested by Marek and has the
benefit of keeping Android running, while eliminating the risk of
breaking X/GLX, until we provide a proper solution to deal with these
formats.
Suggested-by: Marek Olšák <marek.olsak at amd.com>
Signed-off-by: Tomasz Figa <tfiga at chromium.org>
CC: <mesa-stable at lists.freedesktop.org>
Fixes: f33d8af7aa354d "st/dri: add 32-bit RGBX/RGBA formats"
---
src/gallium/state_trackers/dri/dri_screen.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index 1dd7bd3ec1..d1d7aa4840 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -133,6 +133,11 @@ dri_fill_in_modes(struct dri_screen *screen)
MESA_FORMAT_B8G8R8A8_SRGB,
MESA_FORMAT_B8G8R8X8_SRGB,
MESA_FORMAT_B5G6R5_UNORM,
+#ifdef ANDROID
+ /*
+ * To reduce the risk of breaking non-Android users in stable release
+ * let's keep these for Android alone until this is handled properly.
+ */
/* The 32-bit RGBA format must not precede the 32-bit BGRA format.
* Likewise for RGBX and BGRX. Otherwise, the GLX client and the GLX
@@ -154,6 +159,7 @@ dri_fill_in_modes(struct dri_screen *screen)
/* Required by Android, for HAL_PIXEL_FORMAT_RGBX_8888. */
MESA_FORMAT_R8G8B8X8_UNORM,
+#endif
};
static const enum pipe_format pipe_formats[] = {
PIPE_FORMAT_BGRA8888_UNORM,
@@ -161,8 +167,14 @@ dri_fill_in_modes(struct dri_screen *screen)
PIPE_FORMAT_BGRA8888_SRGB,
PIPE_FORMAT_BGRX8888_SRGB,
PIPE_FORMAT_B5G6R5_UNORM,
+#ifdef ANDROID
+ /*
+ * To reduce the risk of breaking non-Android users in stable release
+ * let's keep these for Android alone until this is handled properly.
+ */
PIPE_FORMAT_RGBA8888_UNORM,
PIPE_FORMAT_RGBX8888_UNORM,
+#endif
};
mesa_format format;
__DRIconfig **configs = NULL;
--
2.14.0.rc0.400.g1c36432dff-goog
More information about the mesa-stable
mailing list