Mesa (master): zink: manually invoke cpu detection during screen init

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Mar 30 15:21:23 UTC 2021


Module: Mesa
Branch: master
Commit: c452c82b989fcc2122da222ba67f75a5d233c8e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c452c82b989fcc2122da222ba67f75a5d233c8e5

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Wed Jan  6 13:05:41 2021 -0500

zink: manually invoke cpu detection during screen init

ensure this gets populated before using it

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>

---

 src/gallium/drivers/zink/zink_screen.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index e834d76f8d5..db0a4ac05e4 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -44,6 +44,8 @@
 #include "util/u_transfer_helper.h"
 #include "util/xmlconfig.h"
 
+#include "util/u_cpu_detect.h"
+
 #include "frontend/sw_winsys.h"
 
 static const struct debug_named_value
@@ -1373,6 +1375,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
    if (!screen)
       return NULL;
 
+   util_cpu_detect();
+
    zink_debug = debug_get_option_zink_debug();
 
    screen->instance_info.loader_version = zink_get_loader_version();



More information about the mesa-commit mailing list