From: Marek Olšák Date: Thu, 10 Sep 2015 16:30:41 +0000 (+0200) Subject: radeonsi: handle shader precompile failures X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5dbadb02572f875f5d2f22327eab6b93de61337c;p=mesa.git radeonsi: handle shader precompile failures Cc: 11.0 Acked-by: Christian König Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index bc7fdb3e94a..74e113668aa 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -736,7 +736,12 @@ static void *si_create_shader_state(struct pipe_context *ctx, } if (sscreen->b.debug_flags & DBG_PRECOMPILE) - si_shader_select(ctx, sel); + if (si_shader_select(ctx, sel)) { + fprintf(stderr, "radeonsi: can't create a shader\n"); + tgsi_free_tokens(sel->tokens); + FREE(sel); + return NULL; + } return sel; }