This helps to avoid this assertion in debug builds:
src/util/u_cpu_detect.h:116: util_get_cpu_caps: Assertion `util_cpu_caps.nr_cpus >= 1' failed.
Fixes:
a9618e7c421 ("util: Add accessor for util_cpu_caps")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9325>
#include "utils.h"
#include "util/disk_cache.h"
#include "util/driconf.h"
+#include "util/u_cpu_detect.h"
#include "util/u_memory.h"
#include "common/gen_defines.h"
{
struct brw_screen *screen;
+ util_cpu_detect();
+
if (dri_screen->image.loader) {
} else if (dri_screen->dri2.loader->base.version <= 2 ||
dri_screen->dri2.loader->getBuffersWithFormat == NULL) {