On Fri, Sep 11, 2015 at 8:58 AM, Eric Anholt <e...@anholt.net> wrote: > Jason Ekstrand <ja...@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 <e...@anholt.net> > > Unrelated: looks like the instances of '4' should be > 'nir_op_infos[vec->op].num_inputs' in the loops, though.
No, those are fine. They're for components, not number of sources. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev