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>
This commit is contained in:
Rob Clark
2021-02-25 10:04:50 -08:00
committed by Marge Bot
parent 9fb9019beb
commit a9618e7c42
38 changed files with 187 additions and 162 deletions

View File

@@ -398,6 +398,8 @@ standalone_compile_shader(const struct standalone_options *_options,
int status = EXIT_SUCCESS;
bool glsl_es = false;
util_cpu_detect();
options = _options;
switch (options->glsl_version) {