From 0a913a9d85f2eb772be6a133965c5b8a4aa3c800 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 6 Aug 2015 07:16:07 -0700 Subject: nir: Convert the builder to use the new NIR cursor API. 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 worse. v2: Actually move the cursor in the after_instr case. v3: Take advantage of nir_instr_insert (suggested by Connor). v4: vc4 build fixes (thanks to Eric). Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt [v1] Reviewed-by: Jason Ekstrand [v4] Acked-by: Connor Abbott [v4] --- src/mesa/program/prog_to_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/program') diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c index d96b7bc8782..fccd16fc8c0 100644 --- a/src/mesa/program/prog_to_nir.c +++ b/src/mesa/program/prog_to_nir.c @@ -1108,7 +1108,7 @@ prog_to_nir(const struct gl_program *prog, c->build.shader = s; c->build.impl = impl; - nir_builder_insert_after_cf_list(&c->build, &impl->body); + c->build.cursor = nir_after_cf_list(&impl->body); setup_registers_and_variables(c); if (unlikely(c->error)) -- cgit v1.2.3