summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-01-23 16:00:31 +1100
committerTimothy Arceri <[email protected]>2018-02-10 10:59:10 +1100
commit8f378c116eb226e18193583dcbf1a5a77246b507 (patch)
tree730b17204463ed5f7df5180f6287451d02490b8e /src/mesa/state_tracker
parentbc9d9f9b864efd24f0a4c65e2645f689f3ee9e79 (diff)
st/radeonsi: enable disk cache for nir
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_program.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 191567ceec5..d9b7155a912 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -465,6 +465,7 @@ st_translate_vertex_program(struct st_context *st,
&stvp->tgsi.stream_output);
}
+ st_store_ir_in_disk_cache(st, &stvp->Base, true);
return true;
}
@@ -899,9 +900,11 @@ st_translate_fragment_program(struct st_context *st,
}
}
- /* We have already compiler to NIR so just return */
- if (stfp->shader_program)
+ /* We have already compiled to NIR so just return */
+ if (stfp->shader_program) {
+ st_store_ir_in_disk_cache(st, &stfp->Base, true);
return true;
+ }
ureg = ureg_create_with_screen(PIPE_SHADER_FRAGMENT, st->pipe->screen);
if (ureg == NULL)
@@ -1471,6 +1474,7 @@ st_translate_geometry_program(struct st_context *st,
/* We have already compiled to NIR so just return */
if (stgp->shader_program) {
st_translate_program_stream_output(&stgp->Base, &stgp->tgsi.stream_output);
+ st_store_ir_in_disk_cache(st, &stgp->Base, true);
return true;
}
@@ -1570,8 +1574,10 @@ st_translate_tessctrl_program(struct st_context *st,
struct ureg_program *ureg;
/* We have already compiled to NIR so just return */
- if (sttcp->shader_program)
+ if (sttcp->shader_program) {
+ st_store_ir_in_disk_cache(st, &sttcp->Base, true);
return true;
+ }
ureg = ureg_create_with_screen(PIPE_SHADER_TESS_CTRL, st->pipe->screen);
if (ureg == NULL)
@@ -1601,6 +1607,7 @@ st_translate_tesseval_program(struct st_context *st,
/* We have already compiled to NIR so just return */
if (sttep->shader_program) {
st_translate_program_stream_output(&sttep->Base, &sttep->tgsi.stream_output);
+ st_store_ir_in_disk_cache(st, &sttep->Base, true);
return true;
}
@@ -1651,7 +1658,7 @@ st_translate_compute_program(struct st_context *st,
/* no compute variants: */
st_finalize_nir(st, &stcp->Base, stcp->shader_program,
(struct nir_shader *) stcp->tgsi.prog);
-
+ st_store_ir_in_disk_cache(st, &stcp->Base, true);
return true;
}