summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-07-12 14:01:23 -0700
committerIan Romanick <[email protected]>2012-10-29 09:55:56 -0700
commite8f2bec25ea9bbaedac7abfa7eabb62e1aaf3163 (patch)
treefd875f753ae376d239bbadf2fb939b1a983e01e8 /src/mesa
parent749ac8b73adaa39a0bad16b821f273d9bc901253 (diff)
dri: Support MESA_FORMAT_SARGB8 in driCreateConfigs
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/common/utils.c3
1 files changed, 2 insertions, 1 deletions
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);