mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 09:20:23 +01:00
st/dri: enable 32-bit RGBX/RGBA formats only on Android
X/GLX can't handle them. This removes almost 500 GLX visuals that were
incorrectly exposed.
This is a less invasive version of Marek's .getCapability series.
Note: the patch is not applicable for master, but only for the 17.2
branch.
Suggested-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
CC: <mesa-stable@lists.freedesktop.org>
Fixes: f33d8af7aa "st/dri: add 32-bit RGBX/RGBA formats"
[Emil Velikov: commit message polish]
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
f4e163094d
commit
0b2c034f64
1 changed files with 12 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue