Mesa (staging/20.1): clover: Fix types collision between c++ and altivec
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 30 22:31:51 UTC 2020
Module: Mesa
Branch: staging/20.1
Commit: 53907c06da8e6cd93359d458ab9b181c9f6ffc96
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=53907c06da8e6cd93359d458ab9b181c9f6ffc96
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>
(cherry picked from commit cd7acd09b9f8cc68cbe50f9b239029efe7f9cd18)
---
.pick_status.json | 2 +-
src/gallium/state_trackers/clover/core/error.hpp | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index db471046295..4847217f1ce 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -31,7 +31,7 @@
"description": "clover: Fix types collision between c++ and altivec",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/gallium/state_trackers/clover/core/error.hpp b/src/gallium/state_trackers/clover/core/error.hpp
index 0490c19a276..e46c05b865b 100644
--- a/src/gallium/state_trackers/clover/core/error.hpp
+++ b/src/gallium/state_trackers/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