| 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_D3D10_H_ |
| 18 |
#define OPENCL_CL_D3D10_H_ |
| 19 |
|
| 20 |
/* |
| 21 |
** This header is generated from the Khronos OpenCL XML API Registry. |
| 22 |
*/ |
| 23 |
|
| 24 |
#if defined(_MSC_VER) |
| 25 |
#if _MSC_VER >=1500 |
| 26 |
#pragma warning( push ) |
| 27 |
#pragma warning( disable : 4201 ) |
| 28 |
#pragma warning( disable : 5105 ) |
| 29 |
#endif |
| 30 |
#endif |
| 31 |
#include <d3d10.h> |
| 32 |
#if defined(_MSC_VER) |
| 33 |
#if _MSC_VER >=1500 |
| 34 |
#pragma warning( pop ) |
| 35 |
#endif |
| 36 |
#endif |
| 37 |
|
| 38 |
#include <CL/cl.h> |
| 39 |
|
| 40 |
/* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */ |
| 41 |
#if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES) |
| 42 |
#define CL_NO_EXTENSION_PROTOTYPES |
| 43 |
#endif |
| 44 |
|
| 45 |
/* CL_NO_EXTENSION_PROTOTYPES implies |
| 46 |
CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and |
| 47 |
CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */ |
| 48 |
#if defined(CL_NO_EXTENSION_PROTOTYPES) && \ |
| 49 |
!defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
| 50 |
#define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES |
| 51 |
#endif |
| 52 |
#if defined(CL_NO_EXTENSION_PROTOTYPES) && \ |
| 53 |
!defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
| 54 |
#define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES |
| 55 |
#endif |
| 56 |
|
| 57 |
#ifdef __cplusplus |
| 58 |
extern "C" { |
| 59 |
#endif |
| 60 |
|
| 61 |
/*************************************************************** |
| 62 |
* cl_khr_d3d10_sharing |
| 63 |
***************************************************************/ |
| 64 |
#define cl_khr_d3d10_sharing 1 |
| 65 |
#define CL_KHR_D3D10_SHARING_EXTENSION_NAME \ |
| 66 |
"cl_khr_d3d10_sharing" |
| 67 |
|
| 68 |
|
| 69 |
#define CL_KHR_D3D10_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) |
| 70 |
|
| 71 |
typedef cl_uint cl_d3d10_device_source_khr; |
| 72 |
typedef cl_uint cl_d3d10_device_set_khr; |
| 73 |
|
| 74 |
/* Error codes */ |
| 75 |
#define CL_INVALID_D3D10_DEVICE_KHR -1002 |
| 76 |
#define CL_INVALID_D3D10_RESOURCE_KHR -1003 |
| 77 |
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004 |
| 78 |
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005 |
| 79 |
|
| 80 |
/* cl_d3d10_device_source_khr */ |
| 81 |
#define CL_D3D10_DEVICE_KHR 0x4010 |
| 82 |
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011 |
| 83 |
|
| 84 |
/* cl_d3d10_device_set_khr */ |
| 85 |
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012 |
| 86 |
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013 |
| 87 |
|
| 88 |
/* cl_context_info */ |
| 89 |
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014 |
| 90 |
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C |
| 91 |
|
| 92 |
/* cl_mem_info */ |
| 93 |
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015 |
| 94 |
|
| 95 |
/* cl_image_info */ |
| 96 |
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016 |
| 97 |
|
| 98 |
/* cl_command_type */ |
| 99 |
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017 |
| 100 |
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018 |
| 101 |
|
| 102 |
|
| 103 |
typedef cl_int CL_API_CALL |
| 104 |
clGetDeviceIDsFromD3D10KHR_t( |
| 105 |
cl_platform_id platform, |
| 106 |
cl_d3d10_device_source_khr d3d_device_source, |
| 107 |
void* d3d_object, |
| 108 |
cl_d3d10_device_set_khr d3d_device_set, |
| 109 |
cl_uint num_entries, |
| 110 |
cl_device_id* devices, |
| 111 |
cl_uint* num_devices); |
| 112 |
|
| 113 |
typedef clGetDeviceIDsFromD3D10KHR_t * |
| 114 |
clGetDeviceIDsFromD3D10KHR_fn CL_API_SUFFIX__VERSION_1_0; |
| 115 |
|
| 116 |
typedef cl_mem CL_API_CALL |
| 117 |
clCreateFromD3D10BufferKHR_t( |
| 118 |
cl_context context, |
| 119 |
cl_mem_flags flags, |
| 120 |
ID3D10Buffer* resource, |
| 121 |
cl_int* errcode_ret); |
| 122 |
|
| 123 |
typedef clCreateFromD3D10BufferKHR_t * |
| 124 |
clCreateFromD3D10BufferKHR_fn CL_API_SUFFIX__VERSION_1_0; |
| 125 |
|
| 126 |
typedef cl_mem CL_API_CALL |
| 127 |
clCreateFromD3D10Texture2DKHR_t( |
| 128 |
cl_context context, |
| 129 |
cl_mem_flags flags, |
| 130 |
ID3D10Texture2D* resource, |
| 131 |
UINT subresource, |
| 132 |
cl_int* errcode_ret); |
| 133 |
|
| 134 |
typedef clCreateFromD3D10Texture2DKHR_t * |
| 135 |
clCreateFromD3D10Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_0; |
| 136 |
|
| 137 |
typedef cl_mem CL_API_CALL |
| 138 |
clCreateFromD3D10Texture3DKHR_t( |
| 139 |
cl_context context, |
| 140 |
cl_mem_flags flags, |
| 141 |
ID3D10Texture3D* resource, |
| 142 |
UINT subresource, |
| 143 |
cl_int* errcode_ret); |
| 144 |
|
| 145 |
typedef clCreateFromD3D10Texture3DKHR_t * |
| 146 |
clCreateFromD3D10Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_0; |
| 147 |
|
| 148 |
typedef cl_int CL_API_CALL |
| 149 |
clEnqueueAcquireD3D10ObjectsKHR_t( |
| 150 |
cl_command_queue command_queue, |
| 151 |
cl_uint num_objects, |
| 152 |
const cl_mem* mem_objects, |
| 153 |
cl_uint num_events_in_wait_list, |
| 154 |
const cl_event* event_wait_list, |
| 155 |
cl_event* event); |
| 156 |
|
| 157 |
typedef clEnqueueAcquireD3D10ObjectsKHR_t * |
| 158 |
clEnqueueAcquireD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; |
| 159 |
|
| 160 |
typedef cl_int CL_API_CALL |
| 161 |
clEnqueueReleaseD3D10ObjectsKHR_t( |
| 162 |
cl_command_queue command_queue, |
| 163 |
cl_uint num_objects, |
| 164 |
const cl_mem* mem_objects, |
| 165 |
cl_uint num_events_in_wait_list, |
| 166 |
const cl_event* event_wait_list, |
| 167 |
cl_event* event); |
| 168 |
|
| 169 |
typedef clEnqueueReleaseD3D10ObjectsKHR_t * |
| 170 |
clEnqueueReleaseD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; |
| 171 |
|
| 172 |
#if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
| 173 |
|
| 174 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 175 |
clGetDeviceIDsFromD3D10KHR( |
| 176 |
cl_platform_id platform, |
| 177 |
cl_d3d10_device_source_khr d3d_device_source, |
| 178 |
void* d3d_object, |
| 179 |
cl_d3d10_device_set_khr d3d_device_set, |
| 180 |
cl_uint num_entries, |
| 181 |
cl_device_id* devices, |
| 182 |
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0; |
| 183 |
|
| 184 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 185 |
clCreateFromD3D10BufferKHR( |
| 186 |
cl_context context, |
| 187 |
cl_mem_flags flags, |
| 188 |
ID3D10Buffer* resource, |
| 189 |
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 190 |
|
| 191 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 192 |
clCreateFromD3D10Texture2DKHR( |
| 193 |
cl_context context, |
| 194 |
cl_mem_flags flags, |
| 195 |
ID3D10Texture2D* resource, |
| 196 |
UINT subresource, |
| 197 |
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 198 |
|
| 199 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 200 |
clCreateFromD3D10Texture3DKHR( |
| 201 |
cl_context context, |
| 202 |
cl_mem_flags flags, |
| 203 |
ID3D10Texture3D* resource, |
| 204 |
UINT subresource, |
| 205 |
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
| 206 |
|
| 207 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 208 |
clEnqueueAcquireD3D10ObjectsKHR( |
| 209 |
cl_command_queue command_queue, |
| 210 |
cl_uint num_objects, |
| 211 |
const cl_mem* mem_objects, |
| 212 |
cl_uint num_events_in_wait_list, |
| 213 |
const cl_event* event_wait_list, |
| 214 |
cl_event* event) CL_API_SUFFIX__VERSION_1_0; |
| 215 |
|
| 216 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 217 |
clEnqueueReleaseD3D10ObjectsKHR( |
| 218 |
cl_command_queue command_queue, |
| 219 |
cl_uint num_objects, |
| 220 |
const cl_mem* mem_objects, |
| 221 |
cl_uint num_events_in_wait_list, |
| 222 |
const cl_event* event_wait_list, |
| 223 |
cl_event* event) CL_API_SUFFIX__VERSION_1_0; |
| 224 |
|
| 225 |
#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */ |
| 226 |
|
| 227 |
/*************************************************************** |
| 228 |
* cl_intel_sharing_format_query_d3d10 |
| 229 |
***************************************************************/ |
| 230 |
#define cl_intel_sharing_format_query_d3d10 1 |
| 231 |
#define CL_INTEL_SHARING_FORMAT_QUERY_D3D10_EXTENSION_NAME \ |
| 232 |
"cl_intel_sharing_format_query_d3d10" |
| 233 |
|
| 234 |
|
| 235 |
#define CL_INTEL_SHARING_FORMAT_QUERY_D3D10_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) |
| 236 |
|
| 237 |
/* when cl_khr_d3d10_sharing is supported */ |
| 238 |
|
| 239 |
typedef cl_int CL_API_CALL |
| 240 |
clGetSupportedD3D10TextureFormatsINTEL_t( |
| 241 |
cl_context context, |
| 242 |
cl_mem_flags flags, |
| 243 |
cl_mem_object_type image_type, |
| 244 |
cl_uint num_entries, |
| 245 |
DXGI_FORMAT* d3d10_formats, |
| 246 |
cl_uint* num_texture_formats); |
| 247 |
|
| 248 |
typedef clGetSupportedD3D10TextureFormatsINTEL_t * |
| 249 |
clGetSupportedD3D10TextureFormatsINTEL_fn ; |
| 250 |
|
| 251 |
#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
| 252 |
|
| 253 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 254 |
clGetSupportedD3D10TextureFormatsINTEL( |
| 255 |
cl_context context, |
| 256 |
cl_mem_flags flags, |
| 257 |
cl_mem_object_type image_type, |
| 258 |
cl_uint num_entries, |
| 259 |
DXGI_FORMAT* d3d10_formats, |
| 260 |
cl_uint* num_texture_formats) ; |
| 261 |
|
| 262 |
#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */ |
| 263 |
|
| 264 |
#ifdef __cplusplus |
| 265 |
} |
| 266 |
#endif |
| 267 |
|
| 268 |
#endif /* OPENCL_CL_D3D10_H_ */ |