mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 14:10:09 +01:00
util/u_queue: Ensure num_cpu_mask_bits is valid
I noticed that we were hitting this before st_create_context() called
util_cpu_detect() and so num_cpu_mask_bits was zero. But there is no
harm in calling util_cpu_detect(), so lets just call it here to be safe.
Fixes: d877451b48 ("util/u_queue: add UTIL_QUEUE_INIT_SET_FULL_THREAD_AFFINITY")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9266>
This commit is contained in:
parent
4ded99f99d
commit
9fb9019beb
1 changed files with 4 additions and 0 deletions
|
|
@ -262,6 +262,10 @@ util_queue_thread_func(void *input)
|
|||
uint32_t mask[UTIL_MAX_CPUS / 32];
|
||||
|
||||
memset(mask, 0xff, sizeof(mask));
|
||||
|
||||
/* Ensure util_cpu_caps.num_cpu_mask_bits is initialized: */
|
||||
util_cpu_detect();
|
||||
|
||||
util_set_current_thread_affinity(mask, NULL,
|
||||
util_cpu_caps.num_cpu_mask_bits);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue