Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define function types for prototype declaration #230

Merged
merged 8 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
63 changes: 42 additions & 21 deletions CL/cl_d3d10.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,56 +97,74 @@ typedef cl_uint cl_d3d10_device_set_khr;
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018


typedef cl_int (CL_API_CALL *
clGetDeviceIDsFromD3D10KHR_fn)(
typedef cl_int CL_API_CALL
clGetDeviceIDsFromD3D10KHR_t(
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;
cl_uint* num_devices);

typedef clGetDeviceIDsFromD3D10KHR_t *
clGetDeviceIDsFromD3D10KHR_fn CL_API_SUFFIX__VERSION_1_0;

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

typedef clCreateFromD3D10BufferKHR_t *
clCreateFromD3D10BufferKHR_fn CL_API_SUFFIX__VERSION_1_0;

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

typedef clCreateFromD3D10Texture2DKHR_t *
clCreateFromD3D10Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_0;

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

typedef cl_int (CL_API_CALL *
clEnqueueAcquireD3D10ObjectsKHR_fn)(
typedef clCreateFromD3D10Texture3DKHR_t *
clCreateFromD3D10Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_0;

typedef cl_int CL_API_CALL
clEnqueueAcquireD3D10ObjectsKHR_t(
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_event* event);

typedef cl_int (CL_API_CALL *
clEnqueueReleaseD3D10ObjectsKHR_fn)(
typedef clEnqueueAcquireD3D10ObjectsKHR_t *
clEnqueueAcquireD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;

typedef cl_int CL_API_CALL
clEnqueueReleaseD3D10ObjectsKHR_t(
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_event* event);

typedef clEnqueueReleaseD3D10ObjectsKHR_t *
clEnqueueReleaseD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;

#if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)

Expand Down Expand Up @@ -212,14 +230,17 @@ clEnqueueReleaseD3D10ObjectsKHR(

/* when cl_khr_d3d10_sharing is supported */

typedef cl_int (CL_API_CALL *
clGetSupportedD3D10TextureFormatsINTEL_fn)(
typedef cl_int CL_API_CALL
clGetSupportedD3D10TextureFormatsINTEL_t(
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) ;
cl_uint* num_texture_formats);

typedef clGetSupportedD3D10TextureFormatsINTEL_t *
clGetSupportedD3D10TextureFormatsINTEL_fn ;

#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)

Expand Down
63 changes: 42 additions & 21 deletions CL/cl_d3d11.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,56 +97,74 @@ typedef cl_uint cl_d3d11_device_set_khr;
#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021


typedef cl_int (CL_API_CALL *
clGetDeviceIDsFromD3D11KHR_fn)(
typedef cl_int CL_API_CALL
clGetDeviceIDsFromD3D11KHR_t(
cl_platform_id platform,
cl_d3d11_device_source_khr d3d_device_source,
void* d3d_object,
cl_d3d11_device_set_khr d3d_device_set,
cl_uint num_entries,
cl_device_id* devices,
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
cl_uint* num_devices);

typedef clGetDeviceIDsFromD3D11KHR_t *
clGetDeviceIDsFromD3D11KHR_fn CL_API_SUFFIX__VERSION_1_2;

typedef cl_mem (CL_API_CALL *
clCreateFromD3D11BufferKHR_fn)(
typedef cl_mem CL_API_CALL
clCreateFromD3D11BufferKHR_t(
cl_context context,
cl_mem_flags flags,
ID3D11Buffer* resource,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
cl_int* errcode_ret);

typedef clCreateFromD3D11BufferKHR_t *
clCreateFromD3D11BufferKHR_fn CL_API_SUFFIX__VERSION_1_2;

typedef cl_mem (CL_API_CALL *
clCreateFromD3D11Texture2DKHR_fn)(
typedef cl_mem CL_API_CALL
clCreateFromD3D11Texture2DKHR_t(
cl_context context,
cl_mem_flags flags,
ID3D11Texture2D* resource,
UINT subresource,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
cl_int* errcode_ret);

typedef clCreateFromD3D11Texture2DKHR_t *
clCreateFromD3D11Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_2;

typedef cl_mem (CL_API_CALL *
clCreateFromD3D11Texture3DKHR_fn)(
typedef cl_mem CL_API_CALL
clCreateFromD3D11Texture3DKHR_t(
cl_context context,
cl_mem_flags flags,
ID3D11Texture3D* resource,
UINT subresource,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
cl_int* errcode_ret);

typedef cl_int (CL_API_CALL *
clEnqueueAcquireD3D11ObjectsKHR_fn)(
typedef clCreateFromD3D11Texture3DKHR_t *
clCreateFromD3D11Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_2;

typedef cl_int CL_API_CALL
clEnqueueAcquireD3D11ObjectsKHR_t(
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_2;
cl_event* event);

typedef cl_int (CL_API_CALL *
clEnqueueReleaseD3D11ObjectsKHR_fn)(
typedef clEnqueueAcquireD3D11ObjectsKHR_t *
clEnqueueAcquireD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2;

typedef cl_int CL_API_CALL
clEnqueueReleaseD3D11ObjectsKHR_t(
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_2;
cl_event* event);

typedef clEnqueueReleaseD3D11ObjectsKHR_t *
clEnqueueReleaseD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2;

#if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)

Expand Down Expand Up @@ -212,15 +230,18 @@ clEnqueueReleaseD3D11ObjectsKHR(

/* when cl_khr_d3d11_sharing is supported */

typedef cl_int (CL_API_CALL *
clGetSupportedD3D11TextureFormatsINTEL_fn)(
typedef cl_int CL_API_CALL
clGetSupportedD3D11TextureFormatsINTEL_t(
cl_context context,
cl_mem_flags flags,
cl_mem_object_type image_type,
cl_uint plane,
cl_uint num_entries,
DXGI_FORMAT* d3d11_formats,
cl_uint* num_texture_formats) ;
cl_uint* num_texture_formats);

typedef clGetSupportedD3D11TextureFormatsINTEL_t *
clGetSupportedD3D11TextureFormatsINTEL_fn ;

#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)

Expand Down
81 changes: 54 additions & 27 deletions CL/cl_dx9_media_sharing.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,43 +110,55 @@ typedef struct _cl_dx9_surface_info_khr {
#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C


typedef cl_int (CL_API_CALL *
clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
typedef cl_int CL_API_CALL
clGetDeviceIDsFromDX9MediaAdapterKHR_t(
cl_platform_id platform,
cl_uint num_media_adapters,
cl_dx9_media_adapter_type_khr* media_adapter_type,
void* media_adapters,
cl_dx9_media_adapter_set_khr media_adapter_set,
cl_uint num_entries,
cl_device_id* devices,
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
cl_uint* num_devices);

typedef clGetDeviceIDsFromDX9MediaAdapterKHR_t *
clGetDeviceIDsFromDX9MediaAdapterKHR_fn CL_API_SUFFIX__VERSION_1_2;

typedef cl_mem (CL_API_CALL *
clCreateFromDX9MediaSurfaceKHR_fn)(
typedef cl_mem CL_API_CALL
clCreateFromDX9MediaSurfaceKHR_t(
cl_context context,
cl_mem_flags flags,
cl_dx9_media_adapter_type_khr adapter_type,
void* surface_info,
cl_uint plane,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
cl_int* errcode_ret);

typedef cl_int (CL_API_CALL *
clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
typedef clCreateFromDX9MediaSurfaceKHR_t *
clCreateFromDX9MediaSurfaceKHR_fn CL_API_SUFFIX__VERSION_1_2;

typedef cl_int CL_API_CALL
clEnqueueAcquireDX9MediaSurfacesKHR_t(
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_2;
cl_event* event);

typedef cl_int (CL_API_CALL *
clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
typedef clEnqueueAcquireDX9MediaSurfacesKHR_t *
clEnqueueAcquireDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2;

typedef cl_int CL_API_CALL
clEnqueueReleaseDX9MediaSurfacesKHR_t(
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_2;
cl_event* event);

typedef clEnqueueReleaseDX9MediaSurfacesKHR_t *
clEnqueueReleaseDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2;

#if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)

Expand Down Expand Up @@ -232,42 +244,54 @@ typedef cl_uint cl_dx9_device_set_intel;
#define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B


typedef cl_int (CL_API_CALL *
clGetDeviceIDsFromDX9INTEL_fn)(
typedef cl_int CL_API_CALL
clGetDeviceIDsFromDX9INTEL_t(
cl_platform_id platform,
cl_dx9_device_source_intel dx9_device_source,
void* dx9_object,
cl_dx9_device_set_intel dx9_device_set,
cl_uint num_entries,
cl_device_id* devices,
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_1;
cl_uint* num_devices);

typedef cl_mem (CL_API_CALL *
clCreateFromDX9MediaSurfaceINTEL_fn)(
typedef clGetDeviceIDsFromDX9INTEL_t *
clGetDeviceIDsFromDX9INTEL_fn CL_API_SUFFIX__VERSION_1_1;

typedef cl_mem CL_API_CALL
clCreateFromDX9MediaSurfaceINTEL_t(
cl_context context,
cl_mem_flags flags,
IDirect3DSurface9* resource,
HANDLE sharedHandle,
UINT plane,
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
cl_int* errcode_ret);

typedef clCreateFromDX9MediaSurfaceINTEL_t *
clCreateFromDX9MediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_1;

typedef cl_int (CL_API_CALL *
clEnqueueAcquireDX9ObjectsINTEL_fn)(
typedef cl_int CL_API_CALL
clEnqueueAcquireDX9ObjectsINTEL_t(
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_1;
cl_event* event);

typedef clEnqueueAcquireDX9ObjectsINTEL_t *
clEnqueueAcquireDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1;

typedef cl_int (CL_API_CALL *
clEnqueueReleaseDX9ObjectsINTEL_fn)(
typedef cl_int CL_API_CALL
clEnqueueReleaseDX9ObjectsINTEL_t(
cl_command_queue command_queue,
cl_uint num_objects,
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_1;
cl_event* event);

typedef clEnqueueReleaseDX9ObjectsINTEL_t *
clEnqueueReleaseDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1;

#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)

Expand Down Expand Up @@ -319,15 +343,18 @@ clEnqueueReleaseDX9ObjectsINTEL(

/* when cl_khr_dx9_media_sharing or cl_intel_dx9_media_sharing is supported */

typedef cl_int (CL_API_CALL *
clGetSupportedDX9MediaSurfaceFormatsINTEL_fn)(
typedef cl_int CL_API_CALL
clGetSupportedDX9MediaSurfaceFormatsINTEL_t(
cl_context context,
cl_mem_flags flags,
cl_mem_object_type image_type,
cl_uint plane,
cl_uint num_entries,
D3DFORMAT* dx9_formats,
cl_uint* num_surface_formats) ;
cl_uint* num_surface_formats);

typedef clGetSupportedDX9MediaSurfaceFormatsINTEL_t *
clGetSupportedDX9MediaSurfaceFormatsINTEL_fn ;

#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)

Expand Down
Loading