<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 19, 2014 at 11:24 PM, Iago Toral <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">Hi Jason,<br>
<br>
we discussed this some weeks ago actually, the detailed explanation is<br>
here:<br>
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=84566#c5" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=84566#c5</a><br>
<br>
the short answer is that this is necessary because there is a normalized<br>
parameter to _mesa_swizzle_and_convert, and when we deal with float<br>
types we want to set this to true.<br></blockquote><div><br></div><div>I went back and looked at that and I thought the result of the discussion was to fix the assert in mesa_format_convert and compute the normalized parameter correctly. After that, I thought this shouldn't be strictly needed. It may still be a good idea for consistency, but I want to make sure we're doing the right thing in mesa_format_convert<br></div><div>--Jason<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">
Iago<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, 2014-11-19 at 11:31 -0800, Jason Ekstrand wrote:<br>
> I'm not sure what I think about this. Does it make a functional<br>
> change other than consistancy?<br>
><br>
> --Jason<br>
><br>
><br>
> On Tue, Nov 18, 2014 at 1:23 AM, Iago Toral Quiroga<br>
> <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br>
> In order to check if a format is normalized Mesa does<br>
> something like this:<br>
> normalized = !_mesa_is_enum_format_integer(srcFormat);<br>
><br>
> So all float types will set normalized to true. Since our<br>
> mesa_array_format<br>
> includes a normalized flag for each type we want to make it<br>
> 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<br>
> 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,<br>
> 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<br>
> 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>
> --<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>
><br>
><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>