radv: deal with ac_nir_translate failures

Now that ac_nir_translate reports failures instead of aborting,
we need to deal with it in the driver.
For now, call abort to keep the existing behavior but this could
be improved.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18147>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2022-08-19 15:02:29 +02:00
committed by Marge Bot
parent ac6fb2467f
commit a9ed96ac8e

View File

@@ -1497,7 +1497,9 @@ ac_translate_nir_to_llvm(struct ac_llvm_compiler *ac_llvm,
else if (shaders[shader_idx]->info.stage == MESA_SHADER_GEOMETRY && !info->is_ngg) else if (shaders[shader_idx]->info.stage == MESA_SHADER_GEOMETRY && !info->is_ngg)
prepare_gs_input_vgprs(&ctx, shader_count >= 2); prepare_gs_input_vgprs(&ctx, shader_count >= 2);
ac_nir_translate(&ctx.ac, &ctx.abi, &args->ac, shaders[shader_idx]); if (!ac_nir_translate(&ctx.ac, &ctx.abi, &args->ac, shaders[shader_idx])) {
abort();
}
if (!gl_shader_stage_is_compute(shaders[shader_idx]->info.stage)) if (!gl_shader_stage_is_compute(shaders[shader_idx]->info.stage))
handle_shader_outputs_post(&ctx.abi); handle_shader_outputs_post(&ctx.abi);