/**********************************************************************************1* Copyright (c) 2008-2015 The Khronos Group Inc.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and/or associated documentation files (the5* "Materials"), to deal in the Materials without restriction, including6* without limitation the rights to use, copy, modify, merge, publish,7* distribute, sublicense, and/or sell copies of the Materials, and to8* permit persons to whom the Materials are furnished to do so, subject to9* the following conditions:10*11* The above copyright notice and this permission notice shall be included12* in all copies or substantial portions of the Materials.13*14* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS15* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS16* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT17* https://www.khronos.org/registry/18*19* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,20* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF21* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.22* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY23* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,24* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE25* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.26**********************************************************************************/2728/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */2930#ifndef __OPENCL_CL_D3D11_H31#define __OPENCL_CL_D3D11_H3233#include <d3d11.h>34#include <CL/cl.h>35#include <CL/cl_platform.h>3637#ifdef __cplusplus38extern "C" {39#endif4041/******************************************************************************42* cl_khr_d3d11_sharing */43#define cl_khr_d3d11_sharing 14445typedef cl_uint cl_d3d11_device_source_khr;46typedef cl_uint cl_d3d11_device_set_khr;4748/******************************************************************************/4950/* Error Codes */51#define CL_INVALID_D3D11_DEVICE_KHR -100652#define CL_INVALID_D3D11_RESOURCE_KHR -100753#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -100854#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -10095556/* cl_d3d11_device_source */57#define CL_D3D11_DEVICE_KHR 0x401958#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A5960/* cl_d3d11_device_set */61#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B62#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C6364/* cl_context_info */65#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D66#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D6768/* cl_mem_info */69#define CL_MEM_D3D11_RESOURCE_KHR 0x401E7071/* cl_image_info */72#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F7374/* cl_command_type */75#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x402076#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x40217778/******************************************************************************/7980typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(81cl_platform_id platform,82cl_d3d11_device_source_khr d3d_device_source,83void * d3d_object,84cl_d3d11_device_set_khr d3d_device_set,85cl_uint num_entries,86cl_device_id * devices,87cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;8889typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(90cl_context context,91cl_mem_flags flags,92ID3D11Buffer * resource,93cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;9495typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(96cl_context context,97cl_mem_flags flags,98ID3D11Texture2D * resource,99UINT subresource,100cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;101102typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(103cl_context context,104cl_mem_flags flags,105ID3D11Texture3D * resource,106UINT subresource,107cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;108109typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(110cl_command_queue command_queue,111cl_uint num_objects,112const cl_mem * mem_objects,113cl_uint num_events_in_wait_list,114const cl_event * event_wait_list,115cl_event * event) CL_API_SUFFIX__VERSION_1_2;116117typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(118cl_command_queue command_queue,119cl_uint num_objects,120const cl_mem * mem_objects,121cl_uint num_events_in_wait_list,122const cl_event * event_wait_list,123cl_event * event) CL_API_SUFFIX__VERSION_1_2;124125#ifdef __cplusplus126}127#endif128129#endif /* __OPENCL_CL_D3D11_H */130131132133