radeonsi: use 1 shader compilation thread if NIR_PRINT is used
This avoids getting multiple shaders NIR code being printed at the same time making the log unusable. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15074>
This commit is contained in:
parent
6731460194
commit
7070178dfd
|
@ -34,6 +34,7 @@
|
|||
#include "si_shader_internal.h"
|
||||
#include "sid.h"
|
||||
#include "ac_shadowed_regs.h"
|
||||
#include "compiler/nir/nir.h"
|
||||
#include "util/disk_cache.h"
|
||||
#include "util/u_cpu_detect.h"
|
||||
#include "util/u_log.h"
|
||||
|
@ -1163,6 +1164,18 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws,
|
|||
num_comp_lo_threads = 1;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
nir_process_debug_variable();
|
||||
|
||||
/* Use a single compilation thread if NIR printing is enabled to avoid
|
||||
* multiple shaders being printed at the same time.
|
||||
*/
|
||||
if (NIR_DEBUG(PRINT)) {
|
||||
num_comp_hi_threads = 1;
|
||||
num_comp_lo_threads = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
num_comp_hi_threads = MIN2(num_comp_hi_threads, ARRAY_SIZE(sscreen->compiler));
|
||||
num_comp_lo_threads = MIN2(num_comp_lo_threads, ARRAY_SIZE(sscreen->compiler_lowp));
|
||||
|
||||
|
|
Loading…
Reference in New Issue