Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions appendices/VK_EXT_external_semaphore_drm_syncobj.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright 2026 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_EXT_external_semaphore_drm_syncobj.adoc[]

=== Other Extension Metadata

*Last Modified Date*::
2026-03-02
*IP Status*::
No known IP claims.
*Contributors*::
- Julian Orth
- James Jones, NVIDIA
- Simon Ser
- Lisa Wu, Arm Ltd.
- Jon Leech, Khronos

=== Description

This extension adds the ability to import and export timeline semaphores as DRM
synchronization objects (syncobj).

include::{generated}/interfaces/VK_EXT_external_semaphore_drm_syncobj.adoc[]

=== Version History

* Revision 1, 2026-03-02 (Julian Orth)
** Initial revision
9 changes: 9 additions & 0 deletions chapters/capabilities.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,12 @@ ifdef::VK_NV_external_sci_sync[]
hardware engines including the CPU and software (intra-process and
inter-process) operating domains and perform signal and wait operations.
endif::VK_NV_external_sci_sync[]
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
* ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT specifies a
file descriptor handle to a Linux DRM synchronization object (syncobj).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this extension specifically assumes DRM timeline synchronization objects, but binary syncobjs are a thing too, so the spec should probably be specific here and elsewhere. You may want to consider including that in the name as well, but it might also be considered overly verbose. I could go either way personally.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe the kernel distinguishes between binary and timeline syncobjs. The ioctl to create a syncobj does not have a way to allocate one or the other:

struct drm_syncobj_create {
	__u32 handle;
#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0)
	__u32 flags;
};

The kernel warns against using both binary and timeline ioctls on the same syncobj but I believe the following sentence from this PR already covers this:

                                                            Vulkan timeline
    semaphore values correspond to syncobj points.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I can confirm that the kernel makes no difference between binary and timeline syncobjs. A binary syncobj is a timeline syncobj with only point 0 being used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think it's reasonable to have a Vulkan VU or at least a note that says that it should only be imported as the same timeline type it was exported as. That won't cover every case since the client can go call DRM ioctls itself, but if someone is, for instance, using this to share semaphores between two different Vulkan devices, they're going to run into trouble if they mix and match.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extension only supports import to/export from timeline semaphores.

This type must be used with timeline semaphores and Vulkan timeline
semaphore values corresponding to syncobj points.
endif::VK_EXT_external_semaphore_drm_syncobj[]

[NOTE]
====
Expand Down Expand Up @@ -1651,6 +1657,9 @@ endif::VK_FUCHSIA_external_semaphore[]
ifdef::VK_NV_external_sci_sync[]
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SCI_SYNC_OBJ_BIT_NV | No restriction | No restriction
endif::VK_NV_external_sci_sync[]
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT | No restriction | No restriction
endif::VK_EXT_external_semaphore_drm_syncobj[]
|====
--

Expand Down
25 changes: 25 additions & 0 deletions chapters/features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9574,6 +9574,31 @@ include::{generated}/validity/structs/VkPhysicalDeviceShaderInstrumentationFeatu
--
endif::VK_ARM_shader_instrumentation[]

ifdef::VK_EXT_external_semaphore_drm_syncobj[]
[open,refpage='VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT',desc='Structure describing the external semaphore DRM syncobj features supported by the implementation',type='structs']
--
The sname:VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT structure is defined
as:

include::{generated}/api/structs/VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT.adoc[]

This structure describes the following feature:

* pname:sType is a elink:VkStructureType value identifying this structure.
* pname:pNext is `NULL` or a pointer to a structure extending this
structure.
* [[features-externalSemaphoreDrmSyncobj]] pname:externalSemaphoreDrmSyncobj
indicates whether the implementation has support for the
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT external
semaphore handle type.

:refpage: VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT
include::{chapters}/features.adoc[tag=features]

include::{generated}/validity/structs/VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT.adoc[]
--
endif::VK_EXT_external_semaphore_drm_syncobj[]


ifdef::VK_KHR_device_address_commands[]
[open,refpage='VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR',desc='Structure describing support for device address commands',type='structs']
Expand Down
25 changes: 25 additions & 0 deletions chapters/synchronization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3746,6 +3746,17 @@ ifdef::VK_NV_external_sci_sync[]
slink:VkPhysicalDeviceExternalSciSyncFeaturesNV::pname:sciSyncExport>>
features must: be enabled
endif::VK_NV_external_sci_sync[]
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
* If pname:handleTypes includes
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, the
<<features-externalSemaphoreDrmSyncobj,
slink:VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT::pname:externalSemaphoreDrmSyncobj>>
feature must: be enabled
* If pname:handleTypes includes
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, the
slink:VkSemaphoreTypeCreateInfo::pname:semaphoreType field must: be
ename:VK_SEMAPHORE_TYPE_TIMELINE
endif::VK_EXT_external_semaphore_drm_syncobj[]
****

include::{generated}/validity/structs/VkExportSemaphoreCreateInfo.adoc[]
Expand Down Expand Up @@ -5182,6 +5193,9 @@ The handle types supported by pname:handleType are:
| Handle Type | Transference | Permanence Supported
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT | Reference | Temporary,Permanent
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT | Copy | Temporary
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
| ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT | Reference | Permanent
endif::VK_EXT_external_semaphore_drm_syncobj[]
|====

.Valid Usage
Expand Down Expand Up @@ -5215,6 +5229,17 @@ ifdef::VK_BASE_VERSION_1_2,VK_KHR_timeline_semaphore[]
semaphore from which pname:fd was exported must: not be
ename:VK_SEMAPHORE_TYPE_TIMELINE
endif::VK_BASE_VERSION_1_2,VK_KHR_timeline_semaphore[]
ifdef::VK_EXT_external_semaphore_drm_syncobj[]
* If pname:handleType is
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, the
<<features-externalSemaphoreDrmSyncobj,
slink:VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT::pname:externalSemaphoreDrmSyncobj>>
feature must: be enabled
* If pname:handleType is
ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, the
slink:VkSemaphoreTypeCreateInfo::pname:semaphoreType field must: be
ename:VK_SEMAPHORE_TYPE_TIMELINE
endif::VK_EXT_external_semaphore_drm_syncobj[]
****

If pname:handleType is ename:VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT,
Expand Down
15 changes: 12 additions & 3 deletions xml/vk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11697,6 +11697,11 @@ typedef void* <name>MTLSharedEvent_id</name>;
<member optional="true"><type>uint64_t</type> <name>messageDataSize</name></member>
<member optional="true"><type>void</type>* <name>pMessageData</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_DRM_SYNCOBJ_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true" noautovalidity="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>externalSemaphoreDrmSyncobj</name></member>
</type>
</types>


Expand Down Expand Up @@ -30994,10 +30999,14 @@ endif::VK_KHR_internally_synchronized_queues[]
<enum value="&quot;VK_ARM_extension_677&quot;" name="VK_ARM_EXTENSION_677_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_678" number="678" author="EXT" contact="Julian Orth @mahkoh" supported="disabled">
<extension name="VK_EXT_external_semaphore_drm_syncobj" number="678" type="device" depends="(VK_VERSION_1_2,VK_KHR_timeline_semaphore)" author="EXT" contact="Julian Orth @mahkoh" supported="vulkan">
<require>
<enum value="0" name="VK_EXT_EXTENSION_678_SPEC_VERSION"/>
<enum value="&quot;VK_EXT_extension_678&quot;" name="VK_EXT_EXTENSION_678_EXTENSION_NAME"/>
<enum value="1" name="VK_EXT_EXTERNAL_SEMAPHORE_DRM_SYNCOBJ_SPEC_VERSION"/>
<enum value="&quot;VK_EXT_external_semaphore_drm_syncobj&quot;" name="VK_EXT_EXTERNAL_SEMAPHORE_DRM_SYNCOBJ_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_DRM_SYNCOBJ_FEATURES_EXT"/>
<enum bitpos="8" extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT"/>
<type name="VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT"/>
<feature name="externalSemaphoreDrmSyncobj" struct="VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_679" number="679" type="device" author="EXT" contact="Mike Blumenkrantz @zmike" supported="disabled">
Expand Down
Loading