glsl: Use nir_builder_at

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883>
This commit is contained in:
Konstantin Seurer
2023-06-27 12:56:44 +02:00
committed by Marge Bot
parent 5c8c2ec85c
commit c1b472c834
2 changed files with 2 additions and 4 deletions

View File

@@ -155,8 +155,7 @@ gl_nir_lower_xfb_varying(nir_shader *shader, const char *old_var_name,
{
nir_function_impl *impl = nir_shader_get_entrypoint(shader);
nir_builder b = nir_builder_create(impl);
b.cursor = nir_before_block(nir_start_block(impl));
nir_builder b = nir_builder_at(nir_before_block(nir_start_block(impl)));
nir_deref_instr *deref = NULL;
const struct glsl_type *type = NULL;

View File

@@ -805,8 +805,7 @@ nir_visitor::visit(ir_function_signature *ir)
this->is_global = false;
b = nir_builder_create(impl);
b.cursor = nir_after_cf_list(&impl->body);
b = nir_builder_at(nir_after_cf_list(&impl->body));
unsigned i = (ir->return_type != glsl_type::void_type) ? 1 : 0;