1 | //===--- OpenCLExtensions.def - OpenCL extension list -----------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | // |
9 | // This file defines the list of supported OpenCL extensions. |
10 | // |
11 | //===----------------------------------------------------------------------===// |
12 | |
13 | // Macro OPENCLEXT or OPENCLEXT_INTERNAL can be defined to enumerate the |
14 | // OpenCL extensions listed in this file. |
15 | // |
16 | // If the extensions are to be enumerated without the supported OpenCL version, |
17 | // define OPENCLEXT(ext) where ext is the name of the extension. |
18 | // |
19 | // If the extensions are to be enumerated with supported OpenCL version, |
20 | // define OPENCLEXT_INTERNAL(ext, avail, core) where |
21 | // ext - name of the extension or optional core feature. |
22 | // avail - minimum OpenCL version supporting it. |
23 | // core - minimum OpenCL version when the extension becomes optional core |
24 | // feature or core feature. ~0U indicates not a core feature or an |
25 | // optional core feature. |
26 | |
27 | #ifndef OPENCLEXT_INTERNAL |
28 | #ifndef OPENCLEXT |
29 | #pragma error "macro OPENCLEXT or OPENCLEXT_INTERNAL is required" |
30 | #else |
31 | #define OPENCLEXT_INTERNAL(ext, ...) OPENCLEXT(ext) |
32 | #endif // OPENCLEXT |
33 | #endif // OPENCLEXT_INTERNAL |
34 | |
35 | // OpenCL 1.0. |
36 | OPENCLEXT_INTERNAL(cl_khr_3d_image_writes, 100, 200) |
37 | // fprounding mode is special since it is not mentioned beyond 1.0 |
38 | OPENCLEXT_INTERNAL(cl_khr_select_fprounding_mode, 100, 110) |
39 | OPENCLEXT_INTERNAL(cl_khr_byte_addressable_store, 100, 110) |
40 | OPENCLEXT_INTERNAL(cl_khr_fp16, 100, ~0U) |
41 | OPENCLEXT_INTERNAL(cl_khr_fp64, 100, 120) |
42 | OPENCLEXT_INTERNAL(cl_khr_global_int32_base_atomics, 100, 110) |
43 | OPENCLEXT_INTERNAL(cl_khr_global_int32_extended_atomics, 100, 110) |
44 | OPENCLEXT_INTERNAL(cl_khr_local_int32_base_atomics, 100, 110) |
45 | OPENCLEXT_INTERNAL(cl_khr_local_int32_extended_atomics, 100, 110) |
46 | OPENCLEXT_INTERNAL(cl_khr_int64_base_atomics, 100, ~0U) |
47 | OPENCLEXT_INTERNAL(cl_khr_int64_extended_atomics, 100, ~0U) |
48 | OPENCLEXT_INTERNAL(cl_khr_gl_sharing, 100, ~0U) |
49 | OPENCLEXT_INTERNAL(cl_khr_icd, 100, ~0U) |
50 | |
51 | // OpenCL 1.1. |
52 | OPENCLEXT_INTERNAL(cl_khr_gl_event, 110, ~0U) |
53 | OPENCLEXT_INTERNAL(cl_khr_d3d10_sharing, 110, ~0U) |
54 | |
55 | // EMBEDDED_PROFILE |
56 | OPENCLEXT_INTERNAL(cles_khr_int64, 110, ~0U) |
57 | |
58 | // OpenCL 1.2. |
59 | OPENCLEXT_INTERNAL(cl_khr_context_abort, 120, ~0U) |
60 | OPENCLEXT_INTERNAL(cl_khr_d3d11_sharing, 120, ~0U) |
61 | OPENCLEXT_INTERNAL(cl_khr_depth_images, 120, ~0U) |
62 | OPENCLEXT_INTERNAL(cl_khr_dx9_media_sharing, 120, ~0U) |
63 | OPENCLEXT_INTERNAL(cl_khr_image2d_from_buffer, 120, ~0U) |
64 | OPENCLEXT_INTERNAL(cl_khr_initialize_memory, 120, ~0U) |
65 | OPENCLEXT_INTERNAL(cl_khr_gl_depth_images, 120, ~0U) |
66 | OPENCLEXT_INTERNAL(cl_khr_gl_msaa_sharing, 120, ~0U) |
67 | OPENCLEXT_INTERNAL(cl_khr_spir, 120, ~0U) |
68 | |
69 | // OpenCL 2.0. |
70 | OPENCLEXT_INTERNAL(cl_khr_egl_event, 200, ~0U) |
71 | OPENCLEXT_INTERNAL(cl_khr_egl_image, 200, ~0U) |
72 | OPENCLEXT_INTERNAL(cl_khr_mipmap_image, 200, ~0U) |
73 | OPENCLEXT_INTERNAL(cl_khr_srgb_image_writes, 200, ~0U) |
74 | OPENCLEXT_INTERNAL(cl_khr_subgroups, 200, ~0U) |
75 | OPENCLEXT_INTERNAL(cl_khr_terminate_context, 200, ~0U) |
76 | |
77 | // Clang Extensions. |
78 | OPENCLEXT_INTERNAL(cl_clang_storage_class_specifiers, 100, ~0U) |
79 | |
80 | // AMD OpenCL extensions |
81 | OPENCLEXT_INTERNAL(cl_amd_media_ops, 100, ~0U) |
82 | OPENCLEXT_INTERNAL(cl_amd_media_ops2, 100, ~0U) |
83 | |
84 | // Intel OpenCL extensions |
85 | OPENCLEXT_INTERNAL(cl_intel_subgroups, 120, ~0U) |
86 | OPENCLEXT_INTERNAL(cl_intel_subgroups_short, 120, ~0U) |
87 | OPENCLEXT_INTERNAL(cl_intel_device_side_avc_motion_estimation, 120, ~0U) |
88 | |
89 | #undef OPENCLEXT_INTERNAL |
90 | |
91 | #ifdef OPENCLEXT |
92 | #undef OPENCLEXT |
93 | #endif |
94 | |