From 21f6bb8889d293dbbfd808c41de56c49304765a3 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Mon, 14 Apr 2025 12:24:03 +0000 Subject: [PATCH] build: update opencl headers to v2024.10.24 https://github.com/intel/compute-runtime/issues/822 Signed-off-by: Mateusz Jablonski --- opencl/source/context/context.cpp | 2 +- opencl/source/context/context.h | 6 +- opencl/source/context/driver_diagnostics.cpp | 4 +- opencl/source/context/driver_diagnostics.h | 6 +- opencl/source/sharings/gl/gl_sharing.h | 3 +- .../context/driver_diagnostics_tests.cpp | 6 +- .../context/driver_diagnostics_tests.h | 6 +- third_party/opencl_headers/.version | 2 +- third_party/opencl_headers/CL/cl.h | 8 +- third_party/opencl_headers/CL/cl_d3d10.h | 6 + third_party/opencl_headers/CL/cl_d3d11.h | 6 + .../opencl_headers/CL/cl_dx9_media_sharing.h | 9 + third_party/opencl_headers/CL/cl_egl.h | 6 + third_party/opencl_headers/CL/cl_ext.h | 442 ++++++++++++++++-- third_party/opencl_headers/CL/cl_gl.h | 19 + third_party/opencl_headers/CL/cl_platform.h | 7 +- .../CL/cl_va_api_media_sharing_intel.h | 6 + third_party/opencl_headers/README.md | 5 + 18 files changed, 476 insertions(+), 73 deletions(-) diff --git a/opencl/source/context/context.cpp b/opencl/source/context/context.cpp index b6dec1a9a7..cdf74e1868 100644 --- a/opencl/source/context/context.cpp +++ b/opencl/source/context/context.cpp @@ -249,7 +249,7 @@ bool Context::createImpl(const cl_context_properties *properties, driverDiagnosticsUsed = debugManager.flags.PrintDriverDiagnostics.get(); } if (driverDiagnosticsUsed >= 0) { - driverDiagnostics.reset(new DriverDiagnostics((cl_diagnostics_verbose_level)driverDiagnosticsUsed)); + driverDiagnostics = std::make_unique(static_cast(driverDiagnosticsUsed)); } this->numProperties = numProperties; diff --git a/opencl/source/context/context.h b/opencl/source/context/context.h index 16f13b46e4..fba14abf97 100644 --- a/opencl/source/context/context.h +++ b/opencl/source/context/context.h @@ -185,7 +185,7 @@ class Context : public BaseObject<_cl_context> { void registerSharing(Sharing *sharing); template - void providePerformanceHint(cl_diagnostics_verbose_level flags, PerformanceHints performanceHint, Args &&...args) { + void providePerformanceHint(cl_diagnostic_verbose_level_intel flags, PerformanceHints performanceHint, Args &&...args) { DEBUG_BREAK_IF(contextCallback == nullptr); DEBUG_BREAK_IF(driverDiagnostics == nullptr); char hint[DriverDiagnostics::maxHintStringSize]; @@ -202,8 +202,8 @@ class Context : public BaseObject<_cl_context> { template void providePerformanceHintForMemoryTransfer(cl_command_type commandType, bool transferRequired, Args &&...args) { - cl_diagnostics_verbose_level verboseLevel = transferRequired ? CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL - : CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL; + cl_diagnostic_verbose_level_intel verboseLevel = transferRequired ? CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL + : CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL; PerformanceHints hint = driverDiagnostics->obtainHintForTransferOperation(commandType, transferRequired); providePerformanceHint(verboseLevel, hint, args...); diff --git a/opencl/source/context/driver_diagnostics.cpp b/opencl/source/context/driver_diagnostics.cpp index 0513e47517..7b1aed3fae 100644 --- a/opencl/source/context/driver_diagnostics.cpp +++ b/opencl/source/context/driver_diagnostics.cpp @@ -11,11 +11,11 @@ namespace NEO { -DriverDiagnostics::DriverDiagnostics(cl_diagnostics_verbose_level level) { +DriverDiagnostics::DriverDiagnostics(cl_diagnostic_verbose_level_intel level) { this->verboseLevel = level; } -bool DriverDiagnostics::validFlags(cl_diagnostics_verbose_level flags) const { +bool DriverDiagnostics::validFlags(cl_diagnostic_verbose_level_intel flags) const { return !!(verboseLevel & flags); } diff --git a/opencl/source/context/driver_diagnostics.h b/opencl/source/context/driver_diagnostics.h index 5c2446736a..7c76901326 100644 --- a/opencl/source/context/driver_diagnostics.h +++ b/opencl/source/context/driver_diagnostics.h @@ -56,14 +56,14 @@ enum PerformanceHints { class DriverDiagnostics { public: - DriverDiagnostics(cl_diagnostics_verbose_level level); - bool validFlags(cl_diagnostics_verbose_level flags) const; + DriverDiagnostics(cl_diagnostic_verbose_level_intel level); + bool validFlags(cl_diagnostic_verbose_level_intel flags) const; ~DriverDiagnostics() = default; static const char *const hintFormat[]; static const cl_int maxHintStringSize = 1024; PerformanceHints obtainHintForTransferOperation(cl_command_type commandType, bool transferRequired); protected: - cl_diagnostics_verbose_level verboseLevel; + cl_diagnostic_verbose_level_intel verboseLevel; }; } // namespace NEO diff --git a/opencl/source/sharings/gl/gl_sharing.h b/opencl/source/sharings/gl/gl_sharing.h index f32816d327..52fde23d12 100644 --- a/opencl/source/sharings/gl/gl_sharing.h +++ b/opencl/source/sharings/gl/gl_sharing.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,6 +12,7 @@ #include "opencl/source/sharings/sharing.h" #include "CL/cl.h" +#include "CL/cl_gl.h" #if __clang__ #pragma clang diagnostic push diff --git a/opencl/test/unit_test/context/driver_diagnostics_tests.cpp b/opencl/test/unit_test/context/driver_diagnostics_tests.cpp index a4be5ed893..9fbbaf6b4e 100644 --- a/opencl/test/unit_test/context/driver_diagnostics_tests.cpp +++ b/opencl/test/unit_test/context/driver_diagnostics_tests.cpp @@ -38,14 +38,14 @@ void CL_CALLBACK callbackFunction(const char *providedHint, const void *flags, s strcpy_s((char *)userData + offset, DriverDiagnostics::maxHintStringSize, providedHint); } -cl_diagnostics_verbose_level diagnosticsVerboseLevels[] = { +cl_diagnostic_verbose_level_intel diagnosticsVerboseLevels[] = { CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL, CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL, CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL}; TEST_P(VerboseLevelTest, GivenVerboseLevelWhenProvidedHintLevelIsSameOrAllThenCallbackFunctionTakesProvidedHint) { cl_device_id deviceID = devices[0]; - cl_diagnostics_verbose_level diagnosticsLevel = GetParam(); + cl_diagnostic_verbose_level_intel diagnosticsLevel = GetParam(); cl_context_properties validProperties[3] = {CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL, (cl_context_properties)diagnosticsLevel, 0}; retVal = CL_SUCCESS; @@ -67,7 +67,7 @@ TEST_P(VerboseLevelTest, GivenVerboseLevelWhenProvidedHintLevelIsSameOrAllThenCa TEST_P(VerboseLevelTest, GivenVerboseLevelAllWhenAnyHintIsProvidedThenCallbackFunctionTakesProvidedHint) { cl_device_id deviceID = devices[0]; - cl_diagnostics_verbose_level providedHintLevel = GetParam(); + cl_diagnostic_verbose_level_intel providedHintLevel = GetParam(); cl_context_properties validProperties[3] = {CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL, CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL, 0}; retVal = CL_SUCCESS; diff --git a/opencl/test/unit_test/context/driver_diagnostics_tests.h b/opencl/test/unit_test/context/driver_diagnostics_tests.h index 592c2d1333..4e6e752ac7 100644 --- a/opencl/test/unit_test/context/driver_diagnostics_tests.h +++ b/opencl/test/unit_test/context/driver_diagnostics_tests.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -46,7 +46,7 @@ struct DriverDiagnosticsTest : public PlatformFixture, }; struct VerboseLevelTest : public DriverDiagnosticsTest, - public ::testing::WithParamInterface { + public ::testing::WithParamInterface { void SetUp() override { DriverDiagnosticsTest::SetUp(); @@ -57,7 +57,7 @@ struct VerboseLevelTest : public DriverDiagnosticsTest, void TearDown() override { DriverDiagnosticsTest::TearDown(); } - std::vector validLevels{ + std::vector validLevels{ CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL, CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL, CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL, diff --git a/third_party/opencl_headers/.version b/third_party/opencl_headers/.version index 8160d1ca90..604b9b9109 100644 --- a/third_party/opencl_headers/.version +++ b/third_party/opencl_headers/.version @@ -1,2 +1,2 @@ git_url: https://github.com/KhronosGroup/OpenCL-Headers -git_revision: v2024.05.08 +git_revision: v2024.10.24 diff --git a/third_party/opencl_headers/CL/cl.h b/third_party/opencl_headers/CL/cl.h index afeeb4ee5e..792e20cc8a 100644 --- a/third_party/opencl_headers/CL/cl.h +++ b/third_party/opencl_headers/CL/cl.h @@ -112,9 +112,9 @@ typedef cl_uint cl_kernel_exec_info; typedef cl_bitfield cl_device_atomic_capabilities; typedef cl_bitfield cl_device_device_enqueue_capabilities; typedef cl_uint cl_khronos_vendor_id; -typedef cl_properties cl_mem_properties; -typedef cl_uint cl_version; +typedef cl_properties cl_mem_properties; #endif +typedef cl_uint cl_version; typedef struct _cl_image_format { cl_channel_order image_channel_order; @@ -914,8 +914,6 @@ typedef struct _cl_name_version { /* cl_khronos_vendor_id */ #define CL_KHRONOS_VENDOR_ID_CODEPLAY 0x10004 -#ifdef CL_VERSION_3_0 - /* cl_version */ #define CL_VERSION_MAJOR_BITS (10) #define CL_VERSION_MINOR_BITS (10) @@ -939,8 +937,6 @@ typedef struct _cl_name_version { (((minor) & CL_VERSION_MINOR_MASK) << CL_VERSION_PATCH_BITS) | \ ((patch) & CL_VERSION_PATCH_MASK)) -#endif - /********************************************************************************************************/ /* CL_NO_PROTOTYPES implies CL_NO_CORE_PROTOTYPES: */ diff --git a/third_party/opencl_headers/CL/cl_d3d10.h b/third_party/opencl_headers/CL/cl_d3d10.h index 8404644a47..6b56c775bf 100644 --- a/third_party/opencl_headers/CL/cl_d3d10.h +++ b/third_party/opencl_headers/CL/cl_d3d10.h @@ -65,6 +65,9 @@ extern "C" { #define CL_KHR_D3D10_SHARING_EXTENSION_NAME \ "cl_khr_d3d10_sharing" + +#define CL_KHR_D3D10_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_uint cl_d3d10_device_source_khr; typedef cl_uint cl_d3d10_device_set_khr; @@ -228,6 +231,9 @@ clEnqueueReleaseD3D10ObjectsKHR( #define CL_INTEL_SHARING_FORMAT_QUERY_D3D10_EXTENSION_NAME \ "cl_intel_sharing_format_query_d3d10" + +#define CL_INTEL_SHARING_FORMAT_QUERY_D3D10_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* when cl_khr_d3d10_sharing is supported */ typedef cl_int CL_API_CALL diff --git a/third_party/opencl_headers/CL/cl_d3d11.h b/third_party/opencl_headers/CL/cl_d3d11.h index ade879509c..384c8f428f 100644 --- a/third_party/opencl_headers/CL/cl_d3d11.h +++ b/third_party/opencl_headers/CL/cl_d3d11.h @@ -65,6 +65,9 @@ extern "C" { #define CL_KHR_D3D11_SHARING_EXTENSION_NAME \ "cl_khr_d3d11_sharing" + +#define CL_KHR_D3D11_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_uint cl_d3d11_device_source_khr; typedef cl_uint cl_d3d11_device_set_khr; @@ -228,6 +231,9 @@ clEnqueueReleaseD3D11ObjectsKHR( #define CL_INTEL_SHARING_FORMAT_QUERY_D3D11_EXTENSION_NAME \ "cl_intel_sharing_format_query_d3d11" + +#define CL_INTEL_SHARING_FORMAT_QUERY_D3D11_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* when cl_khr_d3d11_sharing is supported */ typedef cl_int CL_API_CALL diff --git a/third_party/opencl_headers/CL/cl_dx9_media_sharing.h b/third_party/opencl_headers/CL/cl_dx9_media_sharing.h index c0df5c9198..b079379d0a 100644 --- a/third_party/opencl_headers/CL/cl_dx9_media_sharing.h +++ b/third_party/opencl_headers/CL/cl_dx9_media_sharing.h @@ -67,6 +67,9 @@ extern "C" { #define CL_KHR_DX9_MEDIA_SHARING_EXTENSION_NAME \ "cl_khr_dx9_media_sharing" + +#define CL_KHR_DX9_MEDIA_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_uint cl_dx9_media_adapter_type_khr; typedef cl_uint cl_dx9_media_adapter_set_khr; @@ -209,6 +212,9 @@ clEnqueueReleaseDX9MediaSurfacesKHR( #define CL_INTEL_DX9_MEDIA_SHARING_EXTENSION_NAME \ "cl_intel_dx9_media_sharing" + +#define CL_INTEL_DX9_MEDIA_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + typedef cl_uint cl_dx9_device_source_intel; typedef cl_uint cl_dx9_device_set_intel; @@ -341,6 +347,9 @@ clEnqueueReleaseDX9ObjectsINTEL( #define CL_INTEL_SHARING_FORMAT_QUERY_DX9_EXTENSION_NAME \ "cl_intel_sharing_format_query_dx9" + +#define CL_INTEL_SHARING_FORMAT_QUERY_DX9_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* when cl_khr_dx9_media_sharing or cl_intel_dx9_media_sharing is supported */ typedef cl_int CL_API_CALL diff --git a/third_party/opencl_headers/CL/cl_egl.h b/third_party/opencl_headers/CL/cl_egl.h index 25cd5e0cb5..68aefec761 100644 --- a/third_party/opencl_headers/CL/cl_egl.h +++ b/third_party/opencl_headers/CL/cl_egl.h @@ -51,6 +51,9 @@ extern "C" { #define CL_KHR_EGL_IMAGE_EXTENSION_NAME \ "cl_khr_egl_image" + +#define CL_KHR_EGL_IMAGE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* Command type for events created with clEnqueueAcquireEGLObjectsKHR */ #define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F #define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D @@ -144,6 +147,9 @@ clEnqueueReleaseEGLObjectsKHR( #define CL_KHR_EGL_EVENT_EXTENSION_NAME \ "cl_khr_egl_event" + +#define CL_KHR_EGL_EVENT_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* CLeglDisplayKHR is an opaque handle to an EGLDisplay */ /* type CLeglDisplayKHR */ diff --git a/third_party/opencl_headers/CL/cl_ext.h b/third_party/opencl_headers/CL/cl_ext.h index 67d1f8056e..1a48985e16 100644 --- a/third_party/opencl_headers/CL/cl_ext.h +++ b/third_party/opencl_headers/CL/cl_ext.h @@ -51,6 +51,9 @@ extern "C" { #define CL_KHR_COMMAND_BUFFER_EXTENSION_NAME \ "cl_khr_command_buffer" + +#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; typedef cl_uint cl_sync_point_khr; @@ -58,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 */ @@ -146,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, @@ -158,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, @@ -175,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, @@ -196,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, @@ -213,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, @@ -230,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, @@ -247,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, @@ -264,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, @@ -280,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, @@ -339,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, @@ -348,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, @@ -362,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, @@ -380,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, @@ -394,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, @@ -408,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, @@ -422,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, @@ -436,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, @@ -449,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, @@ -476,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, @@ -491,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, @@ -509,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, @@ -521,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, @@ -539,6 +562,9 @@ clCommandSVMMemFillKHR( #define CL_KHR_COMMAND_BUFFER_MULTI_DEVICE_EXTENSION_NAME \ "cl_khr_command_buffer_multi_device" + +#define CL_KHR_COMMAND_BUFFER_MULTI_DEVICE_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 1) + typedef cl_bitfield cl_platform_command_buffer_capabilities_khr; /* cl_platform_info */ @@ -596,7 +622,10 @@ clRemapCommandBufferKHR( #define CL_KHR_COMMAND_BUFFER_MUTABLE_DISPATCH_EXTENSION_NAME \ "cl_khr_command_buffer_mutable_dispatch" -typedef cl_uint cl_command_buffer_structure_type_khr; + +#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; typedef cl_uint cl_mutable_command_info_khr; typedef struct _cl_mutable_dispatch_arg_khr { @@ -610,8 +639,6 @@ typedef struct _cl_mutable_dispatch_exec_info_khr { const void* param_value; } cl_mutable_dispatch_exec_info_khr; typedef struct _cl_mutable_dispatch_config_khr { - cl_command_buffer_structure_type_khr type; - const void* next; cl_mutable_command_khr command; cl_uint num_args; cl_uint num_svm_args; @@ -624,12 +651,6 @@ typedef struct _cl_mutable_dispatch_config_khr { const size_t* global_work_size; const size_t* local_work_size; } cl_mutable_dispatch_config_khr; -typedef struct _cl_mutable_base_config_khr { - cl_command_buffer_structure_type_khr type; - const void* next; - cl_uint num_mutable_dispatch; - const cl_mutable_dispatch_config_khr* mutable_dispatch_list; -} cl_mutable_base_config_khr; typedef cl_bitfield cl_mutable_dispatch_asserts_khr; /* cl_command_buffer_flags_khr - bitfield */ @@ -641,7 +662,7 @@ typedef cl_bitfield cl_mutable_dispatch_asserts_khr; /* cl_device_info */ #define CL_DEVICE_MUTABLE_DISPATCH_CAPABILITIES_KHR 0x12B0 -/* cl_ndrange_kernel_command_properties_khr */ +/* cl_command_properties_khr */ #define CL_MUTABLE_DISPATCH_UPDATABLE_FIELDS_KHR 0x12B1 /* cl_mutable_dispatch_fields_khr - bitfield */ @@ -655,21 +676,20 @@ 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 #define CL_MUTABLE_DISPATCH_GLOBAL_WORK_SIZE_KHR 0x12A6 #define CL_MUTABLE_DISPATCH_LOCAL_WORK_SIZE_KHR 0x12A7 -/* cl_command_buffer_structure_type_khr */ -#define CL_STRUCTURE_TYPE_MUTABLE_BASE_CONFIG_KHR 0 -#define CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR 1 +/* cl_command_buffer_update_type_khr */ +#define CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR 0 /* cl_command_buffer_properties_khr */ #define CL_COMMAND_BUFFER_MUTABLE_DISPATCH_ASSERTS_KHR 0x12B7 -/* cl_ndrange_kernel_command_properties_khr */ +/* cl_command_properties_khr */ #define CL_MUTABLE_DISPATCH_ASSERTS_KHR 0x12B8 /* cl_mutable_dispatch_asserts_khr - bitfield */ @@ -679,7 +699,9 @@ typedef cl_bitfield cl_mutable_dispatch_asserts_khr; typedef cl_int CL_API_CALL clUpdateMutableCommandsKHR_t( cl_command_buffer_khr command_buffer, - const cl_mutable_base_config_khr* mutable_config); + cl_uint num_configs, + const cl_command_buffer_update_type_khr* config_types, + const void** configs); typedef clUpdateMutableCommandsKHR_t * clUpdateMutableCommandsKHR_fn ; @@ -700,7 +722,9 @@ clGetMutableCommandInfoKHR_fn ; extern CL_API_ENTRY cl_int CL_API_CALL clUpdateMutableCommandsKHR( cl_command_buffer_khr command_buffer, - const cl_mutable_base_config_khr* mutable_config) ; + cl_uint num_configs, + const cl_command_buffer_update_type_khr* config_types, + const void** configs) ; extern CL_API_ENTRY cl_int CL_API_CALL clGetMutableCommandInfoKHR( @@ -719,6 +743,9 @@ clGetMutableCommandInfoKHR( #define CL_KHR_FP64_EXTENSION_NAME \ "cl_khr_fp64" + +#define CL_KHR_FP64_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + #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 +759,9 @@ clGetMutableCommandInfoKHR( #define CL_KHR_FP16_EXTENSION_NAME \ "cl_khr_fp16" + +#define CL_KHR_FP16_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_device_info */ #define CL_DEVICE_HALF_FP_CONFIG 0x1033 @@ -743,6 +773,9 @@ clGetMutableCommandInfoKHR( "cl_APPLE_SetMemObjectDestructor" +#define CL_APPLE_SETMEMOBJECTDESTRUCTOR_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + + typedef cl_int CL_API_CALL clSetMemObjectDestructorAPPLE_t( cl_mem memobj, @@ -770,6 +803,9 @@ clSetMemObjectDestructorAPPLE( "cl_APPLE_ContextLoggingFunctions" +#define CL_APPLE_CONTEXTLOGGINGFUNCTIONS_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + + typedef void CL_API_CALL clLogMessagesToSystemLogAPPLE_t( const char* errstr, @@ -832,6 +868,9 @@ clLogMessagesToStderrAPPLE( #define CL_KHR_ICD_EXTENSION_NAME \ "cl_khr_icd" + +#define CL_KHR_ICD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_platform_info */ #define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920 @@ -865,6 +904,9 @@ clIcdGetPlatformIDsKHR( #define CL_KHR_IL_PROGRAM_EXTENSION_NAME \ "cl_khr_il_program" + +#define CL_KHR_IL_PROGRAM_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_device_info */ #define CL_DEVICE_IL_VERSION_KHR 0x105B @@ -900,6 +942,9 @@ clCreateProgramWithILKHR( #define CL_KHR_IMAGE2D_FROM_BUFFER_EXTENSION_NAME \ "cl_khr_image2d_from_buffer" + +#define CL_KHR_IMAGE2D_FROM_BUFFER_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_device_info */ #define CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR 0x104A #define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR 0x104B @@ -911,6 +956,9 @@ clCreateProgramWithILKHR( #define CL_KHR_INITIALIZE_MEMORY_EXTENSION_NAME \ "cl_khr_initialize_memory" + +#define CL_KHR_INITIALIZE_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_bitfield cl_context_memory_initialize_khr; /* cl_context_properties */ @@ -927,6 +975,9 @@ typedef cl_bitfield cl_context_memory_initialize_khr; #define CL_KHR_TERMINATE_CONTEXT_EXTENSION_NAME \ "cl_khr_terminate_context" + +#define CL_KHR_TERMINATE_CONTEXT_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_bitfield cl_device_terminate_capability_khr; /* cl_device_info */ @@ -964,6 +1015,9 @@ clTerminateContextKHR( #define CL_KHR_SPIR_EXTENSION_NAME \ "cl_khr_spir" + +#define CL_KHR_SPIR_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_device_info */ #define CL_DEVICE_SPIR_VERSIONS 0x40E0 @@ -977,6 +1031,9 @@ clTerminateContextKHR( #define CL_KHR_CREATE_COMMAND_QUEUE_EXTENSION_NAME \ "cl_khr_create_command_queue" + +#define CL_KHR_CREATE_COMMAND_QUEUE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_properties cl_queue_properties_khr; @@ -1008,6 +1065,9 @@ clCreateCommandQueueWithPropertiesKHR( #define CL_NV_DEVICE_ATTRIBUTE_QUERY_EXTENSION_NAME \ "cl_nv_device_attribute_query" + +#define CL_NV_DEVICE_ATTRIBUTE_QUERY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_device_info */ #define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000 #define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001 @@ -1024,6 +1084,9 @@ clCreateCommandQueueWithPropertiesKHR( #define CL_AMD_DEVICE_ATTRIBUTE_QUERY_EXTENSION_NAME \ "cl_amd_device_attribute_query" + +#define CL_AMD_DEVICE_ATTRIBUTE_QUERY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_device_info */ #define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036 #define CL_DEVICE_TOPOLOGY_AMD 0x4037 @@ -1054,6 +1117,9 @@ clCreateCommandQueueWithPropertiesKHR( #define CL_ARM_PRINTF_EXTENSION_NAME \ "cl_arm_printf" + +#define CL_ARM_PRINTF_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_context_properties */ #define CL_PRINTF_CALLBACK_ARM 0x40B0 #define CL_PRINTF_BUFFERSIZE_ARM 0x40B1 @@ -1065,6 +1131,9 @@ clCreateCommandQueueWithPropertiesKHR( #define CL_EXT_DEVICE_FISSION_EXTENSION_NAME \ "cl_ext_device_fission" + +#define CL_EXT_DEVICE_FISSION_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_ulong cl_device_partition_property_ext; /* Error codes */ @@ -1151,6 +1220,9 @@ clCreateSubDevicesEXT( #define CL_EXT_MIGRATE_MEMOBJECT_EXTENSION_NAME \ "cl_ext_migrate_memobject" + +#define CL_EXT_MIGRATE_MEMOBJECT_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_bitfield cl_mem_migration_flags_ext; /* cl_mem_migration_flags_ext */ @@ -1194,6 +1266,9 @@ clEnqueueMigrateMemObjectEXT( #define CL_EXT_CXX_FOR_OPENCL_EXTENSION_NAME \ "cl_ext_cxx_for_opencl" + +#define CL_EXT_CXX_FOR_OPENCL_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_device_info */ #define CL_DEVICE_CXX_FOR_OPENCL_NUMERIC_VERSION_EXT 0x4230 @@ -1204,6 +1279,9 @@ clEnqueueMigrateMemObjectEXT( #define CL_QCOM_EXT_HOST_PTR_EXTENSION_NAME \ "cl_qcom_ext_host_ptr" + +#define CL_QCOM_EXT_HOST_PTR_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + typedef cl_uint cl_image_pitch_info_qcom; typedef struct _cl_mem_ext_host_ptr { cl_uint allocation_type; @@ -1264,6 +1342,9 @@ clGetDeviceImageInfoQCOM( #define CL_QCOM_EXT_HOST_PTR_IOCOHERENT_EXTENSION_NAME \ "cl_qcom_ext_host_ptr_iocoherent" + +#define CL_QCOM_EXT_HOST_PTR_IOCOHERENT_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_uint host_cache_policy */ #define CL_MEM_HOST_IOCOHERENT_QCOM 0x40A9 @@ -1274,6 +1355,9 @@ clGetDeviceImageInfoQCOM( #define CL_QCOM_ION_HOST_PTR_EXTENSION_NAME \ "cl_qcom_ion_host_ptr" + +#define CL_QCOM_ION_HOST_PTR_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* type cl_mem_ext_host_ptr */ typedef struct _cl_mem_ion_host_ptr { cl_mem_ext_host_ptr ext_host_ptr; @@ -1291,6 +1375,9 @@ typedef struct _cl_mem_ion_host_ptr { #define CL_QCOM_ANDROID_NATIVE_BUFFER_HOST_PTR_EXTENSION_NAME \ "cl_qcom_android_native_buffer_host_ptr" + +#define CL_QCOM_ANDROID_NATIVE_BUFFER_HOST_PTR_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* 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 +1394,9 @@ typedef struct _cl_mem_android_native_buffer_host_ptr { #define CL_IMG_YUV_IMAGE_EXTENSION_NAME \ "cl_img_yuv_image" + +#define CL_IMG_YUV_IMAGE_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_channel_order */ #define CL_NV21_IMG 0x40D0 #define CL_YV12_IMG 0x40D1 @@ -1318,6 +1408,9 @@ typedef struct _cl_mem_android_native_buffer_host_ptr { #define CL_IMG_CACHED_ALLOCATIONS_EXTENSION_NAME \ "cl_img_cached_allocations" + +#define CL_IMG_CACHED_ALLOCATIONS_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* 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 +1422,9 @@ typedef struct _cl_mem_android_native_buffer_host_ptr { #define CL_IMG_USE_GRALLOC_PTR_EXTENSION_NAME \ "cl_img_use_gralloc_ptr" + +#define CL_IMG_USE_GRALLOC_PTR_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* Error codes */ #define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4 #define CL_INVALID_GRALLOC_OBJECT_IMG 0x40D5 @@ -1394,6 +1490,9 @@ clEnqueueReleaseGrallocObjectsIMG( #define CL_IMG_GENERATE_MIPMAP_EXTENSION_NAME \ "cl_img_generate_mipmap" + +#define CL_IMG_GENERATE_MIPMAP_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + typedef cl_uint cl_mipmap_filter_mode_img; /* cl_mipmap_filter_mode_img */ @@ -1442,6 +1541,9 @@ clEnqueueGenerateMipmapIMG( #define CL_IMG_MEM_PROPERTIES_EXTENSION_NAME \ "cl_img_mem_properties" + +#define CL_IMG_MEM_PROPERTIES_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_mem_properties */ #define CL_MEM_ALLOC_FLAGS_IMG 0x40D7 @@ -1463,6 +1565,9 @@ clEnqueueGenerateMipmapIMG( #define CL_KHR_SUBGROUPS_EXTENSION_NAME \ "cl_khr_subgroups" + +#define CL_KHR_SUBGROUPS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + #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 +1615,9 @@ clGetKernelSubGroupInfoKHR( #define CL_KHR_MIPMAP_IMAGE_EXTENSION_NAME \ "cl_khr_mipmap_image" + +#define CL_KHR_MIPMAP_IMAGE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_sampler_properties */ #define CL_SAMPLER_MIP_FILTER_MODE_KHR 0x1155 #define CL_SAMPLER_LOD_MIN_KHR 0x1156 @@ -1522,6 +1630,9 @@ clGetKernelSubGroupInfoKHR( #define CL_KHR_PRIORITY_HINTS_EXTENSION_NAME \ "cl_khr_priority_hints" + +#define CL_KHR_PRIORITY_HINTS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* To be used by clGetEventInfo */ typedef cl_uint cl_queue_priority_khr; @@ -1540,6 +1651,9 @@ typedef cl_uint cl_queue_priority_khr; #define CL_KHR_THROTTLE_HINTS_EXTENSION_NAME \ "cl_khr_throttle_hints" + +#define CL_KHR_THROTTLE_HINTS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* To be used by clGetEventInfo */ typedef cl_uint cl_queue_throttle_khr; @@ -1558,6 +1672,9 @@ typedef cl_uint cl_queue_throttle_khr; #define CL_KHR_SUBGROUP_NAMED_BARRIER_EXTENSION_NAME \ "cl_khr_subgroup_named_barrier" + +#define CL_KHR_SUBGROUP_NAMED_BARRIER_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_device_info */ #define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035 @@ -1568,6 +1685,9 @@ typedef cl_uint cl_queue_throttle_khr; #define CL_KHR_EXTENDED_VERSIONING_EXTENSION_NAME \ "cl_khr_extended_versioning" + +#define CL_KHR_EXTENDED_VERSIONING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + #define CL_VERSION_MAJOR_BITS_KHR 10 #define CL_VERSION_MINOR_BITS_KHR 10 #define CL_VERSION_PATCH_BITS_KHR 12 @@ -1611,6 +1731,9 @@ typedef struct _cl_name_version_khr { #define CL_KHR_DEVICE_UUID_EXTENSION_NAME \ "cl_khr_device_uuid" + +#define CL_KHR_DEVICE_UUID_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* Size Constants */ #define CL_UUID_SIZE_KHR 16 #define CL_LUID_SIZE_KHR 8 @@ -1629,6 +1752,9 @@ typedef struct _cl_name_version_khr { #define CL_KHR_PCI_BUS_INFO_EXTENSION_NAME \ "cl_khr_pci_bus_info" + +#define CL_KHR_PCI_BUS_INFO_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef struct _cl_device_pci_bus_info_khr { cl_uint pci_domain; cl_uint pci_bus; @@ -1647,6 +1773,9 @@ typedef struct _cl_device_pci_bus_info_khr { "cl_khr_suggested_local_work_size" +#define CL_KHR_SUGGESTED_LOCAL_WORK_SIZE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + + typedef cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeKHR_t( cl_command_queue command_queue, @@ -1679,6 +1808,9 @@ clGetKernelSuggestedLocalWorkSizeKHR( #define CL_KHR_INTEGER_DOT_PRODUCT_EXTENSION_NAME \ "cl_khr_integer_dot_product" + +#define CL_KHR_INTEGER_DOT_PRODUCT_EXTENSION_VERSION CL_MAKE_VERSION(2, 0, 0) + 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 +1837,9 @@ typedef struct _cl_device_integer_dot_product_acceleration_properties_khr { #define CL_KHR_EXTERNAL_MEMORY_EXTENSION_NAME \ "cl_khr_external_memory" + +#define CL_KHR_EXTERNAL_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 1) + typedef cl_uint cl_external_memory_handle_type_khr; /* cl_platform_info */ @@ -1776,22 +1911,12 @@ clEnqueueReleaseExternalMemObjectsKHR( #define CL_KHR_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME \ "cl_khr_external_memory_dma_buf" + +#define CL_KHR_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_external_memory_handle_type_khr */ #define CL_EXTERNAL_MEMORY_HANDLE_DMA_BUF_KHR 0x2067 -/*************************************************************** -* cl_khr_external_memory_dx -***************************************************************/ -#define cl_khr_external_memory_dx 1 -#define CL_KHR_EXTERNAL_MEMORY_DX_EXTENSION_NAME \ - "cl_khr_external_memory_dx" - -/* 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 -#define CL_EXTERNAL_MEMORY_HANDLE_D3D12_HEAP_KHR 0x2065 -#define CL_EXTERNAL_MEMORY_HANDLE_D3D12_RESOURCE_KHR 0x2066 - /*************************************************************** * cl_khr_external_memory_opaque_fd ***************************************************************/ @@ -1799,6 +1924,9 @@ clEnqueueReleaseExternalMemObjectsKHR( #define CL_KHR_EXTERNAL_MEMORY_OPAQUE_FD_EXTENSION_NAME \ "cl_khr_external_memory_opaque_fd" + +#define CL_KHR_EXTERNAL_MEMORY_OPAQUE_FD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_external_memory_handle_type_khr */ #define CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_FD_KHR 0x2060 @@ -1809,9 +1937,13 @@ clEnqueueReleaseExternalMemObjectsKHR( #define CL_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME \ "cl_khr_external_memory_win32" + +#define CL_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_VERSION CL_MAKE_VERSION(1, 1, 0) + /* 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 +#define CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_NAME_KHR 0x2069 /*************************************************************** * cl_khr_external_semaphore @@ -1820,6 +1952,9 @@ clEnqueueReleaseExternalMemObjectsKHR( #define CL_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME \ "cl_khr_external_semaphore" + +#define CL_KHR_EXTERNAL_SEMAPHORE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 1) + typedef struct _cl_semaphore_khr * cl_semaphore_khr; typedef cl_uint cl_external_semaphore_handle_type_khr; @@ -1864,16 +1999,6 @@ clGetSemaphoreHandleForTypeKHR( #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */ -/*************************************************************** -* cl_khr_external_semaphore_dx_fence -***************************************************************/ -#define cl_khr_external_semaphore_dx_fence 1 -#define CL_KHR_EXTERNAL_SEMAPHORE_DX_FENCE_EXTENSION_NAME \ - "cl_khr_external_semaphore_dx_fence" - -/* cl_external_semaphore_handle_type_khr */ -#define CL_SEMAPHORE_HANDLE_D3D12_FENCE_KHR 0x2059 - /*************************************************************** * cl_khr_external_semaphore_opaque_fd ***************************************************************/ @@ -1881,6 +2006,9 @@ clGetSemaphoreHandleForTypeKHR( #define CL_KHR_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXTENSION_NAME \ "cl_khr_external_semaphore_opaque_fd" + +#define CL_KHR_EXTERNAL_SEMAPHORE_OPAQUE_FD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_external_semaphore_handle_type_khr */ #define CL_SEMAPHORE_HANDLE_OPAQUE_FD_KHR 0x2055 @@ -1891,6 +2019,9 @@ clGetSemaphoreHandleForTypeKHR( #define CL_KHR_EXTERNAL_SEMAPHORE_SYNC_FD_EXTENSION_NAME \ "cl_khr_external_semaphore_sync_fd" + +#define CL_KHR_EXTERNAL_SEMAPHORE_SYNC_FD_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_properties cl_semaphore_reimport_properties_khr; /* cl_external_semaphore_handle_type_khr */ @@ -1923,9 +2054,13 @@ clReImportSemaphoreSyncFdKHR( #define CL_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME \ "cl_khr_external_semaphore_win32" + +#define CL_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 1) + /* cl_external_semaphore_handle_type_khr */ #define CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KHR 0x2056 #define CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KMT_KHR 0x2057 +#define CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_NAME_KHR 0x2068 /*************************************************************** * cl_khr_semaphore @@ -1934,6 +2069,9 @@ clReImportSemaphoreSyncFdKHR( #define CL_KHR_SEMAPHORE_EXTENSION_NAME \ "cl_khr_semaphore" + +#define CL_KHR_SEMAPHORE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* type cl_semaphore_khr */ typedef cl_properties cl_semaphore_properties_khr; typedef cl_uint cl_semaphore_info_khr; @@ -2081,6 +2219,9 @@ clRetainSemaphoreKHR( #define CL_ARM_IMPORT_MEMORY_EXTENSION_NAME \ "cl_arm_import_memory" + +#define CL_ARM_IMPORT_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + typedef intptr_t cl_import_properties_arm; /* cl_import_properties_arm */ @@ -2127,6 +2268,9 @@ clImportMemoryARM( #define CL_ARM_SHARED_VIRTUAL_MEMORY_EXTENSION_NAME \ "cl_arm_shared_virtual_memory" + +#define CL_ARM_SHARED_VIRTUAL_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + 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 +2497,9 @@ clSetKernelExecInfoARM( #define CL_ARM_GET_CORE_ID_EXTENSION_NAME \ "cl_arm_get_core_id" + +#define CL_ARM_GET_CORE_ID_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_device_info */ #define CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM 0x40BF @@ -2365,6 +2512,9 @@ clSetKernelExecInfoARM( #define CL_ARM_JOB_SLOT_SELECTION_EXTENSION_NAME \ "cl_arm_job_slot_selection" + +#define CL_ARM_JOB_SLOT_SELECTION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_device_info */ #define CL_DEVICE_JOB_SLOTS_ARM 0x41E0 @@ -2378,6 +2528,9 @@ clSetKernelExecInfoARM( #define CL_ARM_SCHEDULING_CONTROLS_EXTENSION_NAME \ "cl_arm_scheduling_controls" + +#define CL_ARM_SCHEDULING_CONTROLS_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* Types */ typedef cl_bitfield cl_device_scheduling_controls_capabilities_arm; @@ -2417,6 +2570,9 @@ typedef cl_bitfield cl_device_scheduling_controls_capabilities_arm; #define CL_ARM_CONTROLLED_KERNEL_TERMINATION_EXTENSION_NAME \ "cl_arm_controlled_kernel_termination" + +#define CL_ARM_CONTROLLED_KERNEL_TERMINATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* Types */ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; @@ -2447,6 +2603,9 @@ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; #define CL_ARM_PROTECTED_MEMORY_ALLOCATION_EXTENSION_NAME \ "cl_arm_protected_memory_allocation" + +#define CL_ARM_PROTECTED_MEMORY_ALLOCATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + #define CL_MEM_PROTECTED_ALLOC_ARM ((cl_bitfield)1 << 36) /*************************************************************** @@ -2456,6 +2615,9 @@ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; #define CL_INTEL_EXEC_BY_LOCAL_THREAD_EXTENSION_NAME \ "cl_intel_exec_by_local_thread" + +#define CL_INTEL_EXEC_BY_LOCAL_THREAD_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_command_queue_properties - bitfield */ #define CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL ((cl_bitfield)1 << 31) @@ -2466,6 +2628,9 @@ typedef cl_bitfield cl_device_controlled_termination_capabilities_arm; #define CL_INTEL_DEVICE_ATTRIBUTE_QUERY_EXTENSION_NAME \ "cl_intel_device_attribute_query" + +#define CL_INTEL_DEVICE_ATTRIBUTE_QUERY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + typedef cl_bitfield cl_device_feature_capabilities_intel; /* cl_device_feature_capabilities_intel */ @@ -2488,6 +2653,9 @@ 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_INTEL_DEVICE_PARTITION_BY_NAMES_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + #define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052 #define CL_PARTITION_BY_NAMES_LIST_END_INTEL -1 @@ -2498,6 +2666,9 @@ typedef cl_bitfield cl_device_feature_capabilities_intel; #define CL_INTEL_ACCELERATOR_EXTENSION_NAME \ "cl_intel_accelerator" + +#define CL_INTEL_ACCELERATOR_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + typedef struct _cl_accelerator_intel* cl_accelerator_intel; typedef cl_uint cl_accelerator_type_intel; typedef cl_uint cl_accelerator_info_intel; @@ -2586,6 +2757,9 @@ clReleaseAcceleratorINTEL( #define CL_INTEL_MOTION_ESTIMATION_EXTENSION_NAME \ "cl_intel_motion_estimation" + +#define CL_INTEL_MOTION_ESTIMATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + typedef struct _cl_motion_estimation_desc_intel { cl_uint mb_block_type; cl_uint subpixel_mode; @@ -2622,6 +2796,9 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_ADVANCED_MOTION_ESTIMATION_EXTENSION_NAME \ "cl_intel_advanced_motion_estimation" + +#define CL_INTEL_ADVANCED_MOTION_ESTIMATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_device_info */ #define CL_DEVICE_ME_VERSION_INTEL 0x407E @@ -2678,6 +2855,9 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_SIMULTANEOUS_SHARING_EXTENSION_NAME \ "cl_intel_simultaneous_sharing" + +#define CL_INTEL_SIMULTANEOUS_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_device_info */ #define CL_DEVICE_SIMULTANEOUS_INTEROPS_INTEL 0x4104 #define CL_DEVICE_NUM_SIMULTANEOUS_INTEROPS_INTEL 0x4105 @@ -2689,6 +2869,9 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_EGL_IMAGE_YUV_EXTENSION_NAME \ "cl_intel_egl_image_yuv" + +#define CL_INTEL_EGL_IMAGE_YUV_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_egl_image_properties_khr */ #define CL_EGL_YUV_PLANE_INTEL 0x4107 @@ -2699,6 +2882,9 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_PACKED_YUV_EXTENSION_NAME \ "cl_intel_packed_yuv" + +#define CL_INTEL_PACKED_YUV_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_channel_order */ #define CL_YUYV_INTEL 0x4076 #define CL_UYVY_INTEL 0x4077 @@ -2712,6 +2898,9 @@ typedef struct _cl_motion_estimation_desc_intel { #define CL_INTEL_REQUIRED_SUBGROUP_SIZE_EXTENSION_NAME \ "cl_intel_required_subgroup_size" + +#define CL_INTEL_REQUIRED_SUBGROUP_SIZE_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_device_info */ #define CL_DEVICE_SUB_GROUP_SIZES_INTEL 0x4108 @@ -2728,10 +2917,15 @@ 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; + +#define CL_INTEL_DRIVER_DIAGNOSTICS_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + +typedef cl_bitfield cl_diagnostic_verbose_level_intel; /* cl_context_properties */ #define CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL 0x4106 + +/* cl_diagnostic_verbose_level_intel */ #define CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL 0xff #define CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL (1 << 0) #define CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL (1 << 1) @@ -2744,6 +2938,9 @@ typedef cl_uint cl_diagnostics_verbose_level; #define CL_INTEL_PLANAR_YUV_EXTENSION_NAME \ "cl_intel_planar_yuv" + +#define CL_INTEL_PLANAR_YUV_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_channel_order */ #define CL_NV12_INTEL 0x410E @@ -2762,6 +2959,9 @@ typedef cl_uint cl_diagnostics_verbose_level; #define CL_INTEL_DEVICE_SIDE_AVC_MOTION_ESTIMATION_EXTENSION_NAME \ "cl_intel_device_side_avc_motion_estimation" + +#define CL_INTEL_DEVICE_SIDE_AVC_MOTION_ESTIMATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_device_info */ #define CL_DEVICE_AVC_ME_VERSION_INTEL 0x410B #define CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL 0x410C @@ -2919,6 +3119,9 @@ typedef cl_uint cl_diagnostics_verbose_level; #define CL_INTEL_UNIFIED_SHARED_MEMORY_EXTENSION_NAME \ "cl_intel_unified_shared_memory" + +#define CL_INTEL_UNIFIED_SHARED_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + 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,9 @@ clEnqueueMemsetINTEL( #define CL_INTEL_MEM_ALLOC_BUFFER_LOCATION_EXTENSION_NAME \ "cl_intel_mem_alloc_buffer_location" + +#define CL_INTEL_MEM_ALLOC_BUFFER_LOCATION_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_mem_properties_intel */ #define CL_MEM_ALLOC_BUFFER_LOCATION_INTEL 0x419E @@ -3253,6 +3459,9 @@ clEnqueueMemsetINTEL( #define CL_INTEL_CREATE_BUFFER_WITH_PROPERTIES_EXTENSION_NAME \ "cl_intel_create_buffer_with_properties" + +#define CL_INTEL_CREATE_BUFFER_WITH_PROPERTIES_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* type cl_mem_properties_intel */ @@ -3288,6 +3497,9 @@ clCreateBufferWithPropertiesINTEL( #define CL_INTEL_PROGRAM_SCOPE_HOST_PIPE_EXTENSION_NAME \ "cl_intel_program_scope_host_pipe" + +#define CL_INTEL_PROGRAM_SCOPE_HOST_PIPE_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* 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 +3574,9 @@ clEnqueueWriteHostPipeINTEL( #define CL_INTEL_MEM_CHANNEL_PROPERTY_EXTENSION_NAME \ "cl_intel_mem_channel_property" + +#define CL_INTEL_MEM_CHANNEL_PROPERTY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_mem_properties_intel */ #define CL_MEM_CHANNEL_INTEL 0x4213 @@ -3372,6 +3587,9 @@ clEnqueueWriteHostPipeINTEL( #define CL_INTEL_MEM_FORCE_HOST_MEMORY_EXTENSION_NAME \ "cl_intel_mem_force_host_memory" + +#define CL_INTEL_MEM_FORCE_HOST_MEMORY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_mem_flags */ #define CL_MEM_FORCE_HOST_MEMORY_INTEL (1 << 20) @@ -3382,6 +3600,9 @@ clEnqueueWriteHostPipeINTEL( #define CL_INTEL_COMMAND_QUEUE_FAMILIES_EXTENSION_NAME \ "cl_intel_command_queue_families" + +#define CL_INTEL_COMMAND_QUEUE_FAMILIES_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + typedef cl_bitfield cl_command_queue_capabilities_intel; #define CL_QUEUE_FAMILY_MAX_NAME_SIZE_INTEL 64 @@ -3426,6 +3647,9 @@ typedef struct _cl_queue_family_properties_intel { #define CL_INTEL_QUEUE_NO_SYNC_OPERATIONS_EXTENSION_NAME \ "cl_intel_queue_no_sync_operations" + +#define CL_INTEL_QUEUE_NO_SYNC_OPERATIONS_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_command_queue_properties */ #define CL_QUEUE_NO_SYNC_OPERATIONS_INTEL (1 << 29) @@ -3436,6 +3660,9 @@ typedef struct _cl_queue_family_properties_intel { #define CL_INTEL_SHARING_FORMAT_QUERY_EXTENSION_NAME \ "cl_intel_sharing_format_query" + +#define CL_INTEL_SHARING_FORMAT_QUERY_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /*************************************************************** * cl_ext_image_requirements_info ***************************************************************/ @@ -3445,6 +3672,9 @@ typedef struct _cl_queue_family_properties_intel { #define CL_EXT_IMAGE_REQUIREMENTS_INFO_EXTENSION_NAME \ "cl_ext_image_requirements_info" + +#define CL_EXT_IMAGE_REQUIREMENTS_INFO_EXTENSION_VERSION CL_MAKE_VERSION(0, 5, 0) + /* Types */ typedef cl_uint cl_image_requirements_info_ext; @@ -3501,6 +3731,9 @@ clGetImageRequirementsInfoEXT( #define CL_EXT_IMAGE_FROM_BUFFER_EXTENSION_NAME \ "cl_ext_image_from_buffer" + +#define CL_EXT_IMAGE_FROM_BUFFER_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_image_requirements_info_ext */ #define CL_IMAGE_REQUIREMENTS_SLICE_PITCH_ALIGNMENT_EXT 0x1291 @@ -3513,6 +3746,9 @@ clGetImageRequirementsInfoEXT( #define CL_LOADER_INFO_EXTENSION_NAME \ "cl_loader_info" + +#define CL_LOADER_INFO_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_uint cl_icdl_info; /* cl_icdl_info */ @@ -3550,6 +3786,9 @@ clGetICDLoaderInfoOCLICD( #define CL_KHR_DEPTH_IMAGES_EXTENSION_NAME \ "cl_khr_depth_images" + +#define CL_KHR_DEPTH_IMAGES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + #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 +3802,9 @@ clGetICDLoaderInfoOCLICD( #define CL_EXT_FLOAT_ATOMICS_EXTENSION_NAME \ "cl_ext_float_atomics" + +#define CL_EXT_FLOAT_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef cl_bitfield cl_device_fp_atomic_capabilities_ext; /* cl_device_fp_atomic_capabilities_ext */ @@ -3585,6 +3827,9 @@ typedef cl_bitfield cl_device_fp_atomic_capabilities_ext; #define CL_INTEL_CREATE_MEM_OBJECT_PROPERTIES_EXTENSION_NAME \ "cl_intel_create_mem_object_properties" + +#define CL_INTEL_CREATE_MEM_OBJECT_PROPERTIES_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* cl_mem_properties */ #define CL_MEM_LOCALLY_UNCACHED_RESOURCE_INTEL 0x4218 #define CL_MEM_DEVICE_ID_INTEL 0x4219 @@ -3597,6 +3842,9 @@ typedef cl_bitfield cl_device_fp_atomic_capabilities_ext; "cl_pocl_content_size" +#define CL_POCL_CONTENT_SIZE_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + + typedef cl_int CL_API_CALL clSetContentSizeBufferPoCL_t( cl_mem buffer, @@ -3621,6 +3869,9 @@ clSetContentSizeBufferPoCL( #define CL_EXT_IMAGE_RAW10_RAW12_EXTENSION_NAME \ "cl_ext_image_raw10_raw12" + +#define CL_EXT_IMAGE_RAW10_RAW12_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_channel_type */ #define CL_UNSIGNED_INT_RAW10_EXT 0x10E3 #define CL_UNSIGNED_INT_RAW12_EXT 0x10E4 @@ -3632,6 +3883,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_3D_IMAGE_WRITES_EXTENSION_NAME \ "cl_khr_3d_image_writes" + +#define CL_KHR_3D_IMAGE_WRITES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_async_work_group_copy_fence ***************************************************************/ @@ -3639,6 +3893,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_ASYNC_WORK_GROUP_COPY_FENCE_EXTENSION_NAME \ "cl_khr_async_work_group_copy_fence" + +#define CL_KHR_ASYNC_WORK_GROUP_COPY_FENCE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_byte_addressable_store ***************************************************************/ @@ -3646,6 +3903,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_BYTE_ADDRESSABLE_STORE_EXTENSION_NAME \ "cl_khr_byte_addressable_store" + +#define CL_KHR_BYTE_ADDRESSABLE_STORE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_device_enqueue_local_arg_types ***************************************************************/ @@ -3653,6 +3913,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_DEVICE_ENQUEUE_LOCAL_ARG_TYPES_EXTENSION_NAME \ "cl_khr_device_enqueue_local_arg_types" + +#define CL_KHR_DEVICE_ENQUEUE_LOCAL_ARG_TYPES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_expect_assume ***************************************************************/ @@ -3660,6 +3923,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_EXPECT_ASSUME_EXTENSION_NAME \ "cl_khr_expect_assume" + +#define CL_KHR_EXPECT_ASSUME_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_extended_async_copies ***************************************************************/ @@ -3667,6 +3933,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_EXTENDED_ASYNC_COPIES_EXTENSION_NAME \ "cl_khr_extended_async_copies" + +#define CL_KHR_EXTENDED_ASYNC_COPIES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_extended_bit_ops ***************************************************************/ @@ -3674,6 +3943,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_EXTENDED_BIT_OPS_EXTENSION_NAME \ "cl_khr_extended_bit_ops" + +#define CL_KHR_EXTENDED_BIT_OPS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_global_int32_base_atomics ***************************************************************/ @@ -3681,6 +3953,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_GLOBAL_INT32_BASE_ATOMICS_EXTENSION_NAME \ "cl_khr_global_int32_base_atomics" + +#define CL_KHR_GLOBAL_INT32_BASE_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_global_int32_extended_atomics ***************************************************************/ @@ -3688,6 +3963,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_GLOBAL_INT32_EXTENDED_ATOMICS_EXTENSION_NAME \ "cl_khr_global_int32_extended_atomics" + +#define CL_KHR_GLOBAL_INT32_EXTENDED_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_int64_base_atomics ***************************************************************/ @@ -3695,6 +3973,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_INT64_BASE_ATOMICS_EXTENSION_NAME \ "cl_khr_int64_base_atomics" + +#define CL_KHR_INT64_BASE_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_int64_extended_atomics ***************************************************************/ @@ -3702,6 +3983,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_INT64_EXTENDED_ATOMICS_EXTENSION_NAME \ "cl_khr_int64_extended_atomics" + +#define CL_KHR_INT64_EXTENDED_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_kernel_clock ***************************************************************/ @@ -3709,6 +3993,9 @@ clSetContentSizeBufferPoCL( #define CL_KHR_KERNEL_CLOCK_EXTENSION_NAME \ "cl_khr_kernel_clock" + +#define CL_KHR_KERNEL_CLOCK_EXTENSION_VERSION CL_MAKE_VERSION(0, 9, 0) + /* cl_device_info */ #define CL_DEVICE_KERNEL_CLOCK_CAPABILITIES_KHR 0x1076 @@ -3726,6 +4013,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_LOCAL_INT32_BASE_ATOMICS_EXTENSION_NAME \ "cl_khr_local_int32_base_atomics" + +#define CL_KHR_LOCAL_INT32_BASE_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_local_int32_extended_atomics ***************************************************************/ @@ -3733,6 +4023,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_LOCAL_INT32_EXTENDED_ATOMICS_EXTENSION_NAME \ "cl_khr_local_int32_extended_atomics" + +#define CL_KHR_LOCAL_INT32_EXTENDED_ATOMICS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_mipmap_image_writes ***************************************************************/ @@ -3740,6 +4033,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_MIPMAP_IMAGE_WRITES_EXTENSION_NAME \ "cl_khr_mipmap_image_writes" + +#define CL_KHR_MIPMAP_IMAGE_WRITES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_select_fprounding_mode ***************************************************************/ @@ -3747,6 +4043,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SELECT_FPROUNDING_MODE_EXTENSION_NAME \ "cl_khr_select_fprounding_mode" + +#define CL_KHR_SELECT_FPROUNDING_MODE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_spirv_extended_debug_info ***************************************************************/ @@ -3754,6 +4053,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SPIRV_EXTENDED_DEBUG_INFO_EXTENSION_NAME \ "cl_khr_spirv_extended_debug_info" + +#define CL_KHR_SPIRV_EXTENDED_DEBUG_INFO_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_spirv_linkonce_odr ***************************************************************/ @@ -3761,6 +4063,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SPIRV_LINKONCE_ODR_EXTENSION_NAME \ "cl_khr_spirv_linkonce_odr" + +#define CL_KHR_SPIRV_LINKONCE_ODR_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_spirv_no_integer_wrap_decoration ***************************************************************/ @@ -3768,6 +4073,9 @@ 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" + +#define CL_KHR_SPIRV_NO_INTEGER_WRAP_DECORATION_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_srgb_image_writes ***************************************************************/ @@ -3775,6 +4083,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SRGB_IMAGE_WRITES_EXTENSION_NAME \ "cl_khr_srgb_image_writes" + +#define CL_KHR_SRGB_IMAGE_WRITES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_subgroup_ballot ***************************************************************/ @@ -3782,6 +4093,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_BALLOT_EXTENSION_NAME \ "cl_khr_subgroup_ballot" + +#define CL_KHR_SUBGROUP_BALLOT_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_subgroup_clustered_reduce ***************************************************************/ @@ -3789,6 +4103,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_CLUSTERED_REDUCE_EXTENSION_NAME \ "cl_khr_subgroup_clustered_reduce" + +#define CL_KHR_SUBGROUP_CLUSTERED_REDUCE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_subgroup_extended_types ***************************************************************/ @@ -3796,6 +4113,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME \ "cl_khr_subgroup_extended_types" + +#define CL_KHR_SUBGROUP_EXTENDED_TYPES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_subgroup_non_uniform_arithmetic ***************************************************************/ @@ -3803,6 +4123,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_NON_UNIFORM_ARITHMETIC_EXTENSION_NAME \ "cl_khr_subgroup_non_uniform_arithmetic" + +#define CL_KHR_SUBGROUP_NON_UNIFORM_ARITHMETIC_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_subgroup_non_uniform_vote ***************************************************************/ @@ -3810,6 +4133,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_NON_UNIFORM_VOTE_EXTENSION_NAME \ "cl_khr_subgroup_non_uniform_vote" + +#define CL_KHR_SUBGROUP_NON_UNIFORM_VOTE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_subgroup_rotate ***************************************************************/ @@ -3817,6 +4143,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_ROTATE_EXTENSION_NAME \ "cl_khr_subgroup_rotate" + +#define CL_KHR_SUBGROUP_ROTATE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_subgroup_shuffle ***************************************************************/ @@ -3824,6 +4153,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_SHUFFLE_EXTENSION_NAME \ "cl_khr_subgroup_shuffle" + +#define CL_KHR_SUBGROUP_SHUFFLE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_subgroup_shuffle_relative ***************************************************************/ @@ -3831,6 +4163,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_SUBGROUP_SHUFFLE_RELATIVE_EXTENSION_NAME \ "cl_khr_subgroup_shuffle_relative" + +#define CL_KHR_SUBGROUP_SHUFFLE_RELATIVE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /*************************************************************** * cl_khr_work_group_uniform_arithmetic ***************************************************************/ @@ -3838,6 +4173,22 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_KHR_WORK_GROUP_UNIFORM_ARITHMETIC_EXTENSION_NAME \ "cl_khr_work_group_uniform_arithmetic" + +#define CL_KHR_WORK_GROUP_UNIFORM_ARITHMETIC_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + +/*************************************************************** +* cl_ext_image_unorm_int_2_101010 +***************************************************************/ +#define cl_ext_image_unorm_int_2_101010 1 +#define CL_EXT_IMAGE_UNORM_INT_2_101010_EXTENSION_NAME \ + "cl_ext_image_unorm_int_2_101010" + + +#define CL_EXT_IMAGE_UNORM_INT_2_101010_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + +/* cl_channel_type */ +#define CL_UNORM_INT_2_101010_EXT 0x10E5 + /*************************************************************** * cl_img_cancel_command ***************************************************************/ @@ -3845,6 +4196,9 @@ typedef cl_bitfield cl_device_kernel_clock_capabilities_khr; #define CL_IMG_CANCEL_COMMAND_EXTENSION_NAME \ "cl_img_cancel_command" + +#define CL_IMG_CANCEL_COMMAND_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* Error codes */ #define CL_CANCELLED_IMG -1126 diff --git a/third_party/opencl_headers/CL/cl_gl.h b/third_party/opencl_headers/CL/cl_gl.h index f5b1e37bbe..552560f71c 100644 --- a/third_party/opencl_headers/CL/cl_gl.h +++ b/third_party/opencl_headers/CL/cl_gl.h @@ -51,6 +51,13 @@ extern "C" { #define CL_KHR_GL_SHARING_EXTENSION_NAME \ "cl_khr_gl_sharing" + +#define CL_KHR_GL_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + +typedef int cl_GLint; +typedef unsigned int cl_GLenum; +typedef unsigned int cl_GLuint; + typedef cl_uint cl_gl_context_info; /* Error codes */ @@ -313,6 +320,9 @@ clCreateFromGLTexture3D( #define CL_KHR_GL_EVENT_EXTENSION_NAME \ "cl_khr_gl_event" + +#define CL_KHR_GL_EVENT_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + typedef struct __GLsync * cl_GLsync; /* cl_command_type */ @@ -345,6 +355,9 @@ clCreateEventFromGLsyncKHR( #define CL_KHR_GL_DEPTH_IMAGES_EXTENSION_NAME \ "cl_khr_gl_depth_images" + +#define CL_KHR_GL_DEPTH_IMAGES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_channel_order */ #define CL_DEPTH_STENCIL 0x10BE @@ -358,6 +371,9 @@ clCreateEventFromGLsyncKHR( #define CL_KHR_GL_MSAA_SHARING_EXTENSION_NAME \ "cl_khr_gl_msaa_sharing" + +#define CL_KHR_GL_MSAA_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0) + /* cl_gl_texture_info */ #define CL_GL_NUM_SAMPLES 0x2012 @@ -368,6 +384,9 @@ clCreateEventFromGLsyncKHR( #define CL_INTEL_SHARING_FORMAT_QUERY_GL_EXTENSION_NAME \ "cl_intel_sharing_format_query_gl" + +#define CL_INTEL_SHARING_FORMAT_QUERY_GL_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* when cl_khr_gl_sharing is supported */ typedef cl_int CL_API_CALL diff --git a/third_party/opencl_headers/CL/cl_platform.h b/third_party/opencl_headers/CL/cl_platform.h index e7a0d6f476..5f92d6faad 100644 --- a/third_party/opencl_headers/CL/cl_platform.h +++ b/third_party/opencl_headers/CL/cl_platform.h @@ -77,7 +77,7 @@ extern "C" { #ifdef __GNUC__ #define CL_API_SUFFIX_DEPRECATED __attribute__((deprecated)) #define CL_API_PREFIX_DEPRECATED -#elif defined(_WIN32) +#elif defined(_MSC_VER) && !defined(__clang__) #define CL_API_SUFFIX_DEPRECATED #define CL_API_PREFIX_DEPRECATED __declspec(deprecated) #else @@ -361,11 +361,6 @@ typedef double cl_double; #include -/* Mirror types to GL types. Mirror types allow us to avoid deciding which 87s to load based on whether we are using GL or GLES here. */ -typedef unsigned int cl_GLuint; -typedef int cl_GLint; -typedef unsigned int cl_GLenum; - /* * Vector types * diff --git a/third_party/opencl_headers/CL/cl_va_api_media_sharing_intel.h b/third_party/opencl_headers/CL/cl_va_api_media_sharing_intel.h index 93f5d8bbcf..9fb8863f24 100644 --- a/third_party/opencl_headers/CL/cl_va_api_media_sharing_intel.h +++ b/third_party/opencl_headers/CL/cl_va_api_media_sharing_intel.h @@ -53,6 +53,9 @@ extern "C" { #define CL_INTEL_SHARING_FORMAT_QUERY_VA_API_EXTENSION_NAME \ "cl_intel_sharing_format_query_va_api" + +#define CL_INTEL_SHARING_FORMAT_QUERY_VA_API_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + /* when cl_intel_va_api_media_sharing is supported */ typedef cl_int CL_API_CALL @@ -89,6 +92,9 @@ clGetSupportedVA_APIMediaSurfaceFormatsINTEL( #define CL_INTEL_VA_API_MEDIA_SHARING_EXTENSION_NAME \ "cl_intel_va_api_media_sharing" + +#define CL_INTEL_VA_API_MEDIA_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0) + typedef cl_uint cl_va_api_device_source_intel; typedef cl_uint cl_va_api_device_set_intel; diff --git a/third_party/opencl_headers/README.md b/third_party/opencl_headers/README.md index 1a49189654..93756c814b 100644 --- a/third_party/opencl_headers/README.md +++ b/third_party/opencl_headers/README.md @@ -123,6 +123,11 @@ LICENSE Source license for the OpenCL API headers CL/ Unified OpenCL API headers tree ``` +## Packaging + +For packaging instructions, see [RELEASE.md](https://github.com/KhronosGroup/OpenCL-SDK/blob/main/docs/RELEASE.md) +in the OpenCL SDK repository. + ## License See [LICENSE](LICENSE).