util: Add accessor for util_cpu_caps

Graphics / Mesa 3D Graphics Library / Mesa - Rob Clark [chromium.org] - 26 February 2021 18:31 UTC

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.

a9618e7c421 util: Add accessor for util_cpu_caps
src/amd/common/ac_gpu_info.c | 4 +-
src/amd/compiler/tests/main.cpp | 4 +
src/compiler/glsl/standalone.cpp | 2 +
src/compiler/nir/tests/negative_equal_tests.cpp | 2 +
src/freedreno/isa/decode.c | 2 +
src/gallium/auxiliary/gallivm/lp_bld_arit.c | 98 +++++++++++-----------
src/gallium/auxiliary/gallivm/lp_bld_conv.c | 12 +--
src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c | 10 +--
src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c | 4 +-
src/gallium/auxiliary/gallivm/lp_bld_gather.c | 4 +-
src/gallium/auxiliary/gallivm/lp_bld_init.c | 15 ++--
src/gallium/auxiliary/gallivm/lp_bld_logic.c | 10 +--
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 30 +++----
src/gallium/auxiliary/gallivm/lp_bld_pack.c | 24 +++---
src/gallium/auxiliary/gallivm/lp_bld_sample.c | 2 +-
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 2 +-
src/gallium/auxiliary/rtasm/rtasm_cpu.c | 4 +-
src/gallium/auxiliary/rtasm/rtasm_x86sse.c | 12 +--
src/gallium/auxiliary/util/u_threaded_context.c | 6 +-
src/gallium/drivers/llvmpipe/lp_bld_depth.c | 4 +-
src/gallium/drivers/llvmpipe/lp_screen.c | 2 +-
src/gallium/drivers/llvmpipe/lp_test_arit.c | 4 +-
src/gallium/drivers/llvmpipe/lp_texture.c | 4 +-
src/gallium/drivers/swr/swr_loader.cpp | 8 +-
src/gallium/drivers/vc4/vc4_tiling.h | 4 +-
src/gallium/tests/unit/translate_test.c | 9 +-
src/gallium/tests/unit/u_half_test.c | 9 +-
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 +-
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 4 +-
src/mesa/main/glthread.c | 8 +-
src/mesa/state_tracker/st_context.c | 2 +-
src/mesa/state_tracker/st_draw.c | 2 +-
src/util/half_float.h | 6 +-
src/util/tests/format/u_format_test.c | 2 +
src/util/u_cpu_detect.c | 4 +-
src/util/u_cpu_detect.h | 16 +++-
src/util/u_math.c | 8 +-
src/util/u_queue.c | 2 +-
38 files changed, 187 insertions(+), 162 deletions(-)

Upstream: cgit.freedesktop.org


  • Share