diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2021-06-09 13:49:23 +0200 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2021-06-17 09:11:59 +0200 |
commit | 3713dc6b2a7472a838885b9ff1e4e07f9b9b7713 (patch) | |
tree | c44f169e977098a8caabadb7d303d3b7fe523922 /src/util/u_queue.h | |
parent | 0c88df1f6a524c52c8d893ed8db2cff01e8bd14a (diff) | |
download | mesa-3713dc6b2a7472a838885b9ff1e4e07f9b9b7713.tar.gz |
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>
Diffstat (limited to 'src/util/u_queue.h')
-rw-r--r-- | src/util/u_queue.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/u_queue.h b/src/util/u_queue.h index 704d6c54892..793120a3270 100644 --- a/src/util/u_queue.h +++ b/src/util/u_queue.h @@ -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 |