radeonsi: minor restructuring of si_llvm_compile_shader

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
This commit is contained in:
Marek Olšák
2025-01-01 15:16:56 -05:00
committed by Marge Bot
parent 1c4c883a3b
commit c61ee0e8fa
@@ -826,14 +826,14 @@ bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *
assert(LLVMGetTypeKind(LLVMTypeOf(LLVMGetParam(ctx.main_fn.value, 0))) == LLVMPointerTypeKind);
/* Compile to bytecode. */
if (!si_compile_llvm(sscreen, &shader->binary, &shader->config, compiler, &ctx.ac, debug,
nir->info.stage, si_get_shader_name(shader))) {
si_llvm_dispose(&ctx);
bool success = si_compile_llvm(sscreen, &shader->binary, &shader->config, compiler, &ctx.ac,
debug, nir->info.stage, si_get_shader_name(shader));
si_llvm_dispose(&ctx);
if (!success) {
fprintf(stderr, "LLVM failed to compile shader\n");
return false;
}
si_llvm_dispose(&ctx);
return true;
}