On Mon, Mar 7, 2016 at 12:46 AM, Samuel Iglesias Gonsálvez < sigles...@igalia.com> wrote:
> From: Connor Abbott <connor.w.abb...@intel.com> > > --- > src/compiler/nir/nir.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h > index d2fd23d..39aad02 100644 > --- a/src/compiler/nir/nir.h > +++ b/src/compiler/nir/nir.h > @@ -557,6 +557,15 @@ nir_dest_for_reg(nir_register *reg) > return dest; > } > > +static inline unsigned > +nir_src_bit_size(nir_src src) > +{ > + if (src.is_ssa) > + return src.ssa->bit_size; > + > + return src.reg.reg->bit_size; > +} > Please use either an else or a ternary (preferably a ternary). Having an if and a fallthrough is a very strange way to implement this. > + > void nir_src_copy(nir_src *dest, const nir_src *src, void *instr_or_if); > void nir_dest_copy(nir_dest *dest, const nir_dest *src, nir_instr *instr); > > -- > 2.7.0 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev