Rob Clark
a9618e7c42
util: Add accessor for util_cpu_caps
...
In release builds, there should be no change, but in debug builds the
assert will help us catch undefined behavior resulting from using
util_cpu_caps before it is initialized.
With fix for u_half_test for MSVC from Jesse Natalie squashed in.
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 >
2021-02-26 18:31:19 +00:00
Marek Olšák
a0467b7fa1
util: replace UTIL_MAX_CPUS by util_cpu_caps.num_cpu_mask_bits
...
to reduce overhead when setting thread affinity.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8017 >
2021-01-05 03:47:16 +00:00
Marek Olšák
e4fa7c440d
util: add AMD CPU family enums and enable L3 cache pinning on Zen3
...
Based on: https://en.wikichip.org/wiki/amd/cpuid
The only reason it's nominated as a fix is because Zen3 might underperform
because the CPU detection ignored it.
Fixes: 15fa2c5e35 - gallium/u_cpu_detect: get the number of cores per L3 cache for AMD Zen
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8225 >
2021-01-05 02:43:55 +00:00
Marek Olšák
d8ea509965
util: completely rewrite and do AMD Zen L3 cache pinning correctly
...
This queries the CPU cache topology correctly.
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7054 >
2020-10-30 05:07:57 +00:00
Lionel Landwerlin
e2d761de03
util: drop final reference to p_compiler.h
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
2019-08-09 22:59:43 +03:00
Dylan Baker
fb02bd3d1c
util: move u_cpu_detect to util
...
CC: vlee@freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107870
Fixes: 80825abb5d
("move u_math to src/util")
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-10-30 14:32:52 -07:00