microsoft: Use nir_builder_at

Acked-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 13:03:05 +02:00 committed by Marge Bot
parent 8b606d5347
commit 12a268ea81
3 changed files with 3 additions and 6 deletions

View file

@ -590,8 +590,7 @@ d3d12_add_missing_dual_src_target(struct nir_shader *s,
assert(missing_mask != 0);
nir_builder b;
nir_function_impl *impl = nir_shader_get_entrypoint(s);
b = nir_builder_create(impl);
b.cursor = nir_before_cf_list(&impl->body);
b = nir_builder_at(nir_before_cf_list(&impl->body));
nir_ssa_def *zero = nir_imm_zero(&b, 4, 32);
for (unsigned i = 0; i < 2; ++i) {

View file

@ -231,8 +231,7 @@ clc_lower_printf_base(nir_shader *nir, unsigned uav_id)
nir_variable *printf_var = NULL;
nir_ssa_def *printf_deref = NULL;
nir_foreach_function(func, nir) {
nir_builder b = nir_builder_create(func->impl);
b.cursor = nir_before_instr(nir_block_first_instr(nir_start_block(func->impl)));
nir_builder b = nir_builder_at(nir_before_instr(nir_block_first_instr(nir_start_block(func->impl))));
bool progress = false;
nir_foreach_block(block, func->impl) {

View file

@ -895,8 +895,7 @@ lower_view_index_to_rt_layer(nir_shader *nir)
nir_metadata_loop_analysis, var);
} else {
nir_function_impl *func = nir_shader_get_entrypoint(nir);
nir_builder b = nir_builder_create(func);
b.cursor = nir_after_block(nir_impl_last_block(func));
nir_builder b = nir_builder_at(nir_after_block(nir_impl_last_block(func)));
add_layer_write(&b, NULL, var);
}
}