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.
36OPENCLEXT_INTERNAL(cl_khr_3d_image_writes, 100, 200)
37// fprounding mode is special since it is not mentioned beyond 1.0
38OPENCLEXT_INTERNAL(cl_khr_select_fprounding_mode, 100, 110)
39OPENCLEXT_INTERNAL(cl_khr_byte_addressable_store, 100, 110)
40OPENCLEXT_INTERNAL(cl_khr_fp16, 100, ~0U)
41OPENCLEXT_INTERNAL(cl_khr_fp64, 100, 120)
42OPENCLEXT_INTERNAL(cl_khr_global_int32_base_atomics, 100, 110)
43OPENCLEXT_INTERNAL(cl_khr_global_int32_extended_atomics, 100, 110)
44OPENCLEXT_INTERNAL(cl_khr_local_int32_base_atomics, 100, 110)
45OPENCLEXT_INTERNAL(cl_khr_local_int32_extended_atomics, 100, 110)
46OPENCLEXT_INTERNAL(cl_khr_int64_base_atomics, 100, ~0U)
47OPENCLEXT_INTERNAL(cl_khr_int64_extended_atomics, 100, ~0U)
48OPENCLEXT_INTERNAL(cl_khr_gl_sharing, 100, ~0U)
49OPENCLEXT_INTERNAL(cl_khr_icd, 100, ~0U)
50
51// OpenCL 1.1.
52OPENCLEXT_INTERNAL(cl_khr_gl_event, 110, ~0U)
53OPENCLEXT_INTERNAL(cl_khr_d3d10_sharing, 110, ~0U)
54
55// EMBEDDED_PROFILE
56OPENCLEXT_INTERNAL(cles_khr_int64, 110, ~0U)
57
58// OpenCL 1.2.
59OPENCLEXT_INTERNAL(cl_khr_context_abort, 120, ~0U)
60OPENCLEXT_INTERNAL(cl_khr_d3d11_sharing, 120, ~0U)
61OPENCLEXT_INTERNAL(cl_khr_depth_images, 120, ~0U)
62OPENCLEXT_INTERNAL(cl_khr_dx9_media_sharing, 120, ~0U)
63OPENCLEXT_INTERNAL(cl_khr_image2d_from_buffer, 120, ~0U)
64OPENCLEXT_INTERNAL(cl_khr_initialize_memory, 120, ~0U)
65OPENCLEXT_INTERNAL(cl_khr_gl_depth_images, 120, ~0U)
66OPENCLEXT_INTERNAL(cl_khr_gl_msaa_sharing, 120, ~0U)
67OPENCLEXT_INTERNAL(cl_khr_spir, 120, ~0U)
68
69// OpenCL 2.0.
70OPENCLEXT_INTERNAL(cl_khr_egl_event, 200, ~0U)
71OPENCLEXT_INTERNAL(cl_khr_egl_image, 200, ~0U)
72OPENCLEXT_INTERNAL(cl_khr_mipmap_image, 200, ~0U)
73OPENCLEXT_INTERNAL(cl_khr_srgb_image_writes, 200, ~0U)
74OPENCLEXT_INTERNAL(cl_khr_subgroups, 200, ~0U)
75OPENCLEXT_INTERNAL(cl_khr_terminate_context, 200, ~0U)
76
77// Clang Extensions.
78OPENCLEXT_INTERNAL(cl_clang_storage_class_specifiers, 100, ~0U)
79
80// AMD OpenCL extensions
81OPENCLEXT_INTERNAL(cl_amd_media_ops, 100, ~0U)
82OPENCLEXT_INTERNAL(cl_amd_media_ops2, 100, ~0U)
83
84// ARM OpenCL extensions
85OPENCLEXT_INTERNAL(cl_arm_integer_dot_product_int8, 120, ~0U)
86OPENCLEXT_INTERNAL(cl_arm_integer_dot_product_accumulate_int8, 120, ~0U)
87OPENCLEXT_INTERNAL(cl_arm_integer_dot_product_accumulate_int16, 120, ~0U)
88OPENCLEXT_INTERNAL(cl_arm_integer_dot_product_accumulate_saturate_int8, 120, ~0U)
89
90// Intel OpenCL extensions
91OPENCLEXT_INTERNAL(cl_intel_subgroups, 120, ~0U)
92OPENCLEXT_INTERNAL(cl_intel_subgroups_short, 120, ~0U)
93OPENCLEXT_INTERNAL(cl_intel_device_side_avc_motion_estimation, 120, ~0U)
94
95#undef OPENCLEXT_INTERNAL
96
97#ifdef OPENCLEXT
98#undef OPENCLEXT
99#endif
100