spirv: 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:57:47 +02:00
committed by Marge Bot
parent 574079e354
commit be45d4fa6e
2 changed files with 3 additions and 6 deletions

View File

@@ -6629,8 +6629,7 @@ vtn_emit_kernel_entry_point_wrapper(struct vtn_builder *b,
nir_function *main_entry_point = nir_function_create(b->shader, func_name);
nir_function_impl *impl = nir_function_impl_create(main_entry_point);
b->nb = nir_builder_create(impl);
b->nb.cursor = nir_after_cf_list(&impl->body);
b->nb = nir_builder_at(nir_after_cf_list(&impl->body));
b->func_param_idx = 0;
nir_call_instr *call = nir_call_instr_create(b->nb.shader, entry_point);

View File

@@ -225,8 +225,7 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode,
* directly in our OpFunctionParameter handler.
*/
nir_function_impl *impl = nir_function_impl_create(func);
b->nb = nir_builder_create(impl);
b->nb.cursor = nir_before_cf_list(&impl->body);
b->nb = nir_builder_at(nir_before_cf_list(&impl->body));
b->nb.exact = b->exact;
b->func_param_idx = 0;
@@ -627,9 +626,8 @@ vtn_function_emit(struct vtn_builder *b, struct vtn_function *func,
}
nir_function_impl *impl = func->nir_func->impl;
b->nb = nir_builder_create(impl);
b->nb = nir_builder_at(nir_after_cf_list(&impl->body));
b->func = func;
b->nb.cursor = nir_after_cf_list(&impl->body);
b->nb.exact = b->exact;
b->phi_table = _mesa_pointer_hash_table_create(b);