intel: If the visual is sRGB, use an sRGB internal format
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 12 Jul 2012 20:55:56 +0000 (13:55 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 29 Oct 2012 16:55:53 +0000 (09:55 -0700)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/intel/intel_screen.c

index 01126490a960053b821e03639b3d70b4d52d0600..f4ed64cc363ea53e9ce1f5c0bbeffeebdd7c2dbc 100644 (file)
@@ -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