From 749ac8b73adaa39a0bad16b821f273d9bc901253 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 12 Jul 2012 13:55:56 -0700 Subject: [PATCH] intel: If the visual is sRGB, use an sRGB internal format Signed-off-by: Ian Romanick Reviewed-by: Eric Anholt Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/intel/intel_screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 01126490a96..f4ed64cc363 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -670,6 +670,8 @@ intelCreateBuffer(__DRIscreen * driScrnPriv, if (mesaVis->redBits == 5) rgbFormat = MESA_FORMAT_RGB565; + else if (mesaVis->sRGBCapable) + rgbFormat = MESA_FORMAT_SARGB8; else if (mesaVis->alphaBits == 0) rgbFormat = MESA_FORMAT_XRGB8888; else -- 2.30.2