summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-09-10 18:30:41 +0200
committerMarek Olšák <[email protected]>2015-09-24 19:51:43 +0200
commit5dbadb02572f875f5d2f22327eab6b93de61337c (patch)
treebd44e4b0f45480fce3d1c587ae52efac4a30f149 /src
parent263f5a2cf97e455e48dbd7728cb0ac10fd699746 (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]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c7
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 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;
}