<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>></p>
<div class="gmail_quote">On Sep 16, 2014 6:57 PM, "Dave Airlie" <<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
<br>
Jason pointed out the bug on review adding new formats,<br>
but the existing format also appears to have the bug, so<br>
use 255 as the max, these are SRGB no SNORM.<br>
<br>
Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
---<br>
 src/mesa/main/format_pack.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c<br>
index 6cbf859..6bf174a 100644<br>
--- a/src/mesa/main/format_pack.c<br>
+++ b/src/mesa/main/format_pack.c<br>
@@ -1713,7 +1713,7 @@ pack_float_R8G8B8X8_SRGB(const GLfloat src[4], void *dst)<br>
    GLubyte r = util_format_linear_float_to_srgb_8unorm(src[RCOMP]);<br>
    GLubyte g = util_format_linear_float_to_srgb_8unorm(src[GCOMP]);<br>
    GLubyte b = util_format_linear_float_to_srgb_8unorm(src[BCOMP]);<br>
-   *d = PACK_COLOR_8888(127, b, g, r);<br>
+   *d = PACK_COLOR_8888(255, b, g, r);<br>
 }<br>
<br>
<br>
--<br>
1.9.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>