diff options
author | Nicolai Hähnle <[email protected]> | 2016-07-07 09:28:25 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-07-08 10:59:32 +0200 |
commit | 7ffc832ab849a49039f2579dd539c231a9c9c000 (patch) | |
tree | 754c9737909c28a641358509cdae5b9f5834e7e6 | |
parent | 084ca0d8e51ae0a5cca6cfc7e9d018d0b22b6fb7 (diff) |
radeonsi: use multi-threaded compilation in debug contexts
We only have to stay single-threaded when debug output must be synchronous.
This yields better parallelism in shader-db runs for me.
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index abbe451d8e8..94587b296fa 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1103,16 +1103,16 @@ void si_init_shader_selector_async(void *job, int thread_index) struct si_shader_selector *sel = (struct si_shader_selector *)job; struct si_screen *sscreen = sel->screen; LLVMTargetMachineRef tm; - struct pipe_debug_callback *debug; + struct pipe_debug_callback *debug = &sel->debug; unsigned i; if (thread_index >= 0) { assert(thread_index < ARRAY_SIZE(sscreen->tm)); tm = sscreen->tm[thread_index]; - debug = NULL; + if (!debug->async) + debug = NULL; } else { tm = sel->tm; - debug = &sel->debug; } /* Compile the main shader part for use with a prolog and/or epilog. @@ -1324,7 +1324,7 @@ static void *si_create_shader_selector(struct pipe_context *ctx, pipe_mutex_init(sel->mutex); util_queue_fence_init(&sel->ready); - if (sctx->b.debug.debug_message || + if ((sctx->b.debug.debug_message && !sctx->b.debug.async) || !util_queue_is_initialized(&sscreen->shader_compiler_queue)) si_init_shader_selector_async(sel, -1); else |