xref: /aosp_15_r20/external/OpenCL-ICD-Loader/loader/icd_dispatch.h (revision 1cddb830dba8aa7c1cc1039338e56b3b9fa24952)
1 /*
2  * Copyright (c) 2016-2019 The Khronos Group Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * OpenCL is a trademark of Apple Inc. used under license by Khronos.
17  */
18 
19 #ifndef _ICD_DISPATCH_H_
20 #define _ICD_DISPATCH_H_
21 
22 #ifndef CL_USE_DEPRECATED_OPENCL_1_0_APIS
23 #define CL_USE_DEPRECATED_OPENCL_1_0_APIS
24 #endif
25 
26 #ifndef CL_USE_DEPRECATED_OPENCL_1_1_APIS
27 #define CL_USE_DEPRECATED_OPENCL_1_1_APIS
28 #endif
29 
30 #ifndef CL_USE_DEPRECATED_OPENCL_1_2_APIS
31 #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
32 #endif
33 
34 #ifndef CL_USE_DEPRECATED_OPENCL_2_0_APIS
35 #define CL_USE_DEPRECATED_OPENCL_2_0_APIS
36 #endif
37 
38 #ifndef CL_USE_DEPRECATED_OPENCL_2_1_APIS
39 #define CL_USE_DEPRECATED_OPENCL_2_1_APIS
40 #endif
41 
42 #ifndef CL_USE_DEPRECATED_OPENCL_2_2_APIS
43 #define CL_USE_DEPRECATED_OPENCL_2_2_APIS
44 #endif
45 
46 // cl.h
47 #include <CL/cl.h>
48 
49 // cl_gl.h and required files
50 #ifdef _WIN32
51 #include <windows.h>
52 #include <d3d9.h>
53 #include <d3d10_1.h>
54 #include <CL/cl_d3d10.h>
55 #include <CL/cl_d3d11.h>
56 #include <CL/cl_dx9_media_sharing.h>
57 #endif
58 #include <CL/cl_gl.h>
59 #include <CL/cl_ext.h>
60 #include <CL/cl_egl.h>
61 #include <CL/cl_icd.h>
62 
63 /*
64  *
65  * vendor dispatch table structure
66  *
67  */
68 
69 struct _cl_platform_id
70 {
71     cl_icd_dispatch *dispatch;
72 };
73 
74 struct _cl_device_id
75 {
76     cl_icd_dispatch *dispatch;
77 };
78 
79 struct _cl_context
80 {
81     cl_icd_dispatch *dispatch;
82 };
83 
84 struct _cl_command_queue
85 {
86     cl_icd_dispatch *dispatch;
87 };
88 
89 struct _cl_mem
90 {
91     cl_icd_dispatch *dispatch;
92 };
93 
94 struct _cl_program
95 {
96     cl_icd_dispatch *dispatch;
97 };
98 
99 struct _cl_kernel
100 {
101     cl_icd_dispatch *dispatch;
102 };
103 
104 struct _cl_event
105 {
106     cl_icd_dispatch *dispatch;
107 };
108 
109 struct _cl_sampler
110 {
111     cl_icd_dispatch *dispatch;
112 };
113 
114 #endif // _ICD_DISPATCH_H_
115 
116