Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c3ff66f
initial generation script and template
bashbaug Dec 6, 2020
33ceb74
added ability to generate additional headers for sharing extensions
bashbaug Dec 29, 2020
26f7cc6
switch to generated headers for extensions
bashbaug Feb 28, 2021
055380e
remove CL_API_ENTRY from the generated extension typedefs
bashbaug Apr 7, 2021
4bb9f3d
add requirements.txt (generated with pipreqs)
bashbaug Apr 12, 2021
b8bd8e5
do not generate cl_layer.h
bashbaug Apr 30, 2021
35447dd
refactored into separate functions to align with ICD loader generation
bashbaug May 31, 2021
7e4a291
sort bit enums
bashbaug Jun 22, 2021
db0dab9
updates for sharing format query extensions
bashbaug Aug 1, 2021
5258372
added support for CL_NO_PROTOTYPES define
bashbaug Aug 29, 2021
4f373a7
generate new extensions:
bashbaug Oct 18, 2021
8937bb1
handle the case where the bit shift amount is greater than 31
bashbaug Nov 30, 2021
0b03b72
Activate generation for cl_layer.h.
Kerilk Jan 13, 2022
29eabbd
Regenerate headers.
Kerilk Jan 13, 2022
2b5828b
minor updates for pfn_ function pointer typedef generation
bashbaug Jan 14, 2022
2522446
update copyright dates
bashbaug Jan 14, 2022
c57eeff
generate headers with latest XML file
bashbaug May 16, 2022
e46a29b
add an extension condition check for the entire extension
bashbaug Sep 7, 2022
be20f23
generate headers with the latest XML file
bashbaug Sep 7, 2022
057a34b
fix include guards for dx9 header for warning disables
bashbaug Sep 7, 2022
501c3f8
regenerate headers from the latest XML file
bashbaug Oct 25, 2022
cab5eab
regenerate headers from the latest XML file
bashbaug Feb 17, 2023
64ae491
generate extensions in the same order as previously
bashbaug Mar 21, 2023
8a4db19
update copyright dates to 2023
bashbaug Mar 21, 2023
d659388
fix the name of the cl_khr_image2d_from_buffer extension
bashbaug Mar 21, 2023
4c9b8a3
fix layers layer_dispatch_ret
bashbaug Mar 25, 2023
39c98a1
fix errcode_ret for clCreateFromGLBuffer
bashbaug Mar 25, 2023
e70f7c7
add CL_VERSION_3_0 guard to cl_ext_image_from_buffer
bashbaug Mar 25, 2023
676a5b7
add CL_API_SUFFIX__VERSION_1_2 to clCreateProgramWithILKHR
bashbaug Mar 25, 2023
5ebe78f
add CL_VERSION_1_2 condition to cl_arm_get_core_id
bashbaug Mar 25, 2023
1fcee9e
add CL_API_SUFFIX__VERSION_1_0 to clCreateBufferWithPropertiesINTEL
bashbaug Mar 25, 2023
e333d1c
add CL_API_SUFFIX__VERSION_1_0 to clEnqueueReadHostPipeINTEL and clEn…
bashbaug Mar 25, 2023
9fd22c1
fix off-by-one error for large bitfield bits
bashbaug Mar 25, 2023
6a29cd2
switch the syntax for large bitfield bits
bashbaug Mar 25, 2023
20518ae
refactor prototype guards for extension APIs
bashbaug Mar 28, 2023
95f7ea2
Added CL_NO_CORE_API_PROTOTYPES.
Kerilk Mar 28, 2023
b51e5f8
slight renaming, add CL_NO_PROTOTYPES to cl.h
bashbaug Mar 28, 2023
4020a32
regenerate with all XML fixes
bashbaug Mar 28, 2023
b643b18
a few more naming adjustments
bashbaug Mar 31, 2023
95e6f78
update README
bashbaug Mar 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CL/cl.h
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,13 @@ typedef struct _cl_name_version {

/********************************************************************************************************/

/* CL_NO_PROTOTYPES implies CL_NO_CORE_PROTOTYPES: */
#if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_CORE_PROTOTYPES)
#define CL_NO_CORE_PROTOTYPES
#endif

#if !defined(CL_NO_CORE_PROTOTYPES)

/* Platform API */
extern CL_API_ENTRY cl_int CL_API_CALL
clGetPlatformIDs(cl_uint num_entries,
Expand Down Expand Up @@ -1929,6 +1936,8 @@ clEnqueueTask(cl_command_queue command_queue,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2_DEPRECATED;

#endif /* !defined(CL_NO_CORE_PROTOTYPES) */

#ifdef __cplusplus
}
#endif
Expand Down
235 changes: 161 additions & 74 deletions CL/cl_d3d10.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008-2020 The Khronos Group Inc.
* Copyright (c) 2008-2023 The Khronos Group Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,8 +14,12 @@
* limitations under the License.
******************************************************************************/

#ifndef __OPENCL_CL_D3D10_H
#define __OPENCL_CL_D3D10_H
#ifndef OPENCL_CL_D3D10_H_
#define OPENCL_CL_D3D10_H_

/*
** This header is generated from the Khronos OpenCL XML API Registry.
*/

#if defined(_MSC_VER)
#if _MSC_VER >=1500
Expand All @@ -30,125 +34,208 @@
#pragma warning( pop )
#endif
#endif

#include <CL/cl.h>
#include <CL/cl_platform.h>

/* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
#if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
#define CL_NO_EXTENSION_PROTOTYPES
#endif

/* CL_NO_EXTENSION_PROTOTYPES implies
CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
#if defined(CL_NO_EXTENSION_PROTOTYPES) && \
!defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
#define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
#endif
#if defined(CL_NO_EXTENSION_PROTOTYPES) && \
!defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
#define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
#endif

#ifdef __cplusplus
extern "C" {
#endif

/******************************************************************************
* cl_khr_d3d10_sharing */
/***************************************************************
* cl_khr_d3d10_sharing
***************************************************************/
#define cl_khr_d3d10_sharing 1
#define CL_KHR_D3D10_SHARING_EXTENSION_NAME \
"cl_khr_d3d10_sharing"

typedef cl_uint cl_d3d10_device_source_khr;
typedef cl_uint cl_d3d10_device_set_khr;
typedef cl_uint cl_d3d10_device_source_khr;
typedef cl_uint cl_d3d10_device_set_khr;

/******************************************************************************/
/* Error codes */
#define CL_INVALID_D3D10_DEVICE_KHR -1002
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005

/* Error Codes */
#define CL_INVALID_D3D10_DEVICE_KHR -1002
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
/* cl_d3d10_device_source_khr */
#define CL_D3D10_DEVICE_KHR 0x4010
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011

/* cl_d3d10_device_source_nv */
#define CL_D3D10_DEVICE_KHR 0x4010
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011

/* cl_d3d10_device_set_nv */
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
/* cl_d3d10_device_set_khr */
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013

/* cl_context_info */
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C

/* cl_mem_info */
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015

/* cl_image_info */
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016

/* cl_command_type */
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018


typedef cl_int (CL_API_CALL *
clGetDeviceIDsFromD3D10KHR_fn)(
cl_platform_id platform,
cl_d3d10_device_source_khr d3d_device_source,
void* d3d_object,
cl_d3d10_device_set_khr d3d_device_set,
cl_uint num_entries,
cl_device_id* devices,
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;

typedef cl_mem (CL_API_CALL *
clCreateFromD3D10BufferKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Buffer* resource,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;

typedef cl_mem (CL_API_CALL *
clCreateFromD3D10Texture2DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture2D* resource,
UINT subresource,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;

typedef cl_mem (CL_API_CALL *
clCreateFromD3D10Texture3DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture3D* resource,
UINT subresource,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;

typedef cl_int (CL_API_CALL *
clEnqueueAcquireD3D10ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem* mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_API_SUFFIX__VERSION_1_0;

typedef cl_int (CL_API_CALL *
clEnqueueReleaseD3D10ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem* mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_API_SUFFIX__VERSION_1_0;

/******************************************************************************/
#if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)

typedef cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
cl_platform_id platform,
extern CL_API_ENTRY cl_int CL_API_CALL
clGetDeviceIDsFromD3D10KHR(
cl_platform_id platform,
cl_d3d10_device_source_khr d3d_device_source,
void * d3d_object,
cl_d3d10_device_set_khr d3d_device_set,
cl_uint num_entries,
cl_device_id * devices,
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;

typedef cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Buffer * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;

typedef cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture2D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;

typedef cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture3D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;

typedef cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
void* d3d_object,
cl_d3d10_device_set_khr d3d_device_set,
cl_uint num_entries,
cl_device_id* devices,
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;

extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromD3D10BufferKHR(
cl_context context,
cl_mem_flags flags,
ID3D10Buffer* resource,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;

extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromD3D10Texture2DKHR(
cl_context context,
cl_mem_flags flags,
ID3D10Texture2D* resource,
UINT subresource,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;

extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromD3D10Texture3DKHR(
cl_context context,
cl_mem_flags flags,
ID3D10Texture3D* resource,
UINT subresource,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;

extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireD3D10ObjectsKHR(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
cl_uint num_objects,
const cl_mem* mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_API_SUFFIX__VERSION_1_0;

typedef cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseD3D10ObjectsKHR(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
cl_uint num_objects,
const cl_mem* mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_API_SUFFIX__VERSION_1_0;

#endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */

/***************************************************************
* cl_intel_sharing_format_query_d3d10
***************************************************************/
#define cl_intel_sharing_format_query_d3d10 1
#define CL_INTEL_SHARING_FORMAT_QUERY_D3D10_EXTENSION_NAME \
"cl_intel_sharing_format_query_d3d10"

/* when cl_khr_d3d10_sharing is supported */

extern CL_API_ENTRY cl_int CL_API_CALL
clGetSupportedD3D10TextureFormatsINTEL(
typedef cl_int (CL_API_CALL *
clGetSupportedD3D10TextureFormatsINTEL_fn)(
cl_context context,
cl_mem_flags flags,
cl_mem_object_type image_type,
cl_uint num_entries,
DXGI_FORMAT* d3d10_formats,
cl_uint* num_texture_formats) ;

typedef cl_int (CL_API_CALL *
clGetSupportedD3D10TextureFormatsINTEL_fn)(
#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)

extern CL_API_ENTRY cl_int CL_API_CALL
clGetSupportedD3D10TextureFormatsINTEL(
cl_context context,
cl_mem_flags flags,
cl_mem_object_type image_type,
cl_uint num_entries,
DXGI_FORMAT* d3d10_formats,
cl_uint* num_texture_formats) ;

#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */

#ifdef __cplusplus
}
#endif

#endif /* __OPENCL_CL_D3D10_H */

#endif /* OPENCL_CL_D3D10_H_ */
Loading