Mesa (main): util/cpu_detect: Add flag for IBM Z (s390x)
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 23 18:25:32 UTC 2021
Module: Mesa
Branch: main
Commit: 82b261417e531eebc228df86bcd6022f0969d72f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=82b261417e531eebc228df86bcd6022f0969d72f
Author: Marius Hillenbrand <mhillen at linux.ibm.com>
Date: Thu Nov 18 18:25:41 2021 +0100
util/cpu_detect: Add flag for IBM Z (s390x)
As preparation for changing the behavior of LLVMpipe on IBM Z, add a
flag to detect that platform. As it is always known at compile-time, we
do not add it to the struct for cpu flags to avoid inflating that
struct's size.
Signed-off-by: Marius Hillenbrand <mhillen at linux.ibm.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13927>
---
src/util/u_cpu_detect.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/util/u_cpu_detect.h b/src/util/u_cpu_detect.h
index 59dd2304e10..464ed7079b5 100644
--- a/src/util/u_cpu_detect.h
+++ b/src/util/u_cpu_detect.h
@@ -35,6 +35,7 @@
#ifndef _UTIL_CPU_DETECT_H
#define _UTIL_CPU_DETECT_H
+#include <stdbool.h>
#include "pipe/p_config.h"
#include "util/u_thread.h"
@@ -139,6 +140,16 @@ util_get_cpu_caps(void)
void util_cpu_detect(void);
+static inline bool
+util_cpu_caps_has_zarch(void)
+{
+#if defined(PIPE_ARCH_S390)
+ return true;
+#else
+ return false;
+#endif
+}
+
#ifdef __cplusplus
}
More information about the mesa-commit
mailing list