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:

committed by
Marge Bot

parent
ed08305549
commit
05269047d3
@@ -639,8 +639,7 @@ brw_nir_initialize_mue(nir_shader *nir,
|
||||
|
||||
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 *dw_off = nir_imm_int(&b, 0);
|
||||
nir_ssa_def *zerovec = nir_imm_vec4(&b, 0, 0, 0, 0);
|
||||
|
@@ -167,11 +167,9 @@ brw_nir_lower_alpha_to_coverage(nir_shader *shader,
|
||||
&sample_mask_write->instr);
|
||||
}
|
||||
|
||||
nir_builder b = nir_builder_create(impl);
|
||||
nir_builder b = nir_builder_at(nir_before_instr(&sample_mask_write->instr));
|
||||
|
||||
/* Combine dither_mask and the gl_SampleMask value */
|
||||
b.cursor = nir_before_instr(&sample_mask_write->instr);
|
||||
|
||||
nir_ssa_def *dither_mask = build_dither_mask(&b, color0);
|
||||
dither_mask = nir_iand(&b, sample_mask, dither_mask);
|
||||
|
||||
|
@@ -55,11 +55,9 @@ lower_any_hit_for_intersection(nir_shader *any_hit)
|
||||
ralloc_array(any_hit, nir_parameter, ARRAY_SIZE(params));
|
||||
memcpy(impl->function->params, params, sizeof(params));
|
||||
|
||||
nir_builder build = nir_builder_create(impl);
|
||||
nir_builder build = nir_builder_at(nir_before_cf_list(&impl->body));
|
||||
nir_builder *b = &build;
|
||||
|
||||
b->cursor = nir_before_cf_list(&impl->body);
|
||||
|
||||
nir_ssa_def *commit_ptr = nir_load_param(b, 0);
|
||||
nir_ssa_def *hit_t = nir_load_param(b, 1);
|
||||
nir_ssa_def *hit_kind = nir_load_param(b, 2);
|
||||
@@ -156,11 +154,9 @@ brw_nir_lower_intersection_shader(nir_shader *intersection,
|
||||
|
||||
nir_function_impl *impl = nir_shader_get_entrypoint(intersection);
|
||||
|
||||
nir_builder build = nir_builder_create(impl);
|
||||
nir_builder build = nir_builder_at(nir_before_cf_list(&impl->body));
|
||||
nir_builder *b = &build;
|
||||
|
||||
b->cursor = nir_before_cf_list(&impl->body);
|
||||
|
||||
nir_ssa_def *t_addr = brw_nir_rt_mem_hit_addr(b, false /* committed */);
|
||||
nir_variable *commit =
|
||||
nir_local_variable_create(impl, glsl_bool_type(), "ray_commit");
|
||||
|
@@ -503,9 +503,7 @@ static void
|
||||
lower_ray_query_impl(nir_function_impl *impl, struct lowering_state *state)
|
||||
{
|
||||
nir_builder _b, *b = &_b;
|
||||
_b = nir_builder_create(impl);
|
||||
|
||||
b->cursor = nir_before_block(nir_start_block(b->impl));
|
||||
_b = nir_builder_at(nir_before_block(nir_start_block(impl)));
|
||||
|
||||
state->rq_globals = nir_load_ray_query_global_intel(b);
|
||||
|
||||
|
@@ -50,11 +50,9 @@ lower_rt_intrinsics_impl(nir_function_impl *impl,
|
||||
{
|
||||
bool progress = false;
|
||||
|
||||
nir_builder build = nir_builder_create(impl);
|
||||
nir_builder build = nir_builder_at(nir_before_block(nir_start_block(impl)));
|
||||
nir_builder *b = &build;
|
||||
|
||||
b->cursor = nir_before_block(nir_start_block(b->impl));
|
||||
|
||||
struct brw_nir_rt_globals_defs globals;
|
||||
brw_nir_rt_load_globals(b, &globals);
|
||||
|
||||
|
@@ -78,9 +78,8 @@ lower_rt_io_derefs(nir_shader *shader)
|
||||
*/
|
||||
assert(num_shader_call_vars <= 1);
|
||||
|
||||
nir_builder b = nir_builder_create(impl);
|
||||
nir_builder b = nir_builder_at(nir_before_cf_list(&impl->body));
|
||||
|
||||
b.cursor = nir_before_cf_list(&impl->body);
|
||||
nir_ssa_def *call_data_addr = NULL;
|
||||
if (num_shader_call_vars > 0) {
|
||||
assert(shader->scratch_size >= BRW_BTD_STACK_CALLEE_DATA_SIZE);
|
||||
|
Reference in New Issue
Block a user