From e8f2bec25ea9bbaedac7abfa7eabb62e1aaf3163 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 12 Jul 2012 14:01:23 -0700 Subject: [PATCH] dri: Support MESA_FORMAT_SARGB8 in driCreateConfigs Signed-off-by: Ian Romanick Reviewed-by: Eric Anholt Reviewed-by: Kenneth Graunke --- 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 92bad55e9e3..3e99f3d1e5c 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); -- 2.30.2