util/u_queue: add UTIL_QUEUE_INIT_SCALE_THREADS flag
This flag allow to create a single thread initially, but set max_thread to the request thread count. If the queue is full and num_threads is lower than max_threads, we spawn a new thread to help process the queue faster. This avoid creating N threads at queue creation time. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11296>
This commit is contained in:
@@ -49,6 +49,7 @@ extern "C" {
|
||||
#define UTIL_QUEUE_INIT_USE_MINIMUM_PRIORITY (1 << 0)
|
||||
#define UTIL_QUEUE_INIT_RESIZE_IF_FULL (1 << 1)
|
||||
#define UTIL_QUEUE_INIT_SET_FULL_THREAD_AFFINITY (1 << 2)
|
||||
#define UTIL_QUEUE_INIT_SCALE_THREADS (1 << 3)
|
||||
|
||||
#if UTIL_FUTEX_SUPPORTED
|
||||
#define UTIL_QUEUE_FENCE_FUTEX
|
||||
|
||||
Reference in New Issue
Block a user