xref: /aosp_15_r20/external/angle/include/CL/cl_layer.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 /*******************************************************************************
2  * Copyright (c) 2008-2023 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 
17 #ifndef OPENCL_CL_LAYER_H_
18 #define OPENCL_CL_LAYER_H_
19 
20 /*
21 ** This header is generated from the Khronos OpenCL XML API Registry.
22 */
23 
24 #include <CL/cl_icd.h>
25 
26 #include <CL/cl.h>
27 
28 /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
29 #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
30 #define CL_NO_EXTENSION_PROTOTYPES
31 #endif
32 
33 /* CL_NO_EXTENSION_PROTOTYPES implies
34    CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
35    CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
36 #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
37     !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
38 #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
39 #endif
40 #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
41     !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
42 #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
43 #endif
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /***************************************************************
50 * cl_loader_layers
51 ***************************************************************/
52 #define cl_loader_layers 1
53 #define CL_LOADER_LAYERS_EXTENSION_NAME \
54     "cl_loader_layers"
55 
56 typedef cl_uint             cl_layer_info;
57 typedef cl_uint             cl_layer_api_version;
58 
59 /* cl_layer_info */
60 #define CL_LAYER_API_VERSION                                0x4240
61 #define CL_LAYER_NAME                                       0x4241
62 
63 /* Misc API enums */
64 #define CL_LAYER_API_VERSION_100                            100
65 
66 
67 typedef cl_int CL_API_CALL
68 clGetLayerInfo_t(
69     cl_layer_info param_name,
70     size_t param_value_size,
71     void* param_value,
72     size_t* param_value_size_ret);
73 
74 typedef clGetLayerInfo_t *
75 clGetLayerInfo_fn ;
76 
77 typedef cl_int CL_API_CALL
78 clInitLayer_t(
79     cl_uint num_entries,
80     const cl_icd_dispatch* target_dispatch,
81     cl_uint* num_entries_ret,
82     const cl_icd_dispatch** layer_dispatch_ret);
83 
84 typedef clInitLayer_t *
85 clInitLayer_fn ;
86 
87 /*
88 ** The function pointer typedefs prefixed with "pfn_" are provided for
89 ** compatibility with earlier versions of the headers.  New code is
90 ** encouraged to use the function pointer typedefs that are suffixed with
91 ** "_fn" instead, for consistency.
92 */
93 
94 typedef clGetLayerInfo_t *
95 pfn_clGetLayerInfo ;
96 
97 typedef clInitLayer_t *
98 pfn_clInitLayer ;
99 
100 #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
101 
102 extern CL_API_ENTRY cl_int CL_API_CALL
103 clGetLayerInfo(
104     cl_layer_info param_name,
105     size_t param_value_size,
106     void* param_value,
107     size_t* param_value_size_ret) ;
108 
109 extern CL_API_ENTRY cl_int CL_API_CALL
110 clInitLayer(
111     cl_uint num_entries,
112     const cl_icd_dispatch* target_dispatch,
113     cl_uint* num_entries_ret,
114     const cl_icd_dispatch** layer_dispatch_ret) ;
115 
116 #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif /* OPENCL_CL_LAYER_H_ */
123