diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index 59a850b1423..6bd479074fa 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;