ir3: Create at least one thread for async shader compile
On a single core CPU system we end with num_threads being 0 and we do _NOT_ create any async compile threads in util_queue_init(..). Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17124>
This commit is contained in:
committed by
Marge Bot
parent
3196bde941
commit
5cce02325c
@@ -558,6 +558,9 @@ ir3_screen_init(struct pipe_screen *pscreen)
|
||||
*/
|
||||
unsigned num_threads = sysconf(_SC_NPROCESSORS_ONLN) - 1;
|
||||
|
||||
/* Create at least one thread - even on single core CPU systems. */
|
||||
num_threads = MAX2(1, num_threads);
|
||||
|
||||
util_queue_init(&screen->compile_queue, "ir3q", 64, num_threads,
|
||||
UTIL_QUEUE_INIT_RESIZE_IF_FULL |
|
||||
UTIL_QUEUE_INIT_SET_FULL_THREAD_AFFINITY, NULL);
|
||||
|
||||
Reference in New Issue
Block a user