Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple spir-unknown-unknown |
| 2 | // RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple spir-unknown-unknown |
| 3 | // RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple spir-unknown-unknown |
| 4 | // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple spir-unknown-unknown |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 5 | // RUN: %clang_cc1 -x cl -cl-std=c++ %s -verify -triple spir-unknown-unknown |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 6 | // RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES |
| 7 | // RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES |
| 8 | // RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES |
| 9 | // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 10 | // RUN: %clang_cc1 -x cl -cl-std=c++ %s -verify -triple spir-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 11 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 12 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) && !defined(TEST_CORE_FEATURES) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 13 | // expected-no-diagnostics |
| 14 | #endif |
| 15 | |
| 16 | // Extensions in all versions |
| 17 | #ifndef cl_clang_storage_class_specifiers |
| 18 | #error "Missing cl_clang_storage_class_specifiers define" |
| 19 | #endif |
| 20 | #pragma OPENCL EXTENSION cl_clang_storage_class_specifiers: enable |
| 21 | |
| 22 | #ifndef cl_khr_fp16 |
| 23 | #error "Missing cl_khr_fp16 define" |
| 24 | #endif |
| 25 | #pragma OPENCL EXTENSION cl_khr_fp16: enable |
| 26 | |
| 27 | #ifndef cl_khr_int64_base_atomics |
| 28 | #error "Missing cl_khr_int64_base_atomics define" |
| 29 | #endif |
| 30 | #pragma OPENCL EXTENSION cl_khr_int64_base_atomics: enable |
| 31 | |
| 32 | #ifndef cl_khr_int64_extended_atomics |
| 33 | #error "Missing cl_khr_int64_extended_atomics define" |
| 34 | #endif |
| 35 | #pragma OPENCL EXTENSION cl_khr_int64_extended_atomics: enable |
| 36 | |
| 37 | #ifndef cl_khr_gl_sharing |
| 38 | #error "Missing cl_khr_gl_sharing define" |
| 39 | #endif |
| 40 | #pragma OPENCL EXTENSION cl_khr_gl_sharing: enable |
| 41 | |
| 42 | #ifndef cl_khr_icd |
| 43 | #error "Missing cl_khr_icd define" |
| 44 | #endif |
| 45 | #pragma OPENCL EXTENSION cl_khr_icd: enable |
| 46 | |
| 47 | // Core features in CL 1.1 |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 48 | |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 49 | #ifndef cl_khr_byte_addressable_store |
| 50 | #error "Missing cl_khr_byte_addressable_store define" |
| 51 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 52 | #pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable |
| 53 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 54 | // expected-warning@-2{{OpenCL extension 'cl_khr_byte_addressable_store' is core feature or supported optional core feature - ignoring}} |
| 55 | #endif |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 56 | |
| 57 | #ifndef cl_khr_global_int32_base_atomics |
| 58 | #error "Missing cl_khr_global_int32_base_atomics define" |
| 59 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 60 | #pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable |
| 61 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 62 | // expected-warning@-2{{OpenCL extension 'cl_khr_global_int32_base_atomics' is core feature or supported optional core feature - ignoring}} |
| 63 | #endif |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 64 | |
| 65 | #ifndef cl_khr_global_int32_extended_atomics |
| 66 | #error "Missing cl_khr_global_int32_extended_atomics define" |
| 67 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 68 | #pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics : enable |
| 69 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 70 | // expected-warning@-2{{OpenCL extension 'cl_khr_global_int32_extended_atomics' is core feature or supported optional core feature - ignoring}} |
| 71 | #endif |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 72 | |
| 73 | #ifndef cl_khr_local_int32_base_atomics |
| 74 | #error "Missing cl_khr_local_int32_base_atomics define" |
| 75 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 76 | #pragma OPENCL EXTENSION cl_khr_local_int32_base_atomics : enable |
| 77 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 78 | // expected-warning@-2{{OpenCL extension 'cl_khr_local_int32_base_atomics' is core feature or supported optional core feature - ignoring}} |
| 79 | #endif |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 80 | |
| 81 | #ifndef cl_khr_local_int32_extended_atomics |
| 82 | #error "Missing cl_khr_local_int32_extended_atomics define" |
| 83 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 84 | #pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics : enable |
| 85 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 86 | // expected-warning@-2{{OpenCL extension 'cl_khr_local_int32_extended_atomics' is core feature or supported optional core feature - ignoring}} |
| 87 | #endif |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 88 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 89 | #if (defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ < 110) |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 90 | // Deprecated abvoe 1.0 |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 91 | #ifndef cl_khr_select_fprounding_mode |
| 92 | #error "Missing cl_khr_select_fp_rounding_mode define" |
| 93 | #endif |
| 94 | #pragma OPENCL EXTENSION cl_khr_select_fprounding_mode: enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 95 | #endif |
| 96 | |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 97 | |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 98 | // Core feature in CL 1.2 |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 99 | #ifndef cl_khr_fp64 |
| 100 | #error "Missing cl_khr_fp64 define" |
| 101 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 102 | #pragma OPENCL EXTENSION cl_khr_fp64 : enable |
| 103 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) && defined TEST_CORE_FEATURES |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 104 | // expected-warning@-2{{OpenCL extension 'cl_khr_fp64' is core feature or supported optional core feature - ignoring}} |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 105 | #endif |
| 106 | |
| 107 | //Core feature in CL 2.0 |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 108 | #ifndef cl_khr_3d_image_writes |
| 109 | #error "Missing cl_khr_3d_image_writes define" |
| 110 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 111 | #pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable |
| 112 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) && defined TEST_CORE_FEATURES |
Jan Vesely | 9efec1f | 2016-06-01 18:04:53 +0000 | [diff] [blame] | 113 | // expected-warning@-2{{OpenCL extension 'cl_khr_3d_image_writes' is core feature or supported optional core feature - ignoring}} |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 114 | #endif |
| 115 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 116 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 117 | #ifndef cl_khr_gl_event |
| 118 | #error "Missing cl_khr_gl_event define" |
| 119 | #endif |
| 120 | #else |
| 121 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_gl_event' - ignoring}} |
| 122 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 123 | #pragma OPENCL EXTENSION cl_khr_gl_event : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 124 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 125 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 126 | #ifndef cl_khr_d3d10_sharing |
| 127 | #error "Missing cl_khr_d3d10_sharing define" |
| 128 | #endif |
| 129 | #else |
| 130 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_d3d10_sharing' - ignoring}} |
| 131 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 132 | #pragma OPENCL EXTENSION cl_khr_d3d10_sharing : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 133 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 134 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 110) |
Alexey Bader | d2c67a7 | 2018-01-26 11:48:46 +0000 | [diff] [blame] | 135 | #ifndef cles_khr_int64 |
| 136 | #error "Missing cles_khr_int64 define" |
| 137 | #endif |
| 138 | #else |
| 139 | // expected-warning@+2{{unsupported OpenCL extension 'cles_khr_int64' - ignoring}} |
| 140 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 141 | #pragma OPENCL EXTENSION cles_khr_int64 : enable |
Alexey Bader | d2c67a7 | 2018-01-26 11:48:46 +0000 | [diff] [blame] | 142 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 143 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 144 | #ifndef cl_khr_context_abort |
| 145 | #error "Missing cl_context_abort define" |
| 146 | #endif |
| 147 | #else |
| 148 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_context_abort' - ignoring}} |
| 149 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 150 | #pragma OPENCL EXTENSION cl_khr_context_abort : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 151 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 152 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 153 | #ifndef cl_khr_d3d11_sharing |
| 154 | #error "Missing cl_khr_d3d11_sharing define" |
| 155 | #endif |
| 156 | #else |
| 157 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_d3d11_sharing' - ignoring}} |
| 158 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 159 | #pragma OPENCL EXTENSION cl_khr_d3d11_sharing : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 160 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 161 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 162 | #ifndef cl_khr_dx9_media_sharing |
| 163 | #error "Missing cl_khr_dx9_media_sharing define" |
| 164 | #endif |
| 165 | #else |
| 166 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_dx9_media_sharing' - ignoring}} |
| 167 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 168 | #pragma OPENCL EXTENSION cl_khr_dx9_media_sharing : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 169 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 170 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 171 | #ifndef cl_khr_image2d_from_buffer |
| 172 | #error "Missing cl_khr_image2d_from_buffer define" |
| 173 | #endif |
| 174 | #else |
| 175 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_image2d_from_buffer' - ignoring}} |
| 176 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 177 | #pragma OPENCL EXTENSION cl_khr_image2d_from_buffer : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 178 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 179 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 180 | #ifndef cl_khr_initialize_memory |
| 181 | #error "Missing cl_khr_initialize_memory define" |
| 182 | #endif |
| 183 | #else |
| 184 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_initialize_memory' - ignoring}} |
| 185 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 186 | #pragma OPENCL EXTENSION cl_khr_initialize_memory : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 187 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 188 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 189 | #ifndef cl_khr_gl_depth_images |
| 190 | #error "Missing cl_khr_gl_depth_images define" |
| 191 | #endif |
| 192 | #else |
| 193 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_gl_depth_images' - ignoring}} |
| 194 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 195 | #pragma OPENCL EXTENSION cl_khr_gl_depth_images : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 196 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 197 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 198 | #ifndef cl_khr_gl_msaa_sharing |
| 199 | #error "Missing cl_khr_gl_msaa_sharing define" |
| 200 | #endif |
| 201 | #else |
| 202 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring}} |
| 203 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 204 | #pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 205 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 206 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 207 | #ifndef cl_khr_spir |
| 208 | #error "Missing cl_khr_spir define" |
| 209 | #endif |
| 210 | #else |
| 211 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_spir' - ignoring}} |
| 212 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 213 | #pragma OPENCL EXTENSION cl_khr_spir : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 214 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 215 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 216 | #ifndef cl_khr_egl_event |
| 217 | #error "Missing cl_khr_egl_event define" |
| 218 | #endif |
| 219 | #else |
| 220 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_egl_event' - ignoring}} |
| 221 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 222 | #pragma OPENCL EXTENSION cl_khr_egl_event : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 223 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 224 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 225 | #ifndef cl_khr_egl_image |
| 226 | #error "Missing cl_khr_egl_image define" |
| 227 | #endif |
| 228 | #else |
| 229 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_egl_image' - ignoring}} |
| 230 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 231 | #pragma OPENCL EXTENSION cl_khr_egl_image : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 232 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 233 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) |
Yaxun Liu | 3f9e912 | 2016-07-29 17:52:34 +0000 | [diff] [blame] | 234 | #ifndef cl_khr_mipmap_image |
| 235 | #error "Missing cl_khr_mipmap_image define" |
| 236 | #endif |
| 237 | #else |
| 238 | #ifdef cl_khr_mipmap_image |
| 239 | #error "Incorrect cl_khr_mipmap_image define" |
| 240 | #endif |
| 241 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_mipmap_image' - ignoring}} |
| 242 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 243 | #pragma OPENCL EXTENSION cl_khr_mipmap_image : enable |
Yaxun Liu | 3f9e912 | 2016-07-29 17:52:34 +0000 | [diff] [blame] | 244 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 245 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 246 | #ifndef cl_khr_srgb_image_writes |
| 247 | #error "Missing cl_khr_srgb_image_writes define" |
| 248 | #endif |
| 249 | #else |
| 250 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_srgb_image_writes' - ignoring}} |
| 251 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 252 | #pragma OPENCL EXTENSION cl_khr_srgb_image_writes : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 253 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 254 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 255 | #ifndef cl_khr_subgroups |
| 256 | #error "Missing cl_khr_subgroups define" |
| 257 | #endif |
| 258 | #else |
Yaxun Liu | 9385680 | 2016-08-17 20:39:49 +0000 | [diff] [blame] | 259 | #ifdef cl_khr_subgroups |
| 260 | #error "Incorrect cl_khr_subgroups define" |
| 261 | #endif |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 262 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_subgroups' - ignoring}} |
| 263 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 264 | #pragma OPENCL EXTENSION cl_khr_subgroups : enable |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 265 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 266 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) |
Jan Vesely | e984cab | 2016-06-01 18:04:50 +0000 | [diff] [blame] | 267 | #ifndef cl_khr_terminate_context |
| 268 | #error "Missing cl_khr_terminate_context define" |
| 269 | #endif |
| 270 | #else |
| 271 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_terminate_context' - ignoring}} |
| 272 | #endif |
| 273 | #pragma OPENCL EXTENSION cl_khr_terminate_context: enable |
Yaxun Liu | 3317446 | 2016-08-16 20:49:49 +0000 | [diff] [blame] | 274 | |
| 275 | #ifndef cl_amd_media_ops |
| 276 | #error "Missing cl_amd_media_ops define" |
| 277 | #endif |
| 278 | #pragma OPENCL EXTENSION cl_amd_media_ops: enable |
| 279 | |
| 280 | #ifndef cl_amd_media_ops2 |
| 281 | #error "Missing cl_amd_media_ops2 define" |
| 282 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 283 | #pragma OPENCL EXTENSION cl_amd_media_ops2 : enable |
Yaxun Liu | 3317446 | 2016-08-16 20:49:49 +0000 | [diff] [blame] | 284 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 285 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Sven van Haastregt | d1f3002 | 2018-09-27 13:20:29 +0000 | [diff] [blame] | 286 | #ifndef cl_khr_depth_images |
| 287 | #error "Missing cl_khr_depth_images define" |
| 288 | #endif |
| 289 | #else |
| 290 | #ifdef cl_khr_depth_images |
| 291 | #error "Incorrect cl_khr_depth_images define" |
| 292 | #endif |
| 293 | // expected-warning@+2{{unsupported OpenCL extension 'cl_khr_depth_images' - ignoring}} |
| 294 | #endif |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 295 | #pragma OPENCL EXTENSION cl_khr_depth_images : enable |
Sven van Haastregt | d1f3002 | 2018-09-27 13:20:29 +0000 | [diff] [blame] | 296 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 297 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Alexey Sotkin | b833bf6 | 2017-11-27 09:14:17 +0000 | [diff] [blame] | 298 | #ifndef cl_intel_subgroups |
| 299 | #error "Missing cl_intel_subgroups define" |
| 300 | #endif |
| 301 | #else |
| 302 | // expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups' - ignoring}} |
| 303 | #endif |
| 304 | #pragma OPENCL EXTENSION cl_intel_subgroups : enable |
| 305 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 306 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Alexey Sotkin | b833bf6 | 2017-11-27 09:14:17 +0000 | [diff] [blame] | 307 | #ifndef cl_intel_subgroups_short |
| 308 | #error "Missing cl_intel_subgroups_short define" |
| 309 | #endif |
| 310 | #else |
| 311 | // expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups_short' - ignoring}} |
| 312 | #endif |
| 313 | #pragma OPENCL EXTENSION cl_intel_subgroups_short : enable |
| 314 | |
Anastasia Stulova | e88e2b9 | 2019-02-07 17:32:37 +0000 | [diff] [blame] | 315 | #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) |
Andrew Savonichev | 3fee351 | 2018-11-08 11:25:41 +0000 | [diff] [blame] | 316 | #ifndef cl_intel_device_side_avc_motion_estimation |
| 317 | #error "Missing cl_intel_device_side_avc_motion_estimation define" |
| 318 | #endif |
| 319 | #else |
| 320 | // expected-warning@+2{{unsupported OpenCL extension 'cl_intel_device_side_avc_motion_estimation' - ignoring}} |
| 321 | #endif |
| 322 | #pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : enable |
| 323 | |