mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
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 <funfunctor@folklore1984.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
084ca0d8e5
commit
7ffc832ab8
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue