<div dir="ltr"><div>I'm not sure what I think about this. Does it make a functional change other than consistancy?<br></div>--Jason<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 18, 2014 at 1:23 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">In order to check if a format is normalized Mesa does something like this:<br>
normalized = !_mesa_is_enum_format_integer(srcFormat);<br>
<br>
So all float types will set normalized to true. Since our mesa_array_format<br>
includes a normalized flag for each type we want to make it consistent with<br>
this.<br>
---<br>
src/mesa/main/format_info.py | 3 ++-<br>
src/mesa/main/format_utils.c | 2 +-<br>
2 files changed, 3 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/main/format_info.py b/src/mesa/main/format_info.py<br>
index 315767d..d4bc276 100644<br>
--- a/src/mesa/main/format_info.py<br>
+++ b/src/mesa/main/format_info.py<br>
@@ -220,9 +220,10 @@ for fmat in formats:<br>
print ' {{ {0} }},'.format(', '.join(map(str, fmat.swizzle)))<br>
if fmat.is_array() and fmat.colorspace in ('rgb', 'srgb'):<br>
chan = fmat.array_element()<br>
+ norm = chan.norm or chan.type == parser.FLOAT<br>
print ' {{{{ {0} }}}},'.format(', '.join([<br>
get_array_format_datatype(chan),<br>
- str(int(chan.norm)),<br>
+ str(int(norm)),<br>
str(len(fmat.channels)),<br>
str(fmat.swizzle[0]),<br>
str(fmat.swizzle[1]),<br>
diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c<br>
index c3815cb..1d65f2b 100644<br>
--- a/src/mesa/main/format_utils.c<br>
+++ b/src/mesa/main/format_utils.c<br>
@@ -30,7 +30,7 @@<br>
<br>
mesa_array_format RGBA8888_FLOAT = {{<br>
MESA_ARRAY_FORMAT_TYPE_FLOAT,<br>
- 0,<br>
+ 1,<br>
4,<br>
0, 1, 2, 3,<br>
0, 1<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>