[Mesa-dev] [PATCH 7/8] intel: If the visual is sRGB, use an sRGB internal format
Ian Romanick
idr at freedesktop.org
Wed Oct 24 10:08:46 PDT 2012
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
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 0112649..f4ed64c 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
--
1.7.11.4
More information about the mesa-dev
mailing list