Skip to content

Commit

Permalink
Add properties parameter to all command-buffer commands (#260)
Browse files Browse the repository at this point in the history
* Add properties parameter to all command-buffer commands

Header changes to reflect XML changes from KhronosGroup/OpenCL-Docs#1215
to address KhronosGroup/OpenCL-Docs#1207

A new `cl_command_properties_khr` properties parameter is added
to all command recording entry-points, and the patch version is
bumped.

* Rename CL_MUTABLE_COMMAND_PROPERTIES_ARRAY_KHR

---------

Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
  • Loading branch information
EwanC and bashbaug authored Sep 6, 2024
1 parent 7258b9e commit 542d7a8
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions CL/cl_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extern "C" {
"cl_khr_command_buffer"


#define CL_KHR_COMMAND_BUFFER_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 4)
#define CL_KHR_COMMAND_BUFFER_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 5)

typedef cl_bitfield cl_device_command_buffer_capabilities_khr;
typedef struct _cl_command_buffer_khr* cl_command_buffer_khr;
Expand All @@ -61,7 +61,7 @@ typedef cl_uint cl_command_buffer_info_khr;
typedef cl_uint cl_command_buffer_state_khr;
typedef cl_properties cl_command_buffer_properties_khr;
typedef cl_bitfield cl_command_buffer_flags_khr;
typedef cl_properties cl_ndrange_kernel_command_properties_khr;
typedef cl_properties cl_command_properties_khr;
typedef struct _cl_mutable_command_khr* cl_mutable_command_khr;

/* cl_device_info */
Expand Down Expand Up @@ -149,6 +149,7 @@ typedef cl_int CL_API_CALL
clCommandBarrierWithWaitListKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_uint num_sync_points_in_wait_list,
const cl_sync_point_khr* sync_point_wait_list,
cl_sync_point_khr* sync_point,
Expand All @@ -161,6 +162,7 @@ typedef cl_int CL_API_CALL
clCommandCopyBufferKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_buffer,
cl_mem dst_buffer,
size_t src_offset,
Expand All @@ -178,6 +180,7 @@ typedef cl_int CL_API_CALL
clCommandCopyBufferRectKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_buffer,
cl_mem dst_buffer,
const size_t* src_origin,
Expand All @@ -199,6 +202,7 @@ typedef cl_int CL_API_CALL
clCommandCopyBufferToImageKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_buffer,
cl_mem dst_image,
size_t src_offset,
Expand All @@ -216,6 +220,7 @@ typedef cl_int CL_API_CALL
clCommandCopyImageKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_image,
cl_mem dst_image,
const size_t* src_origin,
Expand All @@ -233,6 +238,7 @@ typedef cl_int CL_API_CALL
clCommandCopyImageToBufferKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_image,
cl_mem dst_buffer,
const size_t* src_origin,
Expand All @@ -250,6 +256,7 @@ typedef cl_int CL_API_CALL
clCommandFillBufferKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem buffer,
const void* pattern,
size_t pattern_size,
Expand All @@ -267,6 +274,7 @@ typedef cl_int CL_API_CALL
clCommandFillImageKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem image,
const void* fill_color,
const size_t* origin,
Expand All @@ -283,7 +291,7 @@ typedef cl_int CL_API_CALL
clCommandNDRangeKernelKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_ndrange_kernel_command_properties_khr* properties,
const cl_command_properties_khr* properties,
cl_kernel kernel,
cl_uint work_dim,
const size_t* global_work_offset,
Expand Down Expand Up @@ -342,6 +350,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandBarrierWithWaitListKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_uint num_sync_points_in_wait_list,
const cl_sync_point_khr* sync_point_wait_list,
cl_sync_point_khr* sync_point,
Expand All @@ -351,6 +360,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandCopyBufferKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_buffer,
cl_mem dst_buffer,
size_t src_offset,
Expand All @@ -365,6 +375,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandCopyBufferRectKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_buffer,
cl_mem dst_buffer,
const size_t* src_origin,
Expand All @@ -383,6 +394,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandCopyBufferToImageKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_buffer,
cl_mem dst_image,
size_t src_offset,
Expand All @@ -397,6 +409,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandCopyImageKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_image,
cl_mem dst_image,
const size_t* src_origin,
Expand All @@ -411,6 +424,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandCopyImageToBufferKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem src_image,
cl_mem dst_buffer,
const size_t* src_origin,
Expand All @@ -425,6 +439,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandFillBufferKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem buffer,
const void* pattern,
size_t pattern_size,
Expand All @@ -439,6 +454,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandFillImageKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
cl_mem image,
const void* fill_color,
const size_t* origin,
Expand All @@ -452,7 +468,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandNDRangeKernelKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_ndrange_kernel_command_properties_khr* properties,
const cl_command_properties_khr* properties,
cl_kernel kernel,
cl_uint work_dim,
const size_t* global_work_offset,
Expand All @@ -479,6 +495,7 @@ typedef cl_int CL_API_CALL
clCommandSVMMemcpyKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
void* dst_ptr,
const void* src_ptr,
size_t size,
Expand All @@ -494,6 +511,7 @@ typedef cl_int CL_API_CALL
clCommandSVMMemFillKHR_t(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
void* svm_ptr,
const void* pattern,
size_t pattern_size,
Expand All @@ -512,6 +530,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandSVMMemcpyKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
void* dst_ptr,
const void* src_ptr,
size_t size,
Expand All @@ -524,6 +543,7 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clCommandSVMMemFillKHR(
cl_command_buffer_khr command_buffer,
cl_command_queue command_queue,
const cl_command_properties_khr* properties,
void* svm_ptr,
const void* pattern,
size_t pattern_size,
Expand Down Expand Up @@ -603,7 +623,7 @@ clRemapCommandBufferKHR(
"cl_khr_command_buffer_mutable_dispatch"


#define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 2)
#define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 3)

typedef cl_uint cl_command_buffer_update_type_khr;
typedef cl_bitfield cl_mutable_dispatch_fields_khr;
Expand Down Expand Up @@ -656,7 +676,7 @@ typedef cl_bitfield cl_mutable_dispatch_asserts_khr;
#define CL_MUTABLE_COMMAND_COMMAND_QUEUE_KHR 0x12A0
#define CL_MUTABLE_COMMAND_COMMAND_BUFFER_KHR 0x12A1
#define CL_MUTABLE_COMMAND_COMMAND_TYPE_KHR 0x12AD
#define CL_MUTABLE_DISPATCH_PROPERTIES_ARRAY_KHR 0x12A2
#define CL_MUTABLE_COMMAND_PROPERTIES_ARRAY_KHR 0x12A2
#define CL_MUTABLE_DISPATCH_KERNEL_KHR 0x12A3
#define CL_MUTABLE_DISPATCH_DIMENSIONS_KHR 0x12A4
#define CL_MUTABLE_DISPATCH_GLOBAL_WORK_OFFSET_KHR 0x12A5
Expand Down

0 comments on commit 542d7a8

Please sign in to comment.