[Mesa-dev] [PATCH 8/8] dri: Support MESA_FORMAT_SARGB8 in driCreateConfigs
Ian Romanick
idr at freedesktop.org
Wed Oct 24 10:08:47 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/common/utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 92bad55..3e99f3d 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -222,6 +222,7 @@ driCreateConfigs(gl_format format,
masks = masks_table[1];
break;
case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_SARGB8:
masks = masks_table[2];
break;
default:
@@ -235,7 +236,7 @@ driCreateConfigs(gl_format format,
green_bits = _mesa_get_format_bits(format, GL_GREEN_BITS);
blue_bits = _mesa_get_format_bits(format, GL_BLUE_BITS);
alpha_bits = _mesa_get_format_bits(format, GL_ALPHA_BITS);
- is_srgb = false;
+ is_srgb = _mesa_get_format_color_encoding(format) == GL_SRGB;
num_modes = num_depth_stencil_bits * num_db_modes * num_accum_bits * num_msaa_modes;
configs = calloc(1, (num_modes + 1) * sizeof *configs);
--
1.7.11.4
More information about the mesa-dev
mailing list