Path: blob/master/3rdparty/include/opencl/1.2/CL/cl_d3d11.h
16348 views
/**********************************************************************************1* Copyright (c) 2008-2012 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* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,15* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF16* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.17* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY18* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,19* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE20* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.21**********************************************************************************/2223/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */2425#ifndef __OPENCL_CL_D3D11_H26#define __OPENCL_CL_D3D11_H2728#include <d3d11.h>29#include <CL/cl.h>30#include <CL/cl_platform.h>3132#ifdef __cplusplus33extern "C" {34#endif3536/******************************************************************************37* cl_khr_d3d11_sharing */38#define cl_khr_d3d11_sharing 13940typedef cl_uint cl_d3d11_device_source_khr;41typedef cl_uint cl_d3d11_device_set_khr;4243/******************************************************************************/4445// Error Codes46#define CL_INVALID_D3D11_DEVICE_KHR -100647#define CL_INVALID_D3D11_RESOURCE_KHR -100748#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -100849#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -10095051// cl_d3d11_device_source52#define CL_D3D11_DEVICE_KHR 0x401953#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A5455// cl_d3d11_device_set56#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B57#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C5859// cl_context_info60#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D61#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D6263// cl_mem_info64#define CL_MEM_D3D11_RESOURCE_KHR 0x401E6566// cl_image_info67#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F6869// cl_command_type70#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x402071#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x40217273/******************************************************************************/7475typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(76cl_platform_id platform,77cl_d3d11_device_source_khr d3d_device_source,78void * d3d_object,79cl_d3d11_device_set_khr d3d_device_set,80cl_uint num_entries,81cl_device_id * devices,82cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;8384typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(85cl_context context,86cl_mem_flags flags,87ID3D11Buffer * resource,88cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;8990typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(91cl_context context,92cl_mem_flags flags,93ID3D11Texture2D * resource,94UINT subresource,95cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;9697typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(98cl_context context,99cl_mem_flags flags,100ID3D11Texture3D * resource,101UINT subresource,102cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;103104typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(105cl_command_queue command_queue,106cl_uint num_objects,107const cl_mem * mem_objects,108cl_uint num_events_in_wait_list,109const cl_event * event_wait_list,110cl_event * event) CL_API_SUFFIX__VERSION_1_2;111112typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(113cl_command_queue command_queue,114cl_uint num_objects,115const cl_mem * mem_objects,116cl_uint num_events_in_wait_list,117const cl_event * event_wait_list,118cl_event * event) CL_API_SUFFIX__VERSION_1_2;119120#ifdef __cplusplus121}122#endif123124#endif // __OPENCL_CL_D3D11_H125126127128