summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-12 13:55:56 -0700
committerIan Romanick <[email protected]>2012-10-29 09:55:53 -0700
commit749ac8b73adaa39a0bad16b821f273d9bc901253 (patch)
tree84f9128f989a8f0358c03dc7102133e5339d4d8a /src/mesa
parent1f6e10f67b0fce811eb91abfbdb3e9c6ed0035a3 (diff)
intel: If the visual is sRGB, use an sRGB internal format
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c2
1 files changed, 2 insertions, 0 deletions
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