From 0e8192a76b771bafe09784eecc68fddfa346fb9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 13 Sep 2023 16:40:55 +0200 Subject: [PATCH] aco: append p_logical_end after monolithic RT shaders Fixes: bdec044c880ef38fad3641d306b9828e3c871003 ('aco: Do not fixup registers if there are no shader calls') Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 07c387a..c62abb3 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -11344,9 +11344,6 @@ merged_wave_info_to_mask(isel_context* ctx, unsigned i) static void insert_rt_jump_next(isel_context& ctx, const struct ac_shader_args* args) { - append_logical_end(ctx.block); - ctx.block->kind |= block_kind_uniform; - unsigned src_count = ctx.args->arg_count; Pseudo_instruction* ret = create_instruction(aco_opcode::p_return, Format::PSEUDO, src_count, 0); @@ -11384,6 +11381,8 @@ select_program_rt(isel_context& ctx, unsigned shader_count, struct nir_shader* c append_logical_start(ctx.block); split_arguments(&ctx, startpgm); visit_cf_list(&ctx, &nir_shader_get_entrypoint(nir)->body); + append_logical_end(ctx.block); + ctx.block->kind |= block_kind_uniform; /* Fix output registers and jump to next shader. We can skip this when dealing with a raygen * shader without shader calls. -- 2.7.4