[Mesa-dev] [PATCH 09/11] nir/lower_vec_to_movs: Get rid of start_idx and swizzle compacting
Eric Anholt
eric at anholt.net
Fri Sep 11 08:58:38 PDT 2015
Jason Ekstrand <jason at jlekstrand.net> writes:
> Previously, we did this thing with keeping track of a separate start_idx
> which was different from the iteration variable. I think this was a relic
> of the way that GLSL IR implements writemasks. In NIR, if a given bit in
> the writemask is unset then that channel is just "unused", not missing. In
> particular, a vec4 operation with a writemask of 0xd will use sources 0, 2,
> and 3 and leave source 1 alone. We can simplify things a good deal (and
> make them correct) by removing this "compacting" step.
Reviewed-by: Eric Anholt <eric at anholt.net>
Unrelated: looks like the instances of '4' should be
'nir_op_infos[vec->op].num_inputs' in the loops, though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150911/acf76072/attachment.sig>
More information about the mesa-dev
mailing list