From 228a277c778ddc80ee4c4132a22f98c688130667 Mon Sep 17 00:00:00 2001 From: Nikhil Joshi Date: Tue, 11 Jun 2024 19:53:25 +0530 Subject: [PATCH 1/2] Updates to win32 named handle type changes. Address review comments. Fixes #943 --- api/cl_khr_external_memory_win32.asciidoc | 5 ++++- api/cl_khr_external_semaphore_win32.asciidoc | 4 +++- api/opencl_runtime_layer.asciidoc | 5 ++++- xml/cl.xml | 2 ++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/api/cl_khr_external_memory_win32.asciidoc b/api/cl_khr_external_memory_win32.asciidoc index 57d01246..fb18ff47 100644 --- a/api/cl_khr_external_memory_win32.asciidoc +++ b/api/cl_khr_external_memory_win32.asciidoc @@ -6,7 +6,7 @@ include::{generated}/meta/{refprefix}cl_khr_external_memory_win32.txt[] === Other Extension Metadata *Last Modified Date*:: - 2024-03-15 + 2024-06-11 *IP Status*:: No known IP claims. *Contributors*:: @@ -58,3 +58,6 @@ image memory object. (provisional). * Revision 1.0.0, 2024-03-15 ** First non-provisional version. + * Revision 1.1.0, 2024-06-11 + ** Added {CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_NAME_KHR}. + diff --git a/api/cl_khr_external_semaphore_win32.asciidoc b/api/cl_khr_external_semaphore_win32.asciidoc index 725a5996..64aadba0 100644 --- a/api/cl_khr_external_semaphore_win32.asciidoc +++ b/api/cl_khr_external_semaphore_win32.asciidoc @@ -6,7 +6,7 @@ include::{generated}/meta/{refprefix}cl_khr_external_semaphore_win32.txt[] === Other Extension Metadata *Last Modified Date*:: - 2021-09-10 + 2024-06-11 *IP Status*:: No known IP claims. *Contributors*:: @@ -44,3 +44,5 @@ introduced by {cl_khr_external_semaphore_EXT}. * Revision 0.9.0, 2021-09-10 ** Initial version (provisional). + * Revision 0.9.1, 2024-06-11 + ** Added {CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KMT_KHR}. diff --git a/api/opencl_runtime_layer.asciidoc b/api/opencl_runtime_layer.asciidoc index 0c499514..77cfe3e8 100644 --- a/api/opencl_runtime_layer.asciidoc +++ b/api/opencl_runtime_layer.asciidoc @@ -5618,16 +5618,18 @@ buffer or an image memory object from an external handle: It does not own a reference to the underlying memory resource represented by its memory object, and will therefore become invalid when all memory objects associated with it are destroyed. -endif::cl_khr_external_memory_win32[] * {CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_NAME_KHR_anchor} specifies an NT handle name that has only limited valid usage outside of OpenCL and other compatible APIs. + NT handle name is NULL or a null-terminated UTF-16 string naming the payload to import. It must be compatible with the functions `DuplicateHandle`, `CloseHandle`, `CompareObjectHandles`, `GetHandleInformation`, and `SetHandleInformation`. It owns a reference to the underlying memory resource represented by its memory object. +endif::cl_khr_external_memory_win32[] + For these extensions, importing memory object payloads from Windows handles does not transfer ownership of the handle to the OpenCL implementation. For handle types defined as NT handles, the application must release handle @@ -13137,6 +13139,7 @@ a semaphore from an external handle: when all semaphore objects associated with it are destroyed. * {CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_NAME_KHR} specifies an NT handle name that has only limited valid usage outside of OpenCL and other compatible APIs. + NT handle name is NULL or a null-terminated UTF-16 string naming the payload to import. It must be compatible with the functions `DuplicateHandle`, `CloseHandle`, `CompareObjectHandles`, `GetHandleInformation`, and `SetHandleInformation`. diff --git a/xml/cl.xml b/xml/cl.xml index 61dac57d..41d5e113 100644 --- a/xml/cl.xml +++ b/xml/cl.xml @@ -7085,6 +7085,7 @@ server's OpenCL/api-docs repository. + @@ -7137,6 +7138,7 @@ server's OpenCL/api-docs repository. + From 3b7cd1cd1fca7154897190822096190d8ea0480c Mon Sep 17 00:00:00 2001 From: Nikhil Joshi Date: Tue, 18 Jun 2024 22:02:56 +0530 Subject: [PATCH 2/2] Drop NULL from named win32 handle description. (#1184) Address review comments from Ben to remove NULL from named win32 handle description. Fixes #943 --- api/opencl_runtime_layer.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/opencl_runtime_layer.asciidoc b/api/opencl_runtime_layer.asciidoc index 77cfe3e8..257267e7 100644 --- a/api/opencl_runtime_layer.asciidoc +++ b/api/opencl_runtime_layer.asciidoc @@ -5621,7 +5621,7 @@ buffer or an image memory object from an external handle: * {CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_NAME_KHR_anchor} specifies an NT handle name that has only limited valid usage outside of OpenCL and other compatible APIs. - NT handle name is NULL or a null-terminated UTF-16 string naming the payload to import. + NT handle name is a null-terminated UTF-16 string naming the payload to import. It must be compatible with the functions `DuplicateHandle`, `CloseHandle`, `CompareObjectHandles`, `GetHandleInformation`, and `SetHandleInformation`. @@ -13139,7 +13139,7 @@ a semaphore from an external handle: when all semaphore objects associated with it are destroyed. * {CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_NAME_KHR} specifies an NT handle name that has only limited valid usage outside of OpenCL and other compatible APIs. - NT handle name is NULL or a null-terminated UTF-16 string naming the payload to import. + NT handle name is a null-terminated UTF-16 string naming the payload to import. It must be compatible with the functions `DuplicateHandle`, `CloseHandle`, `CompareObjectHandles`, `GetHandleInformation`, and `SetHandleInformation`.