[Mesa-dev] [PATCH 10/17] radeonsi: handle shader precompile failures
Marek Olšák
maraeo at gmail.com
Thu Sep 10 10:56:33 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
Cc: 11.0 <mesa-stable at lists.freedesktop.org>
---
src/gallium/drivers/radeonsi/si_state_shaders.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index bc7fdb3..74e1136 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;
}
--
2.1.4
More information about the mesa-dev
mailing list