nir: Use nir_builder_create

perl -p0e 's/nir_builder ([^;]*);\s*nir_builder_init\(&\1, /nir_builder \1 = nir_builder_create(/g' -i $(git grep -l nir_builder_init)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23860>
This commit is contained in:
Alyssa Rosenzweig
2023-06-26 10:42:29 -04:00
committed by Marge Bot
parent e5410f9b00
commit 815efcdf7e
135 changed files with 205 additions and 417 deletions

View File

@@ -277,8 +277,7 @@ brw_nir_lower_vs_inputs(nir_shader *nir,
if (!function->impl)
continue;
nir_builder b;
nir_builder_init(&b, function->impl);
nir_builder b = nir_builder_create(function->impl);
nir_foreach_block(block, function->impl) {
nir_foreach_instr_safe(instr, block) {
@@ -441,8 +440,7 @@ brw_nir_lower_tes_inputs(nir_shader *nir, const struct brw_vue_map *vue_map)
nir_foreach_function(function, nir) {
if (function->impl) {
nir_builder b;
nir_builder_init(&b, function->impl);
nir_builder b = nir_builder_create(function->impl);
nir_foreach_block(block, function->impl) {
remap_patch_urb_offsets(block, &b, vue_map,
nir->info.tess._primitive_mode);
@@ -597,8 +595,7 @@ brw_nir_lower_tcs_outputs(nir_shader *nir, const struct brw_vue_map *vue_map,
nir_foreach_function(function, nir) {
if (function->impl) {
nir_builder b;
nir_builder_init(&b, function->impl);
nir_builder b = nir_builder_create(function->impl);
nir_foreach_block(block, function->impl) {
remap_patch_urb_offsets(block, &b, vue_map, tes_primitive_mode);
}