1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
From ca3c63d3e2859d751f9ff1d259ecff933fb8e3d7 Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@mentor.com>
Date: Wed, 16 Nov 2016 13:43:27 +0500
Subject: [PATCH] AMDTAPIClasses: fix build with gcc6
Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
.../AMDTAPIClasses-fix-gcc6-compile-issues.patch | 53 ++++++++++++++++++++++
.../AMDTAPIClasses/Include/apCLContextProperties.h | 3 +++
.../Src/AMDTAPIClasses/src/apOpenCLParameters.cpp | 12 ++---
3 files changed, 62 insertions(+), 6 deletions(-)
create mode 100644 Common/Src/AMDTAPIClasses/AMDTAPIClasses-fix-gcc6-compile-issues.patch
diff --git a/Common/Src/AMDTAPIClasses/AMDTAPIClasses-fix-gcc6-compile-issues.patch b/Common/Src/AMDTAPIClasses/AMDTAPIClasses-fix-gcc6-compile-issues.patch
new file mode 100644
index 0000000..07d30f1
--- /dev/null
+++ b/Common/Src/AMDTAPIClasses/AMDTAPIClasses-fix-gcc6-compile-issues.patch
@@ -0,0 +1,53 @@
+From cfe161742f62933f28845c004415a88588798470 Mon Sep 17 00:00:00 2001
+From: BogDan Vatra <bogdan@kdab.com>
+Date: Wed, 21 Sep 2016 15:30:06 +0300
+Subject: [PATCH] Fix comparation
+
+Fix gcc6 compile
+---
+ Include/apCLContextProperties.h | 3 +++
+ src/apOpenCLParameters.cpp | 12 ++++++------
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/Include/apCLContextProperties.h b/Include/apCLContextProperties.h
+index 8412e26..e112424 100755
+--- a/Include/apCLContextProperties.h
++++ b/Include/apCLContextProperties.h
+@@ -54,6 +54,9 @@ class AP_API apCLContextProperties : public apAllocatedObject
+ virtual bool readSelfFromChannel(osChannel& ipcChannel);
+
+ private:
+++#if defined __GNUC__ && __GNUC__>=6
+++ #pragma GCC diagnostic ignored "-Wignored-attributes"
+++#endif
+ typedef std::pair<cl_uint, oaCLContextProperty> apCLProperty;
+ gtVector<apCLProperty> _properties;
+ };
+diff --git a/src/apOpenCLParameters.cpp b/src/apOpenCLParameters.cpp
+index 7360063..28b1a91 100755
+--- a/src/apOpenCLParameters.cpp
++++ b/src/apOpenCLParameters.cpp
+@@ -4913,7 +4913,7 @@ bool apCLBufferRegionParameter::compareToOther(const apParameter& other)const
+ apCLBufferRegionParameter* pParam = (apCLBufferRegionParameter*)(&other);
+ GT_IF_WITH_ASSERT(pParam != NULL)
+ {
+- retVal = ((_value.origin == pParam->_value.origin) && (_value.size == _value.size));
++ retVal = ((_value.origin == pParam->_value.origin) && (_value.size == pParam->_value.size));
+ }
+ }
+
+@@ -5131,11 +5131,11 @@ bool apCLImageDescriptionParameter::compareToOther(const apParameter& other)cons
+ apCLImageDescriptionParameter* pParam = (apCLImageDescriptionParameter*)(&other);
+ GT_IF_WITH_ASSERT(pParam != NULL)
+ {
+- retVal = ((_value.image_type == pParam->_value.image_type) && (_value.image_width == _value.image_width) &&
+- (_value.image_height == pParam->_value.image_height) && (_value.image_depth == _value.image_depth) &&
+- (_value.image_array_size == pParam->_value.image_array_size) && (_value.image_row_pitch == _value.image_row_pitch) &&
+- (_value.image_slice_pitch == pParam->_value.image_slice_pitch) && (_value.num_mip_levels == _value.num_mip_levels) &&
+- (_value.num_samples == pParam->_value.num_samples) && (_value.buffer == _value.buffer));
++ retVal = ((_value.image_type == pParam->_value.image_type) && (_value.image_width == pParam->_value.image_width) &&
++ (_value.image_height == pParam->_value.image_height) && (_value.image_depth == pParam->_value.image_depth) &&
++ (_value.image_array_size == pParam->_value.image_array_size) && (_value.image_row_pitch == pParam->_value.image_row_pitch) &&
++ (_value.image_slice_pitch == pParam->_value.image_slice_pitch) && (_value.num_mip_levels == pParam->_value.num_mip_levels) &&
++ (_value.num_samples == pParam->_value.num_samples) && (_value.buffer == pParam->_value.buffer));
+ }
+ }
+
diff --git a/Common/Src/AMDTAPIClasses/Include/apCLContextProperties.h b/Common/Src/AMDTAPIClasses/Include/apCLContextProperties.h
index 8412e26..e112424 100755
--- a/Common/Src/AMDTAPIClasses/Include/apCLContextProperties.h
+++ b/Common/Src/AMDTAPIClasses/Include/apCLContextProperties.h
@@ -54,6 +54,9 @@ public:
virtual bool readSelfFromChannel(osChannel& ipcChannel);
private:
+#if defined __GNUC__ && __GNUC__>=6
+ #pragma GCC diagnostic ignored "-Wignored-attributes"
+#endif
typedef std::pair<cl_uint, oaCLContextProperty> apCLProperty;
gtVector<apCLProperty> _properties;
};
diff --git a/Common/Src/AMDTAPIClasses/src/apOpenCLParameters.cpp b/Common/Src/AMDTAPIClasses/src/apOpenCLParameters.cpp
index 7360063..28b1a91 100755
--- a/Common/Src/AMDTAPIClasses/src/apOpenCLParameters.cpp
+++ b/Common/Src/AMDTAPIClasses/src/apOpenCLParameters.cpp
@@ -4913,7 +4913,7 @@ bool apCLBufferRegionParameter::compareToOther(const apParameter& other)const
apCLBufferRegionParameter* pParam = (apCLBufferRegionParameter*)(&other);
GT_IF_WITH_ASSERT(pParam != NULL)
{
- retVal = ((_value.origin == pParam->_value.origin) && (_value.size == _value.size));
+ retVal = ((_value.origin == pParam->_value.origin) && (_value.size == pParam->_value.size));
}
}
@@ -5131,11 +5131,11 @@ bool apCLImageDescriptionParameter::compareToOther(const apParameter& other)cons
apCLImageDescriptionParameter* pParam = (apCLImageDescriptionParameter*)(&other);
GT_IF_WITH_ASSERT(pParam != NULL)
{
- retVal = ((_value.image_type == pParam->_value.image_type) && (_value.image_width == _value.image_width) &&
- (_value.image_height == pParam->_value.image_height) && (_value.image_depth == _value.image_depth) &&
- (_value.image_array_size == pParam->_value.image_array_size) && (_value.image_row_pitch == _value.image_row_pitch) &&
- (_value.image_slice_pitch == pParam->_value.image_slice_pitch) && (_value.num_mip_levels == _value.num_mip_levels) &&
- (_value.num_samples == pParam->_value.num_samples) && (_value.buffer == _value.buffer));
+ retVal = ((_value.image_type == pParam->_value.image_type) && (_value.image_width == pParam->_value.image_width) &&
+ (_value.image_height == pParam->_value.image_height) && (_value.image_depth == pParam->_value.image_depth) &&
+ (_value.image_array_size == pParam->_value.image_array_size) && (_value.image_row_pitch == pParam->_value.image_row_pitch) &&
+ (_value.image_slice_pitch == pParam->_value.image_slice_pitch) && (_value.num_mip_levels == pParam->_value.num_mip_levels) &&
+ (_value.num_samples == pParam->_value.num_samples) && (_value.buffer == pParam->_value.buffer));
}
}
--
1.9.1
|