diff options
author | Marek Olšák <[email protected]> | 2019-11-20 18:40:46 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-11-25 16:48:27 -0500 |
commit | 4675cb2019cdab3f4980e3f98ce243f668092425 (patch) | |
tree | c4e1d217c781ca80f2500fde80b6596babb1896f /src/gallium/drivers/radeonsi/si_compute_prim_discard.c | |
parent | f671cc4d95eaf9ecfaafb216afeff7dc89f66cbf (diff) |
radeonsi: initialize the per-context compiler on demand
This takes a noticable amount of time in piglit and some tests don't
need it.
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_compute_prim_discard.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_compute_prim_discard.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c index 0bbaf4f306d..31c18e098e6 100644 --- a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c +++ b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c @@ -939,6 +939,9 @@ static bool si_shader_select_prim_discard_cs(struct si_context *sctx, sctx->cs_prim_discard_state.cso = sctx->vs_shader.cso; sctx->cs_prim_discard_state.current = NULL; + if (!sctx->compiler.passes) + si_init_compiler(sctx->screen, &sctx->compiler); + struct si_compiler_ctx_state compiler_state; compiler_state.compiler = &sctx->compiler; compiler_state.debug = sctx->debug; |