mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
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: a9618e7c42 ("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>
This commit is contained in:
parent
09bddd6ceb
commit
a1e9a5d653
1 changed files with 3 additions and 0 deletions
|
|
@ -45,6 +45,7 @@
|
|||
#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"
|
||||
|
|
@ -2566,6 +2567,8 @@ __DRIconfig **brw_init_screen(__DRIscreen *dri_screen)
|
|||
{
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue