i965: Call util_cpu_detect() early in screen creation
authorJordan Justen <jordan.l.justen@intel.com>
Sun, 28 Feb 2021 21:23:07 +0000 (13:23 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 1 Mar 2021 07:12:00 +0000 (23:12 -0800)
commita1e9a5d65344bd4d948075cdd0617cab961f9885
tree4d82547cc9733d4c9ac4039c93782d480f7320af
parent09bddd6ceb61ad1f561d0e3e9615a65acb9a0dfb
i965: Call util_cpu_detect() early in screen creation

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>
src/mesa/drivers/dri/i965/intel_screen.c