<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Samuel Iglesias Gonsalvez <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>><br>
<br>
Signed-off-by: Samuel Iglesias Gonsalvez <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>><br>
---<br>
src/mesa/main/format_pack.c.mako | 4 +++-<br>
1 file changed, 3 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/main/format_pack.c.mako b/src/mesa/main/format_pack.c.mako<br>
index 7feb3f8..6815bf3 100644<br>
--- a/src/mesa/main/format_pack.c.mako<br>
+++ b/src/mesa/main/format_pack.c.mako<br>
@@ -83,7 +83,9 @@ pack_ubyte_${f.short_name()}(const GLubyte src[4], void *dst)<br>
%endif<br>
<br>
${c.datatype()} ${<a href="http://c.name" target="_blank">c.name</a>} =<br>
- %if c.type == parser.UNSIGNED:<br>
+ %if not f.is_normalized() and f.is_int():<br>
+ (${c.datatype()}) src[${i}];<br></blockquote><div><br></div><div>Clamping<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ %elif c.type == parser.UNSIGNED:<br>
%if f.colorspace == 'srgb' and <a href="http://c.name" target="_blank">c.name</a> in 'rgb':<br>
util_format_linear_to_srgb_8unorm(src[${i}]);<br>
%else:<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.1<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>
</font></span></blockquote></div><br></div></div>