1af69d88dSmrg/********************************************************************************** 253c12917Smaya * Copyright (c) 2008-2015 The Khronos Group Inc. 3af69d88dSmrg * 4af69d88dSmrg * Permission is hereby granted, free of charge, to any person obtaining a 5af69d88dSmrg * copy of this software and/or associated documentation files (the 6af69d88dSmrg * "Materials"), to deal in the Materials without restriction, including 7af69d88dSmrg * without limitation the rights to use, copy, modify, merge, publish, 8af69d88dSmrg * distribute, sublicense, and/or sell copies of the Materials, and to 9af69d88dSmrg * permit persons to whom the Materials are furnished to do so, subject to 10af69d88dSmrg * the following conditions: 11af69d88dSmrg * 12af69d88dSmrg * The above copyright notice and this permission notice shall be included 13af69d88dSmrg * in all copies or substantial portions of the Materials. 14af69d88dSmrg * 1553c12917Smaya * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS 1653c12917Smaya * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS 1753c12917Smaya * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT 1853c12917Smaya * https://www.khronos.org/registry/ 1953c12917Smaya * 20af69d88dSmrg * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21af69d88dSmrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22af69d88dSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23af69d88dSmrg * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24af69d88dSmrg * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25af69d88dSmrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26af69d88dSmrg * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 27af69d88dSmrg **********************************************************************************/ 28af69d88dSmrg 2953c12917Smaya/* $Revision: 1.1.1.2 $ on $Date: 2019/09/24 16:23:50 $ */ 30af69d88dSmrg 31af69d88dSmrg#ifndef __OPENCL_CL_D3D10_H 32af69d88dSmrg#define __OPENCL_CL_D3D10_H 33af69d88dSmrg 34af69d88dSmrg#include <d3d10.h> 35af69d88dSmrg#include <CL/cl.h> 36af69d88dSmrg#include <CL/cl_platform.h> 37af69d88dSmrg 38af69d88dSmrg#ifdef __cplusplus 39af69d88dSmrgextern "C" { 40af69d88dSmrg#endif 41af69d88dSmrg 42af69d88dSmrg/****************************************************************************** 43af69d88dSmrg * cl_khr_d3d10_sharing */ 44af69d88dSmrg#define cl_khr_d3d10_sharing 1 45af69d88dSmrg 46af69d88dSmrgtypedef cl_uint cl_d3d10_device_source_khr; 47af69d88dSmrgtypedef cl_uint cl_d3d10_device_set_khr; 48af69d88dSmrg 49af69d88dSmrg/******************************************************************************/ 50af69d88dSmrg 51af69d88dSmrg/* Error Codes */ 52af69d88dSmrg#define CL_INVALID_D3D10_DEVICE_KHR -1002 53af69d88dSmrg#define CL_INVALID_D3D10_RESOURCE_KHR -1003 54af69d88dSmrg#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004 55af69d88dSmrg#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005 56af69d88dSmrg 57af69d88dSmrg/* cl_d3d10_device_source_nv */ 58af69d88dSmrg#define CL_D3D10_DEVICE_KHR 0x4010 59af69d88dSmrg#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011 60af69d88dSmrg 61af69d88dSmrg/* cl_d3d10_device_set_nv */ 62af69d88dSmrg#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012 63af69d88dSmrg#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013 64af69d88dSmrg 65af69d88dSmrg/* cl_context_info */ 66af69d88dSmrg#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014 67af69d88dSmrg#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C 68af69d88dSmrg 69af69d88dSmrg/* cl_mem_info */ 70af69d88dSmrg#define CL_MEM_D3D10_RESOURCE_KHR 0x4015 71af69d88dSmrg 72af69d88dSmrg/* cl_image_info */ 73af69d88dSmrg#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016 74af69d88dSmrg 75af69d88dSmrg/* cl_command_type */ 76af69d88dSmrg#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017 77af69d88dSmrg#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018 78af69d88dSmrg 79af69d88dSmrg/******************************************************************************/ 80af69d88dSmrg 81af69d88dSmrgtypedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)( 82af69d88dSmrg cl_platform_id platform, 83af69d88dSmrg cl_d3d10_device_source_khr d3d_device_source, 84af69d88dSmrg void * d3d_object, 85af69d88dSmrg cl_d3d10_device_set_khr d3d_device_set, 86af69d88dSmrg cl_uint num_entries, 87af69d88dSmrg cl_device_id * devices, 88af69d88dSmrg cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0; 89af69d88dSmrg 90af69d88dSmrgtypedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)( 91af69d88dSmrg cl_context context, 92af69d88dSmrg cl_mem_flags flags, 93af69d88dSmrg ID3D10Buffer * resource, 94af69d88dSmrg cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 95af69d88dSmrg 96af69d88dSmrgtypedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)( 97af69d88dSmrg cl_context context, 98af69d88dSmrg cl_mem_flags flags, 99af69d88dSmrg ID3D10Texture2D * resource, 100af69d88dSmrg UINT subresource, 101af69d88dSmrg cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 102af69d88dSmrg 103af69d88dSmrgtypedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)( 104af69d88dSmrg cl_context context, 105af69d88dSmrg cl_mem_flags flags, 106af69d88dSmrg ID3D10Texture3D * resource, 107af69d88dSmrg UINT subresource, 108af69d88dSmrg cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; 109af69d88dSmrg 110af69d88dSmrgtypedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)( 111af69d88dSmrg cl_command_queue command_queue, 112af69d88dSmrg cl_uint num_objects, 113af69d88dSmrg const cl_mem * mem_objects, 114af69d88dSmrg cl_uint num_events_in_wait_list, 115af69d88dSmrg const cl_event * event_wait_list, 116af69d88dSmrg cl_event * event) CL_API_SUFFIX__VERSION_1_0; 117af69d88dSmrg 118af69d88dSmrgtypedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)( 119af69d88dSmrg cl_command_queue command_queue, 120af69d88dSmrg cl_uint num_objects, 121af69d88dSmrg const cl_mem * mem_objects, 122af69d88dSmrg cl_uint num_events_in_wait_list, 123af69d88dSmrg const cl_event * event_wait_list, 124af69d88dSmrg cl_event * event) CL_API_SUFFIX__VERSION_1_0; 125af69d88dSmrg 126af69d88dSmrg#ifdef __cplusplus 127af69d88dSmrg} 128af69d88dSmrg#endif 129af69d88dSmrg 130af69d88dSmrg#endif /* __OPENCL_CL_D3D10_H */ 131af69d88dSmrg 132