intel: 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:40 +02:00
committed by Marge Bot
parent ed08305549
commit 05269047d3
10 changed files with 12 additions and 29 deletions

View File

@@ -153,8 +153,7 @@ anv_mesh_convert_attrs_prim_to_vert(struct nir_shader *nir,
num_mesh_vertices_per_primitive(nir->info.mesh.primitive_type);
nir_function_impl *impl = nir_shader_get_entrypoint(nir);
nir_builder b = nir_builder_create(impl);
b.cursor = nir_after_cf_list(&impl->body);
nir_builder b = nir_builder_at(nir_after_cf_list(&impl->body));
/* wait for all subgroups to finish */
nir_scoped_barrier(&b, SCOPE_WORKGROUP);
@@ -494,8 +493,7 @@ anv_frag_convert_attrs_prim_to_vert(struct nir_shader *nir,
nir_deref_instr *new_derefs[VARYING_SLOT_MAX] = {NULL, };
nir_function_impl *impl = nir_shader_get_entrypoint(nir);
nir_builder b = nir_builder_create(impl);
b.cursor = nir_before_cf_list(&impl->body);
nir_builder b = nir_builder_at(nir_before_cf_list(&impl->body));
nir_foreach_shader_in_variable_safe(var, nir) {
gl_varying_slot location = var->data.location;

View File

@@ -204,8 +204,7 @@ anv_nir_lower_multiview(nir_shader *shader, uint32_t view_mask,
bool progress = nir_lower_multiview(shader, view_mask);
if (progress) {
nir_builder b = nir_builder_create(entrypoint);
b.cursor = nir_before_cf_list(&entrypoint->body);
nir_builder b = nir_builder_at(nir_before_cf_list(&entrypoint->body));
/* Fill Layer ID with zero. Replication will use that as base to
* apply the RTAI offsets.

View File

@@ -122,8 +122,7 @@ anv_nir_lower_set_vtx_and_prim_count(nir_shader *nir)
if (state.primitive_count == NULL) {
nir_builder b;
nir_function_impl *entrypoint = nir_shader_get_entrypoint(nir);
b = nir_builder_create(entrypoint);
b.cursor = nir_before_block(nir_start_block(entrypoint));
b = nir_builder_at(nir_before_block(nir_start_block(entrypoint)));
nir_ssa_def *zero = nir_imm_int(&b, 0);
state.primitive_count = anv_nir_prim_count_store(&b, zero);
}