util/u_queue: Ensure num_cpu_mask_bits is valid
authorRob Clark <robdclark@chromium.org>
Wed, 24 Feb 2021 21:59:15 +0000 (13:59 -0800)
committerMarge Bot <eric+marge@anholt.net>
Fri, 26 Feb 2021 18:31:19 +0000 (18:31 +0000)
commit9fb9019bebe955ce0510799f02b0dddd6fe9efbe
tree74dc4c0dcdecd9235b49de29536533d6026cd914
parent4ded99f99ddbd1103ffddfd9935638fc12e0ecfd
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: d877451b48a ("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>
src/util/u_queue.c