Mesa (master): clover: Fix types collision between c++ and altivec

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 30 21:05:01 UTC 2020


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

Author: Frédéric Bonnard <frediz at debian.org>
Date:   Mon May 11 15:57:20 2020 +0200

clover: Fix types collision between c++ and altivec

For that, we undefine bool, vector, pixel as advised by altivec.h in the
specific case that defines them.

Cc: mesa-stable
Signed-off-by: Frédéric Bonnard <frediz at debian.org>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4948>

---

 src/gallium/frontends/clover/core/error.hpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/frontends/clover/core/error.hpp b/src/gallium/frontends/clover/core/error.hpp
index 0490c19a276..e46c05b865b 100644
--- a/src/gallium/frontends/clover/core/error.hpp
+++ b/src/gallium/frontends/clover/core/error.hpp
@@ -24,6 +24,11 @@
 #define CLOVER_CORE_ERROR_HPP
 
 #include "CL/cl.h"
+#if defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__)
+   #undef vector
+   #undef pixel
+   #undef bool
+#endif
 
 #include <stdexcept>
 #include <string>



More information about the mesa-commit mailing list