On Fri, Mar 25, 2016 at 7:12 PM, Jason Ekstrand <[email protected]> wrote: >
Reviewed-by: Rob Clark <[email protected]> > --- > src/compiler/nir/nir.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h > index 45f208a..03c1f76 100644 > --- a/src/compiler/nir/nir.h > +++ b/src/compiler/nir/nir.h > @@ -1936,6 +1936,17 @@ typedef struct { > }; > } nir_cursor; > > +static inline nir_block * > +nir_cursor_current_block(nir_cursor cursor) > +{ > + if (cursor.option == nir_cursor_before_instr || > + cursor.option == nir_cursor_after_instr) { > + return cursor.instr->block; > + } else { > + return cursor.block; > + } > +} > + > bool nir_cursors_equal(nir_cursor a, nir_cursor b); > > static inline nir_cursor > -- > 2.5.0.400.gff86faf > > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
