Path: blob/master/3rdparty/include/opencl/1.2/CL/cl_d3d10.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_D3D10_H26#define __OPENCL_CL_D3D10_H2728#include <d3d10.h>29#include <CL/cl.h>30#include <CL/cl_platform.h>3132#ifdef __cplusplus33extern "C" {34#endif3536/******************************************************************************37* cl_khr_d3d10_sharing */38#define cl_khr_d3d10_sharing 13940typedef cl_uint cl_d3d10_device_source_khr;41typedef cl_uint cl_d3d10_device_set_khr;4243/******************************************************************************/4445// Error Codes46#define CL_INVALID_D3D10_DEVICE_KHR -100247#define CL_INVALID_D3D10_RESOURCE_KHR -100348#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -100449#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -10055051// cl_d3d10_device_source_nv52#define CL_D3D10_DEVICE_KHR 0x401053#define CL_D3D10_DXGI_ADAPTER_KHR 0x40115455// cl_d3d10_device_set_nv56#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x401257#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x40135859// cl_context_info60#define CL_CONTEXT_D3D10_DEVICE_KHR 0x401461#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C6263// cl_mem_info64#define CL_MEM_D3D10_RESOURCE_KHR 0x40156566// cl_image_info67#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x40166869// cl_command_type70#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x401771#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x40187273/******************************************************************************/7475typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(76cl_platform_id platform,77cl_d3d10_device_source_khr d3d_device_source,78void * d3d_object,79cl_d3d10_device_set_khr d3d_device_set,80cl_uint num_entries,81cl_device_id * devices,82cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;8384typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(85cl_context context,86cl_mem_flags flags,87ID3D10Buffer * resource,88cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;8990typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(91cl_context context,92cl_mem_flags flags,93ID3D10Texture2D * resource,94UINT subresource,95cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;9697typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(98cl_context context,99cl_mem_flags flags,100ID3D10Texture3D * resource,101UINT subresource,102cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;103104typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_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_0;111112typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_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_0;119120#ifdef __cplusplus121}122#endif123124#endif // __OPENCL_CL_D3D10_H125126127128