summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2014-09-17 11:56:47 +1000
committerDave Airlie <[email protected]>2014-09-17 13:28:18 +1000
commit9ea045e85eee506d919b880e4d8d7428faaea6a1 (patch)
treecafa7676ef16c73912ed2832f09c94b1d594de7d /src/mesa
parentecc48f83c8359e3ef64ea40dfb6074f4a1a38dc1 (diff)
mesa: fix SRGB alpha channel value in pack_float_R8G8B8X8_SRGB
Jason pointed out the bug on review adding new formats, but the existing format also appears to have the bug, so use 255 as the max, these are SRGB no SNORM. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/format_pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c
index 6cbf8593bca..6bf174a81f7 100644
--- a/src/mesa/main/format_pack.c
+++ b/src/mesa/main/format_pack.c
@@ -1713,7 +1713,7 @@ pack_float_R8G8B8X8_SRGB(const GLfloat src[4], void *dst)
GLubyte r = util_format_linear_float_to_srgb_8unorm(src[RCOMP]);
GLubyte g = util_format_linear_float_to_srgb_8unorm(src[GCOMP]);
GLubyte b = util_format_linear_float_to_srgb_8unorm(src[BCOMP]);
- *d = PACK_COLOR_8888(127, b, g, r);
+ *d = PACK_COLOR_8888(255, b, g, r);
}