From: Ian Romanick Date: Thu, 12 Jul 2012 20:55:56 +0000 (-0700) Subject: intel: If the visual is sRGB, use an sRGB internal format X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=749ac8b73adaa39a0bad16b821f273d9bc901253;p=mesa.git intel: If the visual is sRGB, use an sRGB internal format Signed-off-by: Ian Romanick Reviewed-by: Eric Anholt Reviewed-by: Kenneth Graunke --- 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