@@ -13737,10 +13737,42 @@ endif::cl_khr_external_semaphore_sync_fd[]
1373713737endif::cl_khr_external_semaphore_opaque_fd,cl_khr_external_semaphore_sync_fd[]
1373813738
1373913739
13740- ifdef::cl_khr_external_semaphore_win32[]
13740+ ifdef::cl_khr_external_semaphore_dx_fence, cl_khr_external_semaphore_win32[]
1374113741
1374213742==== NT Handle Types
1374313743
13744+ ifdef::cl_khr_external_semaphore_dx_fence[]
13745+
13746+ The {cl_khr_external_semaphore_dx_fence_EXT} extension extends
13747+ {cl_external_semaphore_handle_type_khr_TYPE} to support the following new
13748+ types of handles, and adds as a property that may be specified when creating
13749+ a semaphore from an external handle:
13750+
13751+ * {CL_SEMAPHORE_HANDLE_D3D12_FENCE_KHR} specifies an NT handle returned by
13752+ `ID3D12Device::CreateSharedHandle` referring to a Direct3D 12 fence, or
13753+ `ID3D11Device5::CreateFence` referring to a Direct3D 11 fence.
13754+ It owns a reference to the underlying synchronization primitive
13755+ associated with the Direct3D fence.
13756+
13757+ When waiting on semaphores using {clEnqueueWaitSemaphoresKHR} or signaling
13758+ semaphores using {clEnqueueSignalSemaphoresKHR}, the semaphore payload must
13759+ be provided for semaphores created from
13760+ {CL_SEMAPHORE_HANDLE_D3D12_FENCE_KHR}.
13761+
13762+ * If _sema_objects_ list has a mix of semaphores obtained from
13763+ {CL_SEMAPHORE_HANDLE_D3D12_FENCE_KHR} and other handle types, then the
13764+ _sema_payload_list_ should point to a list of _num_sema_objects_ payload
13765+ values for each semaphore in _sema_objects_.
13766+ However, the payload values corresponding to semaphores with type
13767+ {CL_SEMAPHORE_TYPE_BINARY_KHR} can be set to 0 or will be ignored.
13768+
13769+ {clEnqueueWaitSemaphoresKHR} and {clEnqueueSignalSemaphoresKHR} may return
13770+ {CL_INVALID_VALUE} if _sema_objects_ list has one or more semaphores
13771+ obtained from {CL_SEMAPHORE_HANDLE_D3D12_FENCE_KHR} and _sema_payload_list_
13772+ is NULL.
13773+
13774+ endif::cl_khr_external_semaphore_dx_fence[]
13775+
1374413776ifdef::cl_khr_external_semaphore_win32[]
1374513777
1374613778The {cl_khr_external_semaphore_win32_EXT} extension extends
@@ -13778,6 +13810,14 @@ endif::cl_khr_external_semaphore_win32[]
1377813810|====
1377913811| Handle Type | Transference
1378013812
13813+ ifdef::cl_khr_external_semaphore_dx_fence[]
13814+ | {CL_SEMAPHORE_HANDLE_D3D12_FENCE_KHR_anchor}
13815+
13816+ include::{generated}/api/version-notes/CL_SEMAPHORE_HANDLE_D3D12_FENCE_KHR.asciidoc[]
13817+ | Reference
13818+
13819+ endif::cl_khr_external_semaphore_dx_fence[]
13820+
1378113821ifdef::cl_khr_external_semaphore_win32[]
1378213822| {CL_SEMAPHORE_HANDLE_OPAQUE_WIN32_KHR_anchor}
1378313823
@@ -13804,7 +13844,7 @@ For handle types defined as NT handles, the application must release
1380413844ownership using the `CloseHandle` system call when the handle is no longer
1380513845needed.
1380613846
13807- endif::cl_khr_external_semaphore_win32[]
13847+ endif::cl_khr_external_semaphore_dx_fence, cl_khr_external_semaphore_win32[]
1380813848
1380913849endif::cl_khr_external_semaphore[]
1381013850
0 commit comments