1 // GENERATED FILE - DO NOT EDIT. 2 // Generated by generate_entry_points.py using data from cl.xml. 3 // 4 // Copyright 2021 The ANGLE Project Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style license that can be 6 // found in the LICENSE file. 7 // 8 // validationCL_autogen.h: 9 // Validation functions for the CL entry points. 10 11 #ifndef LIBANGLE_VALIDATION_CL_AUTOGEN_H_ 12 #define LIBANGLE_VALIDATION_CL_AUTOGEN_H_ 13 14 #include "libANGLE/validationCL.h" 15 16 namespace cl 17 { 18 19 // CL 1.0 20 cl_int ValidateGetPlatformIDs(cl_uint num_entries, 21 const cl_platform_id *platforms, 22 const cl_uint *num_platforms); 23 cl_int ValidateGetPlatformInfo(cl_platform_id platform, 24 PlatformInfo param_namePacked, 25 size_t param_value_size, 26 const void *param_value, 27 const size_t *param_value_size_ret); 28 cl_int ValidateGetDeviceIDs(cl_platform_id platform, 29 DeviceType device_typePacked, 30 cl_uint num_entries, 31 const cl_device_id *devices, 32 const cl_uint *num_devices); 33 cl_int ValidateGetDeviceInfo(cl_device_id device, 34 DeviceInfo param_namePacked, 35 size_t param_value_size, 36 const void *param_value, 37 const size_t *param_value_size_ret); 38 cl_int ValidateCreateContext(const cl_context_properties *properties, 39 cl_uint num_devices, 40 const cl_device_id *devices, 41 void(CL_CALLBACK *pfn_notify)(const char *errinfo, 42 const void *private_info, 43 size_t cb, 44 void *user_data), 45 const void *user_data); 46 cl_int ValidateCreateContextFromType(const cl_context_properties *properties, 47 DeviceType device_typePacked, 48 void(CL_CALLBACK *pfn_notify)(const char *errinfo, 49 const void *private_info, 50 size_t cb, 51 void *user_data), 52 const void *user_data); 53 cl_int ValidateRetainContext(cl_context context); 54 cl_int ValidateReleaseContext(cl_context context); 55 cl_int ValidateGetContextInfo(cl_context context, 56 ContextInfo param_namePacked, 57 size_t param_value_size, 58 const void *param_value, 59 const size_t *param_value_size_ret); 60 cl_int ValidateRetainCommandQueue(cl_command_queue command_queue); 61 cl_int ValidateReleaseCommandQueue(cl_command_queue command_queue); 62 cl_int ValidateGetCommandQueueInfo(cl_command_queue command_queue, 63 CommandQueueInfo param_namePacked, 64 size_t param_value_size, 65 const void *param_value, 66 const size_t *param_value_size_ret); 67 cl_int ValidateCreateBuffer(cl_context context, 68 MemFlags flagsPacked, 69 size_t size, 70 const void *host_ptr); 71 cl_int ValidateRetainMemObject(cl_mem memobj); 72 cl_int ValidateReleaseMemObject(cl_mem memobj); 73 cl_int ValidateGetSupportedImageFormats(cl_context context, 74 MemFlags flagsPacked, 75 MemObjectType image_typePacked, 76 cl_uint num_entries, 77 const cl_image_format *image_formats, 78 const cl_uint *num_image_formats); 79 cl_int ValidateGetMemObjectInfo(cl_mem memobj, 80 MemInfo param_namePacked, 81 size_t param_value_size, 82 const void *param_value, 83 const size_t *param_value_size_ret); 84 cl_int ValidateGetImageInfo(cl_mem image, 85 ImageInfo param_namePacked, 86 size_t param_value_size, 87 const void *param_value, 88 const size_t *param_value_size_ret); 89 cl_int ValidateRetainSampler(cl_sampler sampler); 90 cl_int ValidateReleaseSampler(cl_sampler sampler); 91 cl_int ValidateGetSamplerInfo(cl_sampler sampler, 92 SamplerInfo param_namePacked, 93 size_t param_value_size, 94 const void *param_value, 95 const size_t *param_value_size_ret); 96 cl_int ValidateCreateProgramWithSource(cl_context context, 97 cl_uint count, 98 const char **strings, 99 const size_t *lengths); 100 cl_int ValidateCreateProgramWithBinary(cl_context context, 101 cl_uint num_devices, 102 const cl_device_id *device_list, 103 const size_t *lengths, 104 const unsigned char **binaries, 105 const cl_int *binary_status); 106 cl_int ValidateRetainProgram(cl_program program); 107 cl_int ValidateReleaseProgram(cl_program program); 108 cl_int ValidateBuildProgram(cl_program program, 109 cl_uint num_devices, 110 const cl_device_id *device_list, 111 const char *options, 112 void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data), 113 const void *user_data); 114 cl_int ValidateGetProgramInfo(cl_program program, 115 ProgramInfo param_namePacked, 116 size_t param_value_size, 117 const void *param_value, 118 const size_t *param_value_size_ret); 119 cl_int ValidateGetProgramBuildInfo(cl_program program, 120 cl_device_id device, 121 ProgramBuildInfo param_namePacked, 122 size_t param_value_size, 123 const void *param_value, 124 const size_t *param_value_size_ret); 125 cl_int ValidateCreateKernel(cl_program program, const char *kernel_name); 126 cl_int ValidateCreateKernelsInProgram(cl_program program, 127 cl_uint num_kernels, 128 const cl_kernel *kernels, 129 const cl_uint *num_kernels_ret); 130 cl_int ValidateRetainKernel(cl_kernel kernel); 131 cl_int ValidateReleaseKernel(cl_kernel kernel); 132 cl_int ValidateSetKernelArg(cl_kernel kernel, 133 cl_uint arg_index, 134 size_t arg_size, 135 const void *arg_value); 136 cl_int ValidateGetKernelInfo(cl_kernel kernel, 137 KernelInfo param_namePacked, 138 size_t param_value_size, 139 const void *param_value, 140 const size_t *param_value_size_ret); 141 cl_int ValidateGetKernelWorkGroupInfo(cl_kernel kernel, 142 cl_device_id device, 143 KernelWorkGroupInfo param_namePacked, 144 size_t param_value_size, 145 const void *param_value, 146 const size_t *param_value_size_ret); 147 cl_int ValidateWaitForEvents(cl_uint num_events, const cl_event *event_list); 148 cl_int ValidateGetEventInfo(cl_event event, 149 EventInfo param_namePacked, 150 size_t param_value_size, 151 const void *param_value, 152 const size_t *param_value_size_ret); 153 cl_int ValidateRetainEvent(cl_event event); 154 cl_int ValidateReleaseEvent(cl_event event); 155 cl_int ValidateGetEventProfilingInfo(cl_event event, 156 ProfilingInfo param_namePacked, 157 size_t param_value_size, 158 const void *param_value, 159 const size_t *param_value_size_ret); 160 cl_int ValidateFlush(cl_command_queue command_queue); 161 cl_int ValidateFinish(cl_command_queue command_queue); 162 cl_int ValidateEnqueueReadBuffer(cl_command_queue command_queue, 163 cl_mem buffer, 164 cl_bool blocking_read, 165 size_t offset, 166 size_t size, 167 const void *ptr, 168 cl_uint num_events_in_wait_list, 169 const cl_event *event_wait_list, 170 const cl_event *event); 171 cl_int ValidateEnqueueWriteBuffer(cl_command_queue command_queue, 172 cl_mem buffer, 173 cl_bool blocking_write, 174 size_t offset, 175 size_t size, 176 const void *ptr, 177 cl_uint num_events_in_wait_list, 178 const cl_event *event_wait_list, 179 const cl_event *event); 180 cl_int ValidateEnqueueCopyBuffer(cl_command_queue command_queue, 181 cl_mem src_buffer, 182 cl_mem dst_buffer, 183 size_t src_offset, 184 size_t dst_offset, 185 size_t size, 186 cl_uint num_events_in_wait_list, 187 const cl_event *event_wait_list, 188 const cl_event *event); 189 cl_int ValidateEnqueueReadImage(cl_command_queue command_queue, 190 cl_mem image, 191 cl_bool blocking_read, 192 const size_t *origin, 193 const size_t *region, 194 size_t row_pitch, 195 size_t slice_pitch, 196 const void *ptr, 197 cl_uint num_events_in_wait_list, 198 const cl_event *event_wait_list, 199 const cl_event *event); 200 cl_int ValidateEnqueueWriteImage(cl_command_queue command_queue, 201 cl_mem image, 202 cl_bool blocking_write, 203 const size_t *origin, 204 const size_t *region, 205 size_t input_row_pitch, 206 size_t input_slice_pitch, 207 const void *ptr, 208 cl_uint num_events_in_wait_list, 209 const cl_event *event_wait_list, 210 const cl_event *event); 211 cl_int ValidateEnqueueCopyImage(cl_command_queue command_queue, 212 cl_mem src_image, 213 cl_mem dst_image, 214 const size_t *src_origin, 215 const size_t *dst_origin, 216 const size_t *region, 217 cl_uint num_events_in_wait_list, 218 const cl_event *event_wait_list, 219 const cl_event *event); 220 cl_int ValidateEnqueueCopyImageToBuffer(cl_command_queue command_queue, 221 cl_mem src_image, 222 cl_mem dst_buffer, 223 const size_t *src_origin, 224 const size_t *region, 225 size_t dst_offset, 226 cl_uint num_events_in_wait_list, 227 const cl_event *event_wait_list, 228 const cl_event *event); 229 cl_int ValidateEnqueueCopyBufferToImage(cl_command_queue command_queue, 230 cl_mem src_buffer, 231 cl_mem dst_image, 232 size_t src_offset, 233 const size_t *dst_origin, 234 const size_t *region, 235 cl_uint num_events_in_wait_list, 236 const cl_event *event_wait_list, 237 const cl_event *event); 238 cl_int ValidateEnqueueMapBuffer(cl_command_queue command_queue, 239 cl_mem buffer, 240 cl_bool blocking_map, 241 MapFlags map_flagsPacked, 242 size_t offset, 243 size_t size, 244 cl_uint num_events_in_wait_list, 245 const cl_event *event_wait_list, 246 const cl_event *event); 247 cl_int ValidateEnqueueMapImage(cl_command_queue command_queue, 248 cl_mem image, 249 cl_bool blocking_map, 250 MapFlags map_flagsPacked, 251 const size_t *origin, 252 const size_t *region, 253 const size_t *image_row_pitch, 254 const size_t *image_slice_pitch, 255 cl_uint num_events_in_wait_list, 256 const cl_event *event_wait_list, 257 const cl_event *event); 258 cl_int ValidateEnqueueUnmapMemObject(cl_command_queue command_queue, 259 cl_mem memobj, 260 const void *mapped_ptr, 261 cl_uint num_events_in_wait_list, 262 const cl_event *event_wait_list, 263 const cl_event *event); 264 cl_int ValidateEnqueueNDRangeKernel(cl_command_queue command_queue, 265 cl_kernel kernel, 266 cl_uint work_dim, 267 const size_t *global_work_offset, 268 const size_t *global_work_size, 269 const size_t *local_work_size, 270 cl_uint num_events_in_wait_list, 271 const cl_event *event_wait_list, 272 const cl_event *event); 273 cl_int ValidateEnqueueNativeKernel(cl_command_queue command_queue, 274 void(CL_CALLBACK *user_func)(void *), 275 const void *args, 276 size_t cb_args, 277 cl_uint num_mem_objects, 278 const cl_mem *mem_list, 279 const void **args_mem_loc, 280 cl_uint num_events_in_wait_list, 281 const cl_event *event_wait_list, 282 const cl_event *event); 283 cl_int ValidateSetCommandQueueProperty(cl_command_queue command_queue, 284 CommandQueueProperties propertiesPacked, 285 cl_bool enable, 286 const cl_command_queue_properties *old_properties); 287 cl_int ValidateCreateImage2D(cl_context context, 288 MemFlags flagsPacked, 289 const cl_image_format *image_format, 290 size_t image_width, 291 size_t image_height, 292 size_t image_row_pitch, 293 const void *host_ptr); 294 cl_int ValidateCreateImage3D(cl_context context, 295 MemFlags flagsPacked, 296 const cl_image_format *image_format, 297 size_t image_width, 298 size_t image_height, 299 size_t image_depth, 300 size_t image_row_pitch, 301 size_t image_slice_pitch, 302 const void *host_ptr); 303 cl_int ValidateEnqueueMarker(cl_command_queue command_queue, const cl_event *event); 304 cl_int ValidateEnqueueWaitForEvents(cl_command_queue command_queue, 305 cl_uint num_events, 306 const cl_event *event_list); 307 cl_int ValidateEnqueueBarrier(cl_command_queue command_queue); 308 cl_int ValidateUnloadCompiler(); 309 cl_int ValidateGetExtensionFunctionAddress(const char *func_name); 310 cl_int ValidateCreateCommandQueue(cl_context context, 311 cl_device_id device, 312 CommandQueueProperties propertiesPacked); 313 cl_int ValidateCreateSampler(cl_context context, 314 cl_bool normalized_coords, 315 AddressingMode addressing_modePacked, 316 FilterMode filter_modePacked); 317 cl_int ValidateEnqueueTask(cl_command_queue command_queue, 318 cl_kernel kernel, 319 cl_uint num_events_in_wait_list, 320 const cl_event *event_wait_list, 321 const cl_event *event); 322 323 // CL 1.1 324 cl_int ValidateCreateSubBuffer(cl_mem buffer, 325 MemFlags flagsPacked, 326 cl_buffer_create_type buffer_create_type, 327 const void *buffer_create_info); 328 cl_int ValidateSetMemObjectDestructorCallback(cl_mem memobj, 329 void(CL_CALLBACK *pfn_notify)(cl_mem memobj, 330 void *user_data), 331 const void *user_data); 332 cl_int ValidateCreateUserEvent(cl_context context); 333 cl_int ValidateSetUserEventStatus(cl_event event, cl_int execution_status); 334 cl_int ValidateSetEventCallback(cl_event event, 335 cl_int command_exec_callback_type, 336 void(CL_CALLBACK *pfn_notify)(cl_event event, 337 cl_int event_command_status, 338 void *user_data), 339 const void *user_data); 340 cl_int ValidateEnqueueReadBufferRect(cl_command_queue command_queue, 341 cl_mem buffer, 342 cl_bool blocking_read, 343 const size_t *buffer_origin, 344 const size_t *host_origin, 345 const size_t *region, 346 size_t buffer_row_pitch, 347 size_t buffer_slice_pitch, 348 size_t host_row_pitch, 349 size_t host_slice_pitch, 350 const void *ptr, 351 cl_uint num_events_in_wait_list, 352 const cl_event *event_wait_list, 353 const cl_event *event); 354 cl_int ValidateEnqueueWriteBufferRect(cl_command_queue command_queue, 355 cl_mem buffer, 356 cl_bool blocking_write, 357 const size_t *buffer_origin, 358 const size_t *host_origin, 359 const size_t *region, 360 size_t buffer_row_pitch, 361 size_t buffer_slice_pitch, 362 size_t host_row_pitch, 363 size_t host_slice_pitch, 364 const void *ptr, 365 cl_uint num_events_in_wait_list, 366 const cl_event *event_wait_list, 367 const cl_event *event); 368 cl_int ValidateEnqueueCopyBufferRect(cl_command_queue command_queue, 369 cl_mem src_buffer, 370 cl_mem dst_buffer, 371 const size_t *src_origin, 372 const size_t *dst_origin, 373 const size_t *region, 374 size_t src_row_pitch, 375 size_t src_slice_pitch, 376 size_t dst_row_pitch, 377 size_t dst_slice_pitch, 378 cl_uint num_events_in_wait_list, 379 const cl_event *event_wait_list, 380 const cl_event *event); 381 382 // CL 1.2 383 cl_int ValidateCreateSubDevices(cl_device_id in_device, 384 const cl_device_partition_property *properties, 385 cl_uint num_devices, 386 const cl_device_id *out_devices, 387 const cl_uint *num_devices_ret); 388 cl_int ValidateRetainDevice(cl_device_id device); 389 cl_int ValidateReleaseDevice(cl_device_id device); 390 cl_int ValidateCreateImage(cl_context context, 391 MemFlags flagsPacked, 392 const cl_image_format *image_format, 393 const cl_image_desc *image_desc, 394 const void *host_ptr); 395 cl_int ValidateCreateProgramWithBuiltInKernels(cl_context context, 396 cl_uint num_devices, 397 const cl_device_id *device_list, 398 const char *kernel_names); 399 cl_int ValidateCompileProgram(cl_program program, 400 cl_uint num_devices, 401 const cl_device_id *device_list, 402 const char *options, 403 cl_uint num_input_headers, 404 const cl_program *input_headers, 405 const char **header_include_names, 406 void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data), 407 const void *user_data); 408 cl_int ValidateLinkProgram(cl_context context, 409 cl_uint num_devices, 410 const cl_device_id *device_list, 411 const char *options, 412 cl_uint num_input_programs, 413 const cl_program *input_programs, 414 void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data), 415 const void *user_data); 416 cl_int ValidateUnloadPlatformCompiler(cl_platform_id platform); 417 cl_int ValidateGetKernelArgInfo(cl_kernel kernel, 418 cl_uint arg_index, 419 KernelArgInfo param_namePacked, 420 size_t param_value_size, 421 const void *param_value, 422 const size_t *param_value_size_ret); 423 cl_int ValidateEnqueueFillBuffer(cl_command_queue command_queue, 424 cl_mem buffer, 425 const void *pattern, 426 size_t pattern_size, 427 size_t offset, 428 size_t size, 429 cl_uint num_events_in_wait_list, 430 const cl_event *event_wait_list, 431 const cl_event *event); 432 cl_int ValidateEnqueueFillImage(cl_command_queue command_queue, 433 cl_mem image, 434 const void *fill_color, 435 const size_t *origin, 436 const size_t *region, 437 cl_uint num_events_in_wait_list, 438 const cl_event *event_wait_list, 439 const cl_event *event); 440 cl_int ValidateEnqueueMigrateMemObjects(cl_command_queue command_queue, 441 cl_uint num_mem_objects, 442 const cl_mem *mem_objects, 443 MemMigrationFlags flagsPacked, 444 cl_uint num_events_in_wait_list, 445 const cl_event *event_wait_list, 446 const cl_event *event); 447 cl_int ValidateEnqueueMarkerWithWaitList(cl_command_queue command_queue, 448 cl_uint num_events_in_wait_list, 449 const cl_event *event_wait_list, 450 const cl_event *event); 451 cl_int ValidateEnqueueBarrierWithWaitList(cl_command_queue command_queue, 452 cl_uint num_events_in_wait_list, 453 const cl_event *event_wait_list, 454 const cl_event *event); 455 cl_int ValidateGetExtensionFunctionAddressForPlatform(cl_platform_id platform, 456 const char *func_name); 457 458 // CL 2.0 459 cl_int ValidateCreateCommandQueueWithProperties(cl_context context, 460 cl_device_id device, 461 const cl_queue_properties *properties); 462 cl_int ValidateCreatePipe(cl_context context, 463 MemFlags flagsPacked, 464 cl_uint pipe_packet_size, 465 cl_uint pipe_max_packets, 466 const cl_pipe_properties *properties); 467 cl_int ValidateGetPipeInfo(cl_mem pipe, 468 PipeInfo param_namePacked, 469 size_t param_value_size, 470 const void *param_value, 471 const size_t *param_value_size_ret); 472 cl_int ValidateSVMAlloc(cl_context context, 473 SVM_MemFlags flagsPacked, 474 size_t size, 475 cl_uint alignment); 476 cl_int ValidateSVMFree(cl_context context, const void *svm_pointer); 477 cl_int ValidateCreateSamplerWithProperties(cl_context context, 478 const cl_sampler_properties *sampler_properties); 479 cl_int ValidateSetKernelArgSVMPointer(cl_kernel kernel, cl_uint arg_index, const void *arg_value); 480 cl_int ValidateSetKernelExecInfo(cl_kernel kernel, 481 KernelExecInfo param_namePacked, 482 size_t param_value_size, 483 const void *param_value); 484 cl_int ValidateEnqueueSVMFree(cl_command_queue command_queue, 485 cl_uint num_svm_pointers, 486 void *const svm_pointers[], 487 void(CL_CALLBACK *pfn_free_func)(cl_command_queue queue, 488 cl_uint num_svm_pointers, 489 void *svm_pointers[], 490 void *user_data), 491 const void *user_data, 492 cl_uint num_events_in_wait_list, 493 const cl_event *event_wait_list, 494 const cl_event *event); 495 cl_int ValidateEnqueueSVMMemcpy(cl_command_queue command_queue, 496 cl_bool blocking_copy, 497 const void *dst_ptr, 498 const void *src_ptr, 499 size_t size, 500 cl_uint num_events_in_wait_list, 501 const cl_event *event_wait_list, 502 const cl_event *event); 503 cl_int ValidateEnqueueSVMMemFill(cl_command_queue command_queue, 504 const void *svm_ptr, 505 const void *pattern, 506 size_t pattern_size, 507 size_t size, 508 cl_uint num_events_in_wait_list, 509 const cl_event *event_wait_list, 510 const cl_event *event); 511 cl_int ValidateEnqueueSVMMap(cl_command_queue command_queue, 512 cl_bool blocking_map, 513 MapFlags flagsPacked, 514 const void *svm_ptr, 515 size_t size, 516 cl_uint num_events_in_wait_list, 517 const cl_event *event_wait_list, 518 const cl_event *event); 519 cl_int ValidateEnqueueSVMUnmap(cl_command_queue command_queue, 520 const void *svm_ptr, 521 cl_uint num_events_in_wait_list, 522 const cl_event *event_wait_list, 523 const cl_event *event); 524 525 // CL 2.1 526 cl_int ValidateSetDefaultDeviceCommandQueue(cl_context context, 527 cl_device_id device, 528 cl_command_queue command_queue); 529 cl_int ValidateGetDeviceAndHostTimer(cl_device_id device, 530 const cl_ulong *device_timestamp, 531 const cl_ulong *host_timestamp); 532 cl_int ValidateGetHostTimer(cl_device_id device, const cl_ulong *host_timestamp); 533 cl_int ValidateCreateProgramWithIL(cl_context context, const void *il, size_t length); 534 cl_int ValidateCloneKernel(cl_kernel source_kernel); 535 cl_int ValidateGetKernelSubGroupInfo(cl_kernel kernel, 536 cl_device_id device, 537 KernelSubGroupInfo param_namePacked, 538 size_t input_value_size, 539 const void *input_value, 540 size_t param_value_size, 541 const void *param_value, 542 const size_t *param_value_size_ret); 543 cl_int ValidateEnqueueSVMMigrateMem(cl_command_queue command_queue, 544 cl_uint num_svm_pointers, 545 const void **svm_pointers, 546 const size_t *sizes, 547 MemMigrationFlags flagsPacked, 548 cl_uint num_events_in_wait_list, 549 const cl_event *event_wait_list, 550 const cl_event *event); 551 552 // CL 2.2 553 cl_int ValidateSetProgramReleaseCallback(cl_program program, 554 void(CL_CALLBACK *pfn_notify)(cl_program program, 555 void *user_data), 556 const void *user_data); 557 cl_int ValidateSetProgramSpecializationConstant(cl_program program, 558 cl_uint spec_id, 559 size_t spec_size, 560 const void *spec_value); 561 562 // CL 3.0 563 cl_int ValidateSetContextDestructorCallback(cl_context context, 564 void(CL_CALLBACK *pfn_notify)(cl_context context, 565 void *user_data), 566 const void *user_data); 567 cl_int ValidateCreateBufferWithProperties(cl_context context, 568 const cl_mem_properties *properties, 569 MemFlags flagsPacked, 570 size_t size, 571 const void *host_ptr); 572 cl_int ValidateCreateImageWithProperties(cl_context context, 573 const cl_mem_properties *properties, 574 MemFlags flagsPacked, 575 const cl_image_format *image_format, 576 const cl_image_desc *image_desc, 577 const void *host_ptr); 578 579 // cl_khr_icd 580 cl_int ValidateIcdGetPlatformIDsKHR(cl_uint num_entries, 581 const cl_platform_id *platforms, 582 const cl_uint *num_platforms); 583 } // namespace cl 584 585 #endif // LIBANGLE_VALIDATION_CL_AUTOGEN_H_ 586