summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2018-03-19 13:41:45 +0200
committerTapani Pälli <tapani.palli@intel.com>2018-04-24 14:55:18 +0300
commitc2e159d050817991c4fb5d771586e206fbaa5b45 (patch)
tree88635c565f9068ada78f4c89fa02aa95a3321758
parentfa4d4d97f3c968f3c8dce728c12f9e8597c93530 (diff)
i965: expose MESA_FORMAT_R8G8B8A8_SRGB visual
Exposing the visual makes following dEQP tests pass on Android: dEQP-EGL.functional.wide_color.window_8888_colorspace_srgb dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_srgb Visual is exposed only when DRI_LOADER_CAP_RGBA_ORDERING is set. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 7f3c82fab8d..409f763b640 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1262,12 +1262,14 @@ intel_query_dma_buf_formats(__DRIscreen *screen, int max,
int i, j = 0;
if (max == 0) {
- *count = ARRAY_SIZE(intel_image_formats) - 1; /* not SARGB */
+ /* Note, sRGB formats not included. */
+ *count = ARRAY_SIZE(intel_image_formats) - 2;
return true;
}
for (i = 0; i < (ARRAY_SIZE(intel_image_formats)) && j < max; i++) {
- if (intel_image_formats[i].fourcc == __DRI_IMAGE_FOURCC_SARGB8888)
+ if (intel_image_formats[i].fourcc == __DRI_IMAGE_FOURCC_SARGB8888 ||
+ intel_image_formats[i].fourcc == __DRI_IMAGE_FOURCC_SABGR8888)
continue;
formats[j++] = intel_image_formats[i].fourcc;
}
@@ -2085,6 +2087,8 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
/* Required by Android, for HAL_PIXEL_FORMAT_RGBX_8888. */
MESA_FORMAT_R8G8B8X8_UNORM,
+
+ MESA_FORMAT_R8G8B8A8_SRGB,
};
/* GLX_SWAP_COPY_OML is not supported due to page flipping. */
@@ -2104,7 +2108,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
if (intel_loader_get_cap(dri_screen, DRI_LOADER_CAP_RGBA_ORDERING))
num_formats = ARRAY_SIZE(formats);
else
- num_formats = ARRAY_SIZE(formats) - 2; /* all - RGBA_ORDERING formats */
+ num_formats = ARRAY_SIZE(formats) - 3; /* all - RGBA_ORDERING formats */
/* Shall we expose 10 bpc formats? */
bool allow_rgb10_configs = driQueryOptionb(&screen->optionCache,