Mesa (master): intel: If the visual is sRGB, use an sRGB internal format

Ian Romanick idr at kemper.freedesktop.org
Mon Oct 29 16:59:02 UTC 2012


Module: Mesa
Branch: master
Commit: 749ac8b73adaa39a0bad16b821f273d9bc901253
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=749ac8b73adaa39a0bad16b821f273d9bc901253

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Jul 12 13:55:56 2012 -0700

intel: If the visual is sRGB, use an sRGB internal format

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/intel/intel_screen.c |    2 ++
 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 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




More information about the mesa-commit mailing list