ac/llvm: remove ac_shader_abi::emit_outputs

it's called last in ac_nir_translate, so call it in the caller.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16467>
This commit is contained in:
Marek Olšák
2022-05-05 20:36:55 -04:00
parent 9a8413aaea
commit dc81f0ba46
9 changed files with 50 additions and 34 deletions

View File

@@ -2044,7 +2044,6 @@ ac_translate_nir_to_llvm(struct ac_llvm_compiler *ac_llvm,
create_function(&ctx, shaders[shader_count - 1]->info.stage, shader_count >= 2);
ctx.abi.emit_outputs = handle_shader_outputs_post;
ctx.abi.emit_vertex_with_counter = visit_emit_vertex_with_counter;
ctx.abi.load_ubo = radv_load_ubo;
ctx.abi.load_ssbo = radv_load_ssbo;
@@ -2185,6 +2184,9 @@ ac_translate_nir_to_llvm(struct ac_llvm_compiler *ac_llvm,
ac_nir_translate(&ctx.ac, &ctx.abi, &args->ac, shaders[shader_idx]);
if (!gl_shader_stage_is_compute(shaders[shader_idx]->info.stage))
handle_shader_outputs_post(&ctx.abi);
if (shader_count >= 2 || is_ngg) {
LLVMBuildBr(ctx.ac.builder, merge_block);
LLVMPositionBuilderAtEnd(ctx.ac.builder, merge_block);