diff options
author | Marek Olšák <[email protected]> | 2015-09-10 18:30:41 +0200 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-10-07 14:38:46 +0100 |
commit | 815b595b5f2c8b3d0b558b1fc112c8e003b2ec03 (patch) | |
tree | 029b7444be562c81fab9602ee9d354b4f90d6516 | |
parent | 4e0ae01588492775169b73530210cd131ac99978 (diff) |
radeonsi: handle shader precompile failures
Cc: 11.0 <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
(cherry picked from commit 5dbadb02572f875f5d2f22327eab6b93de61337c)
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index d6b4fd3915e..c9319390aea 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -733,7 +733,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; } |