Mesa (main): lima: disasm: call util_cpu_detect() to init CPU caps

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 29 18:46:35 UTC 2021


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

Author: Vasily Khoruzhick <anarsoul at gmail.com>
Date:   Fri Nov 26 18:04:51 2021 -0800

lima: disasm: call util_cpu_detect() to init CPU caps

It's needed by _mesa_half_to_float(), without this change it hits
assertion failure in util_get_cpu_caps().

Reviewed-by: Andreas Baierl <ichgeh at imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13968>

---

 src/gallium/drivers/lima/standalone/lima_disasm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/lima/standalone/lima_disasm.c b/src/gallium/drivers/lima/standalone/lima_disasm.c
index 9c8278cddd9..82dcddc69be 100644
--- a/src/gallium/drivers/lima/standalone/lima_disasm.c
+++ b/src/gallium/drivers/lima/standalone/lima_disasm.c
@@ -23,6 +23,7 @@
  */
 
 #include "util/ralloc.h"
+#include "util/u_cpu_detect.h"
 
 #include <err.h>
 #include <stdio.h>
@@ -175,6 +176,9 @@ main(int argc, char **argv)
       return -1;
    }
 
+   /* Needed by _mesa_half_to_float() */
+   util_cpu_detect();
+
    if (is_frag) {
       assert((size & 0x3) == 0);
       size >>= 2;



More information about the mesa-commit mailing list