Re: [Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Connor Abbott
So, I was sort of imagining that we'd want to go a little farther with this, and make nir_instr_insert_before/after_* a wrapper around a cursor based API just called "nir_instr_insert". Then nir_builder_instr_insert() would become even simpler, since it would just call nir_instr_insert() and then p

Re: [Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Kenneth Graunke
On Thursday, August 06, 2015 10:15:24 AM Kenneth Graunke wrote: > -static inline void > -nir_builder_insert_after_instr(nir_builder *build, nir_instr *after_instr) > +nir_builder_instr_insert(nir_builder *build, nir_instr *instr) > { > - build->cf_node_list = NULL; > - build->before_instr = NU

Re: [Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Eric Anholt
Kenneth Graunke writes: > The NIR cursor API is exactly what we want for the builder's insertion > point. This simplifies the API, the implementation, and is actually > more flexible as well. > > This required a bit of reworking of TGSI->NIR's if/loop stack handling; > we now store cursors inste

[Mesa-dev] [PATCH 3/3] nir: Convert the builder to use the new NIR cursor API.

2015-08-06 Thread Kenneth Graunke
The NIR cursor API is exactly what we want for the builder's insertion point. This simplifies the API, the implementation, and is actually more flexible as well. This required a bit of reworking of TGSI->NIR's if/loop stack handling; we now store cursors instead of cf_node_lists, for better or wo