Skip to content

Commit f5054cd

Browse files
committed
WIP: Add the VK_EXT_external_semaphore_drm_syncobj extension
This extension enables interop between timeline semaphores and Linux DRM synchronization objects (syncobj).
1 parent 61ec2c2 commit f5054cd

5 files changed

Lines changed: 98 additions & 3 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2026 The Khronos Group Inc.
2+
//
3+
// SPDX-License-Identifier: CC-BY-4.0
4+
5+
include::{generated}/meta/{refprefix}VK_EXT_external_semaphore_drm_syncobj.adoc[]
6+
7+
=== Other Extension Metadata
8+
9+
*Last Modified Date*::
10+
2026-03-02
11+
*IP Status*::
12+
No known IP claims.
13+
*Contributors*::
14+
- Julian Orth
15+
- James Jones, NVIDIA
16+
17+
=== Description
18+
19+
This extension adds the ability to import and export timeline semaphores as DRM
20+
synchronization objects (syncobj).
21+
22+
include::{generated}/interfaces/VK_EXT_external_semaphore_drm_syncobj.adoc[]
23+
24+
=== Version History
25+
26+
* Revision 1, 2026-03-02 (Julian Orth)
27+
** Initial revision

chapters/capabilities.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,12 @@ ifdef::VK_NV_external_sci_sync[]
16181618
hardware engines including the CPU and software (intra-process and
16191619
inter-process) operating domains and perform signal and wait operations.
16201620
endif::VK_NV_external_sci_sync[]
1621+
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
1622+
* ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT specifies a
1623+
file descriptor handle to a Linux DRM synchronization object (syncobj).
1624+
This type can only be used with timeline semaphores and Vulkan timeline
1625+
semaphore values correspond to syncobj points.
1626+
endif::VK_EXT_external_semaphore_drm_syncobj[]
16211627

16221628
[NOTE]
16231629
====
@@ -1651,6 +1657,9 @@ endif::VK_FUCHSIA_external_semaphore[]
16511657
ifdef::VK_NV_external_sci_sync[]
16521658
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SCI_SYNC_OBJ_BIT_NV | No restriction | No restriction
16531659
endif::VK_NV_external_sci_sync[]
1660+
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
1661+
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT | No restriction | No restriction
1662+
endif::VK_EXT_external_semaphore_drm_syncobj[]
16541663
|====
16551664
--
16561665

chapters/features.adoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9510,6 +9510,31 @@ include::{generated}/validity/structs/VkPhysicalDeviceShaderMixedFloatDotProduct
95109510
--
95119511
endif::VK_VALVE_shader_mixed_float_dot_product[]
95129512

9513+
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
9514+
[open,refpage='VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT',desc='Structure describing the external semaphore DRM syncobj features supported by the implementation',type='structs']
9515+
--
9516+
The sname:VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT structure is defined
9517+
as:
9518+
9519+
include::{generated}/api/structs/VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT.adoc[]
9520+
9521+
This structure describes the following feature:
9522+
9523+
* pname:sType is a elink:VkStructureType value identifying this structure.
9524+
* pname:pNext is `NULL` or a pointer to a structure extending this
9525+
structure.
9526+
* [[features-externalSemaphoreDrmSyncobj]] pname:externalSemaphoreDrmSyncobj
9527+
indicates whether the implementation has support for the
9528+
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT external
9529+
semaphore handle type.
9530+
9531+
:refpage: VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT
9532+
include::{chapters}/features.adoc[tag=features]
9533+
9534+
include::{generated}/validity/structs/VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT.adoc[]
9535+
--
9536+
endif::VK_EXT_external_semaphore_drm_syncobj[]
9537+
95139538

95149539
[[features-requirements]]
95159540
== Feature Requirements

chapters/synchronization.adoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3740,6 +3740,17 @@ ifdef::VK_NV_external_sci_sync[]
37403740
slink:VkPhysicalDeviceExternalSciSyncFeaturesNV::pname:sciSyncExport>>
37413741
features must: be enabled
37423742
endif::VK_NV_external_sci_sync[]
3743+
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
3744+
* If pname:handleTypes includes
3745+
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, the
3746+
<<features-externalSemaphoreDrmSyncobj,
3747+
slink:VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT::pname:externalSemaphoreDrmSyncobj>>
3748+
feature must: be enabled
3749+
* If pname:handleTypes includes
3750+
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, the
3751+
slink:VkSemaphoreTypeCreateInfo::pname:semaphoreType field must: be
3752+
ename:VK_SEMAPHORE_TYPE_TIMELINE
3753+
endif::VK_EXT_external_semaphore_drm_syncobj[]
37433754
****
37443755

37453756
include::{generated}/validity/structs/VkExportSemaphoreCreateInfo.adoc[]
@@ -5176,6 +5187,9 @@ The handle types supported by pname:handleType are:
51765187
| Handle Type | Transference | Permanence Supported
51775188
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT | Reference | Temporary,Permanent
51785189
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT | Copy | Temporary
5190+
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
5191+
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT | Reference | Permanent
5192+
endif::VK_EXT_external_semaphore_drm_syncobj[]
51795193
|====
51805194

51815195
.Valid Usage
@@ -5209,6 +5223,17 @@ ifdef::VK_BASE_VERSION_1_2,VK_KHR_timeline_semaphore[]
52095223
semaphore from which pname:fd was exported must: not be
52105224
ename:VK_SEMAPHORE_TYPE_TIMELINE
52115225
endif::VK_BASE_VERSION_1_2,VK_KHR_timeline_semaphore[]
5226+
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
5227+
* If pname:handleType is
5228+
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, the
5229+
<<features-externalSemaphoreDrmSyncobj,
5230+
slink:VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT::pname:externalSemaphoreDrmSyncobj>>
5231+
feature must: be enabled
5232+
* If pname:handleType is
5233+
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, the
5234+
slink:VkSemaphoreTypeCreateInfo::pname:semaphoreType field must: be
5235+
ename:VK_SEMAPHORE_TYPE_TIMELINE
5236+
endif::VK_EXT_external_semaphore_drm_syncobj[]
52125237
****
52135238

52145239
If pname:handleType is ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT,

xml/vk.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11484,6 +11484,11 @@ typedef void* <name>MTLSharedEvent_id</name>;
1148411484
<member limittype="max,pot"><type>VkDeviceSize</type> <name>tensorDescriptorAlignment</name></member>
1148511485
<member limittype="noauto"><type>size_t</type> <name>tensorCaptureReplayOpaqueDataSize</name></member>
1148611486
</type>
11487+
<type category="struct" name="VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
11488+
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_DRM_SYNCOBJ_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
11489+
<member optional="true" noautovalidity="true"><type>void</type>* <name>pNext</name></member>
11490+
<member><type>VkBool32</type> <name>externalSemaphoreDrmSyncobj</name></member>
11491+
</type>
1148711492
</types>
1148811493

1148911494

@@ -30347,10 +30352,14 @@ endif::VK_KHR_internally_synchronized_queues[]
3034730352
<enum value="&quot;VK_SEC_extension_675&quot;" name="VK_SEC_EXTENSION_675_EXTENSION_NAME"/>
3034830353
</require>
3034930354
</extension>
30350-
<extension name="VK_EXT_extension_678" number="678" author="EXT" contact="Julian Orth @mahkoh" supported="disabled">
30355+
<extension name="VK_EXT_external_semaphore_drm_syncobj" number="678" type="device" depends="VK_VERSION_1_2" author="EXT" contact="Julian Orth @mahkoh" supported="vulkan">
3035130356
<require>
30352-
<enum value="0" name="VK_EXT_EXTENSION_678_SPEC_VERSION"/>
30353-
<enum value="&quot;VK_EXT_extension_678&quot;" name="VK_EXT_EXTENSION_678_EXTENSION_NAME"/>
30357+
<enum value="1" name="VK_EXT_EXTERNAL_SEMAPHORE_DRM_SYNCOBJ_SPEC_VERSION"/>
30358+
<enum value="&quot;VK_EXT_external_semaphore_drm_syncobj&quot;" name="VK_EXT_EXTERNAL_SEMAPHORE_DRM_SYNCOBJ_EXTENSION_NAME"/>
30359+
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_DRM_SYNCOBJ_FEATURES_EXT"/>
30360+
<enum bitpos="8" extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT"/>
30361+
<type name="VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT"/>
30362+
<feature name="externalSemaphoreDrmSyncobj" struct="VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT"/>
3035430363
</require>
3035530364
</extension>
3035630365
</extensions>

0 commit comments

Comments
 (0)