summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-05-19 17:28:54 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-07-31 14:55:33 +0200
commitc5f70a517442ac98861f7c84eb04bbe3b8823a2d (patch)
tree79a52a99eff7941fba921d4d54ce1827d9aaefdc
parent29d7bdd179bb5d67a6f8968f0a367264dc654774 (diff)
radeonsi: bypass the shader cache for NIR shaders
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 07c6d43b75..5a0ead1313 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1800,7 +1800,7 @@ void si_init_shader_selector_async(void *job, int thread_index)
*/
if (!sscreen->use_monolithic_shaders) {
struct si_shader *shader = CALLOC_STRUCT(si_shader);
- void *tgsi_binary;
+ void *tgsi_binary = NULL;
if (!shader) {
fprintf(stderr, "radeonsi: can't allocate a main shader part\n");
@@ -1810,7 +1810,8 @@ void si_init_shader_selector_async(void *job, int thread_index)
shader->selector = sel;
si_parse_next_shader_property(&sel->info, &shader->key);
- tgsi_binary = si_get_tgsi_binary(sel);
+ if (sel->tokens)
+ tgsi_binary = si_get_tgsi_binary(sel);
/* Try to load the shader from the shader cache. */
mtx_lock(&sscreen->shader_cache_mutex);