diff --git a/CL/cl_ext.h b/CL/cl_ext.h index 67d1f805..02fc3164 100644 --- a/CL/cl_ext.h +++ b/CL/cl_ext.h @@ -51,6 +51,11 @@ extern "C" { #define CL_KHR_COMMAND_BUFFER_EXTENSION_NAME \ "cl_khr_command_buffer" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_COMMAND_BUFFER_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 4) +#endif + typedef cl_bitfield cl_device_command_buffer_capabilities_khr; typedef struct _cl_command_buffer_khr* cl_command_buffer_khr; typedef cl_uint cl_sync_point_khr; @@ -539,6 +544,11 @@ clCommandSVMMemFillKHR( #define CL_KHR_COMMAND_BUFFER_MULTI_DEVICE_EXTENSION_NAME \ "cl_khr_command_buffer_multi_device" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_COMMAND_BUFFER_MULTI_DEVICE_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 1) +#endif + typedef cl_bitfield cl_platform_command_buffer_capabilities_khr; /* cl_platform_info */ @@ -596,6 +606,11 @@ clRemapCommandBufferKHR( #define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_NAME \ "cl_khr_command_buffer_mutable_dispatch" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 1) +#endif + typedef cl_uint cl_command_buffer_structure_type_khr; typedef cl_bitfield cl_mutable_dispatch_fields_khr; typedef cl_uint cl_mutable_command_info_khr; @@ -719,6 +734,11 @@ clGetMutableCommandInfoKHR( #define CL_KHR_FP64_EXTENSION_NAME \ "cl_khr_fp64" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_FP64_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + #if !defined(CL_VERSION_1_2) /* cl_device_info - defined in CL.h for OpenCL 1.2 and newer */ #define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 @@ -732,6 +752,11 @@ clGetMutableCommandInfoKHR( #define CL_KHR_FP16_EXTENSION_NAME \ "cl_khr_fp16" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_FP16_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_device_info */ #define CL_DEVICE_HALF_FP_CONFIG 0x1033 @@ -743,6 +768,7 @@ clGetMutableCommandInfoKHR( "cl_APPLE_SetMemObjectDestructor" + typedef cl_int CL_API_CALL clSetMemObjectDestructorAPPLE_t( cl_mem memobj, @@ -770,6 +796,7 @@ clSetMemObjectDestructorAPPLE( "cl_APPLE_ContextLoggingFunctions" + typedef void CL_API_CALL clLogMessagesToSystemLogAPPLE_t( const char* errstr, @@ -832,6 +859,11 @@ clLogMessagesToStderrAPPLE( #define CL_KHR_ICD_EXTENSION_NAME \ "cl_khr_icd" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_ICD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_platform_info */ #define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920 @@ -865,6 +897,11 @@ clIcdGetPlatformIDsKHR( #define CL_KHR_IL_PROGRAM_EXTENSION_NAME \ "cl_khr_il_program" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_IL_PROGRAM_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_device_info */ #define CL_DEVICE_IL_VERSION_KHR 0x105B @@ -900,6 +937,11 @@ clCreateProgramWithILKHR( #define CL_KHR_IMAGE2D_FROM_BUFFER_EXTENSION_NAME \ "cl_khr_image2d_from_buffer" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_IMAGE2D_FROM_BUFFER_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_device_info */ #define CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR 0x104A #define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR 0x104B @@ -911,6 +953,11 @@ clCreateProgramWithILKHR( #define CL_KHR_INITIALIZE_MEMORY_EXTENSION_NAME \ "cl_khr_initialize_memory" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_INITIALIZE_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + typedef cl_bitfield cl_context_memory_initialize_khr; /* cl_context_properties */ @@ -927,6 +974,11 @@ typedef cl_bitfield cl_context_memory_initialize_khr; #define CL_KHR_TERMINATE_CONTEXT_EXTENSION_NAME \ "cl_khr_terminate_context" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_TERMINATE_CONTEXT_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + typedef cl_bitfield cl_device_terminate_capability_khr; /* cl_device_info */ @@ -964,6 +1016,11 @@ clTerminateContextKHR( #define CL_KHR_SPIR_EXTENSION_NAME \ "cl_khr_spir" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SPIR_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_device_info */ #define CL_DEVICE_SPIR_VERSIONS 0x40E0 @@ -977,6 +1034,11 @@ clTerminateContextKHR( #define CL_KHR_CREATE_COMMAND_QUEUE_EXTENSION_NAME \ "cl_khr_create_command_queue" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_CREATE_COMMAND_QUEUE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + typedef cl_properties cl_queue_properties_khr; @@ -1008,6 +1070,7 @@ clCreateCommandQueueWithPropertiesKHR( #define CL_NV_DEVICE_ATTRIBUTE_QUERY_EXTENSION_NAME \ "cl_nv_device_attribute_query" + /* cl_device_info */ #define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000 #define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001 @@ -1024,6 +1087,7 @@ clCreateCommandQueueWithPropertiesKHR( #define CL_AMD_DEVICE_ATTRIBUTE_QUERY_EXTENSION_NAME \ "cl_amd_device_attribute_query" + /* cl_device_info */ #define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036 #define CL_DEVICE_TOPOLOGY_AMD 0x4037 @@ -1054,6 +1118,7 @@ clCreateCommandQueueWithPropertiesKHR( #define CL_ARM_PRINTF_EXTENSION_NAME \ "cl_arm_printf" + /* cl_context_properties */ #define CL_PRINTF_CALLBACK_ARM 0x40B0 #define CL_PRINTF_BUFFERSIZE_ARM 0x40B1 @@ -1065,6 +1130,7 @@ clCreateCommandQueueWithPropertiesKHR( #define CL_EXT_DEVICE_FISSION_EXTENSION_NAME \ "cl_ext_device_fission" + typedef cl_ulong cl_device_partition_property_ext; /* Error codes */ @@ -1151,6 +1217,7 @@ clCreateSubDevicesEXT( #define CL_EXT_MIGRATE_MEMOBJECT_EXTENSION_NAME \ "cl_ext_migrate_memobject" + typedef cl_bitfield cl_mem_migration_flags_ext; /* cl_mem_migration_flags_ext */ @@ -1194,6 +1261,7 @@ clEnqueueMigrateMemObjectEXT( #define CL_EXT_CXX_FOR_OPENCL_EXTENSION_NAME \ "cl_ext_cxx_for_opencl" + /* cl_device_info */ #define CL_DEVICE_CXX_FOR_OPENCL_NUMERIC_VERSION_EXT 0x4230 @@ -1204,6 +1272,7 @@ clEnqueueMigrateMemObjectEXT( #define CL_QCOM_EXT_HOST_PTR_EXTENSION_NAME \ "cl_qcom_ext_host_ptr" + typedef cl_uint cl_image_pitch_info_qcom; typedef struct _cl_mem_ext_host_ptr { cl_uint allocation_type; @@ -1264,6 +1333,7 @@ clGetDeviceImageInfoQCOM( #define CL_QCOM_EXT_HOST_PTR_IOCOHERENT_EXTENSION_NAME \ "cl_qcom_ext_host_ptr_iocoherent" + /* cl_uint host_cache_policy */ #define CL_MEM_HOST_IOCOHERENT_QCOM 0x40A9 @@ -1274,6 +1344,7 @@ clGetDeviceImageInfoQCOM( #define CL_QCOM_ION_HOST_PTR_EXTENSION_NAME \ "cl_qcom_ion_host_ptr" + /* type cl_mem_ext_host_ptr */ typedef struct _cl_mem_ion_host_ptr { cl_mem_ext_host_ptr ext_host_ptr; @@ -1291,6 +1362,7 @@ typedef struct _cl_mem_ion_host_ptr { #define CL_QCOM_ANDROID_NATIVE_BUFFER_HOST_PTR_EXTENSION_NAME \ "cl_qcom_android_native_buffer_host_ptr" + /* type cl_mem_ext_host_ptr */ typedef struct _cl_mem_android_native_buffer_host_ptr { cl_mem_ext_host_ptr ext_host_ptr; @@ -1307,6 +1379,7 @@ typedef struct _cl_mem_android_native_buffer_host_ptr { #define CL_IMG_YUV_IMAGE_EXTENSION_NAME \ "cl_img_yuv_image" + /* cl_channel_order */ #define CL_NV21_IMG 0x40D0 #define CL_YV12_IMG 0x40D1 @@ -1318,6 +1391,7 @@ typedef struct _cl_mem_android_native_buffer_host_ptr { #define CL_IMG_CACHED_ALLOCATIONS_EXTENSION_NAME \ "cl_img_cached_allocations" + /* cl_mem_flags */ #define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26) #define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27) @@ -1329,6 +1403,7 @@ typedef struct _cl_mem_android_native_buffer_host_ptr { #define CL_IMG_USE_GRALLOC_PTR_EXTENSION_NAME \ "cl_img_use_gralloc_ptr" + /* Error codes */ #define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4 #define CL_INVALID_GRALLOC_OBJECT_IMG 0x40D5 @@ -1394,6 +1469,7 @@ clEnqueueReleaseGrallocObjectsIMG( #define CL_IMG_GENERATE_MIPMAP_EXTENSION_NAME \ "cl_img_generate_mipmap" + typedef cl_uint cl_mipmap_filter_mode_img; /* cl_mipmap_filter_mode_img */ @@ -1442,6 +1518,7 @@ clEnqueueGenerateMipmapIMG( #define CL_IMG_MEM_PROPERTIES_EXTENSION_NAME \ "cl_img_mem_properties" + /* cl_mem_properties */ #define CL_MEM_ALLOC_FLAGS_IMG 0x40D7 @@ -1463,6 +1540,11 @@ clEnqueueGenerateMipmapIMG( #define CL_KHR_SUBGROUPS_EXTENSION_NAME \ "cl_khr_subgroups" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUPS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + #if !defined(CL_VERSION_2_1) /* defined in CL.h for OpenCL 2.1 and newer */ typedef cl_uint cl_kernel_sub_group_info; @@ -1510,6 +1592,11 @@ clGetKernelSubGroupInfoKHR( #define CL_KHR_MIPMAP_IMAGE_EXTENSION_NAME \ "cl_khr_mipmap_image" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_MIPMAP_IMAGE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_sampler_properties */ #define CL_SAMPLER_MIP_FILTER_MODE_KHR 0x1155 #define CL_SAMPLER_LOD_MIN_KHR 0x1156 @@ -1522,6 +1609,11 @@ clGetKernelSubGroupInfoKHR( #define CL_KHR_PRIORITY_HINTS_EXTENSION_NAME \ "cl_khr_priority_hints" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_PRIORITY_HINTS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* To be used by clGetEventInfo */ typedef cl_uint cl_queue_priority_khr; @@ -1540,6 +1632,11 @@ typedef cl_uint cl_queue_priority_khr; #define CL_KHR_THROTTLE_HINTS_EXTENSION_NAME \ "cl_khr_throttle_hints" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_THROTTLE_HINTS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* To be used by clGetEventInfo */ typedef cl_uint cl_queue_throttle_khr; @@ -1558,6 +1655,11 @@ typedef cl_uint cl_queue_throttle_khr; #define CL_KHR_SUBGROUP_NAMED_BARRIER_EXTENSION_NAME \ "cl_khr_subgroup_named_barrier" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUP_NAMED_BARRIER_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_device_info */ #define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035 @@ -1568,6 +1670,11 @@ typedef cl_uint cl_queue_throttle_khr; #define CL_KHR_EXTENDED_VERSIONING_EXTENSION_NAME \ "cl_khr_extended_versioning" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTENDED_VERSIONING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + #define CL_VERSION_MAJOR_BITS_KHR 10 #define CL_VERSION_MINOR_BITS_KHR 10 #define CL_VERSION_PATCH_BITS_KHR 12 @@ -1611,6 +1718,11 @@ typedef struct _cl_name_version_khr { #define CL_KHR_DEVICE_UUID_EXTENSION_NAME \ "cl_khr_device_uuid" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_DEVICE_UUID_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* Size Constants */ #define CL_UUID_SIZE_KHR 16 #define CL_LUID_SIZE_KHR 8 @@ -1629,6 +1741,11 @@ typedef struct _cl_name_version_khr { #define CL_KHR_PCI_BUS_INFO_EXTENSION_NAME \ "cl_khr_pci_bus_info" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_PCI_BUS_INFO_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + typedef struct _cl_device_pci_bus_info_khr { cl_uint pci_domain; cl_uint pci_bus; @@ -1647,6 +1764,11 @@ typedef struct _cl_device_pci_bus_info_khr { "cl_khr_suggested_local_work_size" +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUGGESTED_LOCAL_WORK_SIZE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + + typedef cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeKHR_t( cl_command_queue command_queue, @@ -1679,6 +1801,11 @@ clGetKernelSuggestedLocalWorkSizeKHR( #define CL_KHR_INTEGER_DOT_PRODUCT_EXTENSION_NAME \ "cl_khr_integer_dot_product" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_INTEGER_DOT_PRODUCT_EXTENSION_VERSION CL_MAKE_VERSION(2, 0, 0) +#endif + typedef cl_bitfield cl_device_integer_dot_product_capabilities_khr; typedef struct _cl_device_integer_dot_product_acceleration_properties_khr { cl_bool signed_accelerated; @@ -1705,6 +1832,11 @@ typedef struct _cl_device_integer_dot_product_acceleration_properties_khr { #define CL_KHR_EXTERNAL_MEMORY_EXTENSION_NAME \ "cl_khr_external_memory" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + typedef cl_uint cl_external_memory_handle_type_khr; /* cl_platform_info */ @@ -1776,6 +1908,11 @@ clEnqueueReleaseExternalMemObjectsKHR( #define CL_KHR_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME \ "cl_khr_external_memory_dma_buf" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_external_memory_handle_type_khr */ #define CL_EXTERNAL_MEMORY_HANDLE_DMA_BUF_KHR 0x2067 @@ -1786,6 +1923,11 @@ clEnqueueReleaseExternalMemObjectsKHR( #define CL_KHR_EXTERNAL_MEMORY_DX_EXTENSION_NAME \ "cl_khr_external_memory_dx" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_MEMORY_DX_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 3) +#endif + /* cl_external_memory_handle_type_khr */ #define CL_EXTERNAL_MEMORY_HANDLE_D3D11_TEXTURE_KHR 0x2063 #define CL_EXTERNAL_MEMORY_HANDLE_D3D11_TEXTURE_KMT_KHR 0x2064 @@ -1799,6 +1941,11 @@ clEnqueueReleaseExternalMemObjectsKHR( #define CL_KHR_EXTERNAL_MEMORY_OPAQUE_FD_EXTENSION_NAME \ "cl_khr_external_memory_opaque_fd" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_MEMORY_OPAQUE_FD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_external_memory_handle_type_khr */ #define CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_FD_KHR 0x2060 @@ -1809,6 +1956,11 @@ clEnqueueReleaseExternalMemObjectsKHR( #define CL_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME \ "cl_khr_external_memory_win32" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_external_memory_handle_type_khr */ #define CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KHR 0x2061 #define CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KMT_KHR 0x2062 @@ -1820,6 +1972,11 @@ clEnqueueReleaseExternalMemObjectsKHR( #define CL_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME \ "cl_khr_external_semaphore" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_SEMAPHORE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + typedef struct _cl_semaphore_khr * cl_semaphore_khr; typedef cl_uint cl_external_semaphore_handle_type_khr; @@ -1871,6 +2028,11 @@ clGetSemaphoreHandleForTypeKHR( #define CL_KHR_EXTERNAL_SEMAPHORE_DX_FENCE_EXTENSION_NAME \ "cl_khr_external_semaphore_dx_fence" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_SEMAPHORE_DX_FENCE_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 0) +#endif + /* cl_external_semaphore_handle_type_khr */ #define CL_SEMAPHORE_HANDLE_D3D12_FENCE_KHR 0x2059 @@ -1881,6 +2043,11 @@ clGetSemaphoreHandleForTypeKHR( #define CL_KHR_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXTENSION_NAME \ "cl_khr_external_semaphore_opaque_fd" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* cl_external_semaphore_handle_type_khr */ #define CL_SEMAPHORE_HANDLE_OPAQUE_FD_KHR 0x2055 @@ -1891,6 +2058,11 @@ clGetSemaphoreHandleForTypeKHR( #define CL_KHR_EXTERNAL_SEMAPHORE_SYNC_FD_EXTENSION_NAME \ "cl_khr_external_semaphore_sync_fd" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_SEMAPHORE_SYNC_FD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + typedef cl_properties cl_semaphore_reimport_properties_khr; /* cl_external_semaphore_handle_type_khr */ @@ -1923,6 +2095,11 @@ clReImportSemaphoreSyncFdKHR( #define CL_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME \ "cl_khr_external_semaphore_win32" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 0) +#endif + /* cl_external_semaphore_handle_type_khr */ #define CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KHR 0x2056 #define CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KMT_KHR 0x2057 @@ -1934,6 +2111,11 @@ clReImportSemaphoreSyncFdKHR( #define CL_KHR_SEMAPHORE_EXTENSION_NAME \ "cl_khr_semaphore" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SEMAPHORE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /* type cl_semaphore_khr */ typedef cl_properties cl_semaphore_properties_khr; typedef cl_uint cl_semaphore_info_khr; @@ -2081,6 +2263,7 @@ clRetainSemaphoreKHR( #define CL_ARM_IMPORT_MEMORY_EXTENSION_NAME \ "cl_arm_import_memory" + typedef intptr_t cl_import_properties_arm; /* cl_import_properties_arm */ @@ -2127,6 +2310,7 @@ clImportMemoryARM( #define CL_ARM_SHARED_VIRTUAL_MEMORY_EXTENSION_NAME \ "cl_arm_shared_virtual_memory" + typedef cl_bitfield cl_svm_mem_flags_arm; typedef cl_uint cl_kernel_exec_info_arm; typedef cl_bitfield cl_device_svm_capabilities_arm; @@ -2353,6 +2537,7 @@ clSetKernelExecInfoARM( #define CL_ARM_GET_CORE_ID_EXTENSION_NAME \ "cl_arm_get_core_id" + /* cl_device_info */ #define CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM 0x40BF @@ -2365,6 +2550,7 @@ clSetKernelExecInfoARM( #define CL_ARM_JOB_SLOT_SELECTION_EXTENSION_NAME \ "cl_arm_job_slot_selection" + /* cl_device_info */ #define CL_DEVICE_JOB_SLOTS_ARM 0x41E0 @@ -2378,6 +2564,7 @@ clSetKernelExecInfoARM( #define CL_ARM_SCHEDULING_CONTROLS_EXTENSION_NAME \ "cl_arm_scheduling_controls" + /* Types */ typedef cl_bitfield cl_device_scheduling_controls_capabilities_arm; @@ -2417,6 +2604,7 @@ typedef cl_bitfield cl_device_scheduling_controls_capabilities_arm; #define CL_ARM_CONTROLLED_KERNEL_TERMINATION_EXTENSION_NAME \ "cl_arm_controlled_kernel_termination" + /* Types */ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; @@ -2447,6 +2635,7 @@ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; #define CL_ARM_PROTECTED_MEMORY_ALLOCATION_EXTENSION_NAME \ "cl_arm_protected_memory_allocation" + #define CL_MEM_PROTECTED_ALLOC_ARM ((cl_bitfield)1 << 36) /*************************************************************** @@ -2456,6 +2645,7 @@ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; #define CL_INTEL_EXEC_BY_LOCAL_THREAD_EXTENSION_NAME \ "cl_intel_exec_by_local_thread" + /* cl_command_queue_properties - bitfield */ #define CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL ((cl_bitfield)1 << 31) @@ -2466,6 +2656,7 @@ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; #define CL_INTEL_DEVICE_ATTRIBUTE_QUERY_EXTENSION_NAME \ "cl_intel_device_attribute_query" + typedef cl_bitfield cl_device_feature_capabilities_intel; /* cl_device_feature_capabilities_intel */ @@ -2488,6 +2679,7 @@ typedef cl_bitfield cl_device_feature_capabilities_intel; #define CL_INTEL_DEVICE_PARTITION_BY_NAMES_EXTENSION_NAME \ "cl_intel_device_partition_by_names" + #define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052 #define CL_PARTITION_BY_NAMES_LIST_END_INTEL -1 @@ -2498,6 +2690,7 @@ typedef cl_bitfield cl_device_feature_capabilities_intel; #define CL_INTEL_ACCELERATOR_EXTENSION_NAME \ "cl_intel_accelerator" + typedef struct _cl_accelerator_intel* cl_accelerator_intel; typedef cl_uint cl_accelerator_type_intel; typedef cl_uint cl_accelerator_info_intel; @@ -2586,6 +2779,7 @@ clReleaseAcceleratorINTEL( #define CL_INTEL_MOTION_ESTIMATION_EXTENSION_NAME \ "cl_intel_motion_estimation" + typedef struct _cl_motion_estimation_desc_intel { cl_uint mb_block_type; cl_uint subpixel_mode; @@ -2622,6 +2816,7 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_ADVANCED_MOTION_ESTIMATION_EXTENSION_NAME \ "cl_intel_advanced_motion_estimation" + /* cl_device_info */ #define CL_DEVICE_ME_VERSION_INTEL 0x407E @@ -2678,6 +2873,7 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_SIMULTANEOUS_SHARING_EXTENSION_NAME \ "cl_intel_simultaneous_sharing" + /* cl_device_info */ #define CL_DEVICE_SIMULTANEOUS_INTEROPS_INTEL 0x4104 #define CL_DEVICE_NUM_SIMULTANEOUS_INTEROPS_INTEL 0x4105 @@ -2689,6 +2885,7 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_EGL_IMAGE_YUV_EXTENSION_NAME \ "cl_intel_egl_image_yuv" + /* cl_egl_image_properties_khr */ #define CL_EGL_YUV_PLANE_INTEL 0x4107 @@ -2699,6 +2896,7 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_PACKED_YUV_EXTENSION_NAME \ "cl_intel_packed_yuv" + /* cl_channel_order */ #define CL_YUYV_INTEL 0x4076 #define CL_UYVY_INTEL 0x4077 @@ -2712,6 +2910,7 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_REQUIRED_SUBGROUP_SIZE_EXTENSION_NAME \ "cl_intel_required_subgroup_size" + /* cl_device_info */ #define CL_DEVICE_SUB_GROUP_SIZES_INTEL 0x4108 @@ -2728,6 +2927,7 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_DRIVER_DIAGNOSTICS_EXTENSION_NAME \ "cl_intel_driver_diagnostics" + typedef cl_uint cl_diagnostics_verbose_level; /* cl_context_properties */ @@ -2744,6 +2944,7 @@ typedef cl_uint cl_diagnostics_verbose_level; #define CL_INTEL_PLANAR_YUV_EXTENSION_NAME \ "cl_intel_planar_yuv" + /* cl_channel_order */ #define CL_NV12_INTEL 0x410E @@ -2762,6 +2963,7 @@ typedef cl_uint cl_diagnostics_verbose_level; #define CL_INTEL_DEVICE_SIDE_AVC_MOTION_ESTIMATION_EXTENSION_NAME \ "cl_intel_device_side_avc_motion_estimation" + /* cl_device_info */ #define CL_DEVICE_AVC_ME_VERSION_INTEL 0x410B #define CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL 0x410C @@ -2919,6 +3121,7 @@ typedef cl_uint cl_diagnostics_verbose_level; #define CL_INTEL_UNIFIED_SHARED_MEMORY_EXTENSION_NAME \ "cl_intel_unified_shared_memory" + typedef cl_bitfield cl_device_unified_shared_memory_capabilities_intel; typedef cl_properties cl_mem_properties_intel; typedef cl_bitfield cl_mem_alloc_flags_intel; @@ -3240,6 +3443,7 @@ clEnqueueMemsetINTEL( #define CL_INTEL_MEM_ALLOC_BUFFER_LOCATION_EXTENSION_NAME \ "cl_intel_mem_alloc_buffer_location" + /* cl_mem_properties_intel */ #define CL_MEM_ALLOC_BUFFER_LOCATION_INTEL 0x419E @@ -3253,6 +3457,7 @@ clEnqueueMemsetINTEL( #define CL_INTEL_CREATE_BUFFER_WITH_PROPERTIES_EXTENSION_NAME \ "cl_intel_create_buffer_with_properties" + /* type cl_mem_properties_intel */ @@ -3288,6 +3493,7 @@ clCreateBufferWithPropertiesINTEL( #define CL_INTEL_PROGRAM_SCOPE_HOST_PIPE_EXTENSION_NAME \ "cl_intel_program_scope_host_pipe" + /* clGetEventInfo response when param_name is CL_EVENT_COMMAND_TYPE */ #define CL_COMMAND_READ_HOST_PIPE_INTEL 0x4214 #define CL_COMMAND_WRITE_HOST_PIPE_INTEL 0x4215 @@ -3362,6 +3568,7 @@ clEnqueueWriteHostPipeINTEL( #define CL_INTEL_MEM_CHANNEL_PROPERTY_EXTENSION_NAME \ "cl_intel_mem_channel_property" + /* cl_mem_properties_intel */ #define CL_MEM_CHANNEL_INTEL 0x4213 @@ -3372,6 +3579,7 @@ clEnqueueWriteHostPipeINTEL( #define CL_INTEL_MEM_FORCE_HOST_MEMORY_EXTENSION_NAME \ "cl_intel_mem_force_host_memory" + /* cl_mem_flags */ #define CL_MEM_FORCE_HOST_MEMORY_INTEL (1 << 20) @@ -3382,6 +3590,7 @@ clEnqueueWriteHostPipeINTEL( #define CL_INTEL_COMMAND_QUEUE_FAMILIES_EXTENSION_NAME \ "cl_intel_command_queue_families" + typedef cl_bitfield cl_command_queue_capabilities_intel; #define CL_QUEUE_FAMILY_MAX_NAME_SIZE_INTEL 64 @@ -3426,6 +3635,7 @@ typedef struct _cl_queue_family_properties_intel { #define CL_INTEL_QUEUE_NO_SYNC_OPERATIONS_EXTENSION_NAME \ "cl_intel_queue_no_sync_operations" + /* cl_command_queue_properties */ #define CL_QUEUE_NO_SYNC_OPERATIONS_INTEL (1 << 29) @@ -3436,6 +3646,7 @@ typedef struct _cl_queue_family_properties_intel { #define CL_INTEL_SHARING_FORMAT_QUERY_EXTENSION_NAME \ "cl_intel_sharing_format_query" + /*************************************************************** * cl_ext_image_requirements_info ***************************************************************/ @@ -3445,6 +3656,7 @@ typedef struct _cl_queue_family_properties_intel { #define CL_EXT_IMAGE_REQUIREMENTS_INFO_EXTENSION_NAME \ "cl_ext_image_requirements_info" + /* Types */ typedef cl_uint cl_image_requirements_info_ext; @@ -3501,6 +3713,7 @@ clGetImageRequirementsInfoEXT( #define CL_EXT_IMAGE_FROM_BUFFER_EXTENSION_NAME \ "cl_ext_image_from_buffer" + /* cl_image_requirements_info_ext */ #define CL_IMAGE_REQUIREMENTS_SLICE_PITCH_ALIGNMENT_EXT 0x1291 @@ -3513,6 +3726,11 @@ clGetImageRequirementsInfoEXT( #define CL_LOADER_INFO_EXTENSION_NAME \ "cl_loader_info" + +#ifdef CL_VERSION_3_0 +#define CL_LOADER_INFO_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + typedef cl_uint cl_icdl_info; /* cl_icdl_info */ @@ -3550,6 +3768,11 @@ clGetICDLoaderInfoOCLICD( #define CL_KHR_DEPTH_IMAGES_EXTENSION_NAME \ "cl_khr_depth_images" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_DEPTH_IMAGES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + #if !defined(CL_VERSION_2_0) /* cl_channel_order - defined in CL.h for OpenCL 2.0 and newer */ #define CL_DEPTH 0x10BD @@ -3563,6 +3786,7 @@ clGetICDLoaderInfoOCLICD( #define CL_EXT_FLOAT_ATOMICS_EXTENSION_NAME \ "cl_ext_float_atomics" + typedef cl_bitfield cl_device_fp_atomic_capabilities_ext; /* cl_device_fp_atomic_capabilities_ext */ @@ -3585,6 +3809,7 @@ typedef cl_bitfield cl_device_fp_atomic_capabilities_ext; #define CL_INTEL_CREATE_MEM_OBJECT_PROPERTIES_EXTENSION_NAME \ "cl_intel_create_mem_object_properties" + /* cl_mem_properties */ #define CL_MEM_LOCALLY_UNCACHED_RESOURCE_INTEL 0x4218 #define CL_MEM_DEVICE_ID_INTEL 0x4219 @@ -3597,6 +3822,7 @@ typedef cl_bitfield cl_device_fp_atomic_capabilities_ext; "cl_pocl_content_size" + typedef cl_int CL_API_CALL clSetContentSizeBufferPoCL_t( cl_mem buffer, @@ -3621,6 +3847,7 @@ clSetContentSizeBufferPoCL( #define CL_EXT_IMAGE_RAW10_RAW12_EXTENSION_NAME \ "cl_ext_image_raw10_raw12" + /* cl_channel_type */ #define CL_UNSIGNED_INT_RAW10_EXT 0x10E3 #define CL_UNSIGNED_INT_RAW12_EXT 0x10E4 @@ -3632,6 +3859,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_3D_IMAGE_WRITES_EXTENSION_NAME \ "cl_khr_3d_image_writes" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_3D_IMAGE_WRITES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_async_work_group_copy_fence ***************************************************************/ @@ -3639,6 +3871,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_ASYNC_WORK_GROUP_COPY_FENCE_EXTENSION_NAME \ "cl_khr_async_work_group_copy_fence" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_ASYNC_WORK_GROUP_COPY_FENCE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_byte_addressable_store ***************************************************************/ @@ -3646,6 +3883,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_BYTE_ADDRESSABLE_STORE_EXTENSION_NAME \ "cl_khr_byte_addressable_store" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_BYTE_ADDRESSABLE_STORE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_device_enqueue_local_arg_types ***************************************************************/ @@ -3653,6 +3895,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_DEVICE_ENQUEUE_LOCAL_ARG_TYPES_EXTENSION_NAME \ "cl_khr_device_enqueue_local_arg_types" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_DEVICE_ENQUEUE_LOCAL_ARG_TYPES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_expect_assume ***************************************************************/ @@ -3660,6 +3907,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_EXPECT_ASSUME_EXTENSION_NAME \ "cl_khr_expect_assume" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXPECT_ASSUME_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_extended_async_copies ***************************************************************/ @@ -3667,6 +3919,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_EXTENDED_ASYNC_COPIES_EXTENSION_NAME \ "cl_khr_extended_async_copies" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTENDED_ASYNC_COPIES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_extended_bit_ops ***************************************************************/ @@ -3674,6 +3931,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_EXTENDED_BIT_OPS_EXTENSION_NAME \ "cl_khr_extended_bit_ops" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_EXTENDED_BIT_OPS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_global_int32_base_atomics ***************************************************************/ @@ -3681,6 +3943,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_GLOBAL_INT32_BASE_ATOMICS_EXTENSION_NAME \ "cl_khr_global_int32_base_atomics" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_GLOBAL_INT32_BASE_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_global_int32_extended_atomics ***************************************************************/ @@ -3688,6 +3955,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_GLOBAL_INT32_EXTENDED_ATOMICS_EXTENSION_NAME \ "cl_khr_global_int32_extended_atomics" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_GLOBAL_INT32_EXTENDED_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_int64_base_atomics ***************************************************************/ @@ -3695,6 +3967,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_INT64_BASE_ATOMICS_EXTENSION_NAME \ "cl_khr_int64_base_atomics" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_INT64_BASE_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_int64_extended_atomics ***************************************************************/ @@ -3702,6 +3979,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_INT64_EXTENDED_ATOMICS_EXTENSION_NAME \ "cl_khr_int64_extended_atomics" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_INT64_EXTENDED_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_kernel_clock ***************************************************************/ @@ -3709,6 +3991,11 @@ clSetContentSizeBufferPoCL( #define CL_KHR_KERNEL_CLOCK_EXTENSION_NAME \ "cl_khr_kernel_clock" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_KERNEL_CLOCK_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 0) +#endif + /* cl_device_info */ #define CL_DEVICE_KERNEL_CLOCK_CAPABILITIES_KHR 0x1076 @@ -3726,6 +4013,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_LOCAL_INT32_BASE_ATOMICS_EXTENSION_NAME \ "cl_khr_local_int32_base_atomics" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_LOCAL_INT32_BASE_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_local_int32_extended_atomics ***************************************************************/ @@ -3733,6 +4025,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_LOCAL_INT32_EXTENDED_ATOMICS_EXTENSION_NAME \ "cl_khr_local_int32_extended_atomics" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_LOCAL_INT32_EXTENDED_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_mipmap_image_writes ***************************************************************/ @@ -3740,6 +4037,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_MIPMAP_IMAGE_WRITES_EXTENSION_NAME \ "cl_khr_mipmap_image_writes" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_MIPMAP_IMAGE_WRITES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_select_fprounding_mode ***************************************************************/ @@ -3747,6 +4049,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SELECT_FPROUNDING_MODE_EXTENSION_NAME \ "cl_khr_select_fprounding_mode" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SELECT_FPROUNDING_MODE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_spirv_extended_debug_info ***************************************************************/ @@ -3754,6 +4061,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SPIRV_EXTENDED_DEBUG_INFO_EXTENSION_NAME \ "cl_khr_spirv_extended_debug_info" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SPIRV_EXTENDED_DEBUG_INFO_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_spirv_linkonce_odr ***************************************************************/ @@ -3761,6 +4073,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SPIRV_LINKONCE_ODR_EXTENSION_NAME \ "cl_khr_spirv_linkonce_odr" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SPIRV_LINKONCE_ODR_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_spirv_no_integer_wrap_decoration ***************************************************************/ @@ -3768,6 +4085,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SPIRV_NO_INTEGER_WRAP_DECORATION_EXTENSION_NAME \ "cl_khr_spirv_no_integer_wrap_decoration" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SPIRV_NO_INTEGER_WRAP_DECORATION_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_srgb_image_writes ***************************************************************/ @@ -3775,6 +4097,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SRGB_IMAGE_WRITES_EXTENSION_NAME \ "cl_khr_srgb_image_writes" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SRGB_IMAGE_WRITES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_subgroup_ballot ***************************************************************/ @@ -3782,6 +4109,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_BALLOT_EXTENSION_NAME \ "cl_khr_subgroup_ballot" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUP_BALLOT_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_subgroup_clustered_reduce ***************************************************************/ @@ -3789,6 +4121,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_CLUSTERED_REDUCE_EXTENSION_NAME \ "cl_khr_subgroup_clustered_reduce" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUP_CLUSTERED_REDUCE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_subgroup_extended_types ***************************************************************/ @@ -3796,6 +4133,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME \ "cl_khr_subgroup_extended_types" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUP_EXTENDED_TYPES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_subgroup_non_uniform_arithmetic ***************************************************************/ @@ -3803,6 +4145,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_NON_UNIFORM_ARITHMETIC_EXTENSION_NAME \ "cl_khr_subgroup_non_uniform_arithmetic" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUP_NON_UNIFORM_ARITHMETIC_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_subgroup_non_uniform_vote ***************************************************************/ @@ -3810,6 +4157,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_NON_UNIFORM_VOTE_EXTENSION_NAME \ "cl_khr_subgroup_non_uniform_vote" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUP_NON_UNIFORM_VOTE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_subgroup_rotate ***************************************************************/ @@ -3817,6 +4169,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_ROTATE_EXTENSION_NAME \ "cl_khr_subgroup_rotate" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUP_ROTATE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_subgroup_shuffle ***************************************************************/ @@ -3824,6 +4181,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_SHUFFLE_EXTENSION_NAME \ "cl_khr_subgroup_shuffle" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUP_SHUFFLE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_subgroup_shuffle_relative ***************************************************************/ @@ -3831,6 +4193,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_SHUFFLE_RELATIVE_EXTENSION_NAME \ "cl_khr_subgroup_shuffle_relative" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_SUBGROUP_SHUFFLE_RELATIVE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_khr_work_group_uniform_arithmetic ***************************************************************/ @@ -3838,6 +4205,11 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_WORK_GROUP_UNIFORM_ARITHMETIC_EXTENSION_NAME \ "cl_khr_work_group_uniform_arithmetic" + +#ifdef CL_VERSION_3_0 +#define CL_KHR_WORK_GROUP_UNIFORM_ARITHMETIC_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) +#endif + /*************************************************************** * cl_img_cancel_command ***************************************************************/ @@ -3845,6 +4217,7 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_IMG_CANCEL_COMMAND_EXTENSION_NAME \ "cl_img_cancel_command" + /* Error codes */ #define CL_CANCELLED_IMG -1126 diff --git a/scripts/cl_ext.h.mako b/scripts/cl_ext.h.mako index c1f89260..f780d5e6 100644 --- a/scripts/cl_ext.h.mako +++ b/scripts/cl_ext.h.mako @@ -312,6 +312,23 @@ extern "C" { #define ${name.upper()}_EXTENSION_NAME ${"\\"} "${name}" +%if extension.get('revision'): +<% + import re + sem_ver = re.match('[0-9]+\.[0-9]+\.?[0-9]+', extension.get('revision')) + if not sem_ver: + raise TypeError(name + + ' XML revision field is not semantically versioned as "major.minor.patch"') + version = sem_ver[0].split('.') + major = version[0] + minor = version[1] + patch = version[2] +%> +#ifdef CL_VERSION_3_0 +#define ${name.upper()}_EXTENSION_VERSION CL_MAKE_VERSION(${major}, ${minor}, ${patch}) +#endif +%endif + %for block in extension.findall('require'): % if shouldEmit(block): % if block.get('condition'): diff --git a/tests/lang_c/CMakeLists.txt b/tests/lang_c/CMakeLists.txt index 0678ddef..df8cd5c6 100644 --- a/tests/lang_c/CMakeLists.txt +++ b/tests/lang_c/CMakeLists.txt @@ -16,3 +16,4 @@ add_header_test(cl_platform_h test_cl_platform.h.c) add_header_test(cl_opencl_h test_opencl.h.c) add_header_test(cl_version_h test_cl_version.h.c) add_header_test(headers test_headers.c) +add_header_test(ext_headers test_ext_headers.c) diff --git a/tests/lang_cpp/CMakeLists.txt b/tests/lang_cpp/CMakeLists.txt index 0678ddef..f4ef2341 100644 --- a/tests/lang_cpp/CMakeLists.txt +++ b/tests/lang_cpp/CMakeLists.txt @@ -15,4 +15,4 @@ add_header_test(cl_layer_h test_cl_layer.h.c) add_header_test(cl_platform_h test_cl_platform.h.c) add_header_test(cl_opencl_h test_opencl.h.c) add_header_test(cl_version_h test_cl_version.h.c) -add_header_test(headers test_headers.c) +add_header_test(ext_headers test_ext_headers.c) diff --git a/tests/test_ext_headers.c b/tests/test_ext_headers.c new file mode 100644 index 00000000..b510f0f7 --- /dev/null +++ b/tests/test_ext_headers.c @@ -0,0 +1,43 @@ +// +// Copyright (c) 2024 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. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include "CL/cl_ext.h" +#include +#include + +int extVersionMacro() { + printf( + "Checking version macro for the cl_khr_integer_dot_product extension\n"); + +#ifdef CL_VERSION_3_0 + cl_version ExtVersion = CL_KHR_INTEGER_DOT_PRODUCT_EXTENSION_VERSION; + cl_version ExtMajorVersion = CL_VERSION_MAJOR(ExtVersion); + cl_version ExtMinorVersion = CL_VERSION_MINOR(ExtVersion); + cl_version ExtPatchVersion = CL_VERSION_PATCH(ExtVersion); + + printf("cl_khr_integer_dot_product version value %" PRIu32 + " which is semantic version %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", + ExtVersion, ExtMajorVersion, ExtMinorVersion, ExtPatchVersion); +#endif + + return 0; +} + +int main(void) { + int Result = extVersionMacro(); + + return Result; +}