radeonsi: deal with ac_nir_translate failures
ac_nir_translate can fail now so forward the translation result to si_llvm_compile_shader. If it's a failure, it'll print something like: radeonsi: can't compile a main shader part And the shader won't be used. 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:
committed by
Marge Bot
parent
d92d35c9db
commit
ac6fb2467f
@@ -1069,7 +1069,8 @@ bool si_llvm_translate_nir(struct si_shader_context *ctx, struct si_shader *shad
|
||||
}
|
||||
}
|
||||
|
||||
ac_nir_translate(&ctx->ac, &ctx->abi, &ctx->args, nir);
|
||||
if (!ac_nir_translate(&ctx->ac, &ctx->abi, &ctx->args, nir))
|
||||
return false;
|
||||
|
||||
switch (sel->stage) {
|
||||
case MESA_SHADER_VERTEX:
|
||||
|
||||
@@ -3034,7 +3034,12 @@ static void si_init_shader_selector_async(void *job, void *gdata, int thread_ind
|
||||
/* Compile the shader if it hasn't been loaded from the cache. */
|
||||
if (!si_compile_shader(sscreen, compiler, shader, debug)) {
|
||||
FREE(shader);
|
||||
fprintf(stderr, "radeonsi: can't compile a main shader part\n");
|
||||
fprintf(stderr,
|
||||
"radeonsi: can't compile a main shader part (type: %s, name: %s).\n"
|
||||
"This is probably a driver bug, please report "
|
||||
"it to https://gitlab.freedesktop.org/mesa/mesa/-/issues.\n",
|
||||
gl_shader_stage_name(shader->selector->stage),
|
||||
shader->selector->info.base.name);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user