1// Copyright (c) 2020-2022 NVIDIA Corporation 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_NV_external_sci_sync.adoc[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2022-04-12 11*Contributors*:: 12 - Kai Zhang, NVIDIA 13 - Jeff Bolz, NVIDIA 14 - Jonathan McCaffrey, NVIDIA 15 - Daniel Koch, NVIDIA 16 17[[NvSciSync-extension-page]] 18=== Description 19An application using external memory may wish to synchronize access to that 20memory using semaphores and fences. 21This extension enables an application to import and export semaphore and 22fence payloads to and from stext:NvSciSync objects. 23To import a stext:NvSciSyncObj to a slink:VkSemaphore or slink:VkFence, 24applications need to: 25 26 * Create an unreconciled stext:NvSciSyncAttrList via 27 stext:NvSciSyncAttrListCreate() 28 * Fill the private attribute list via 29 flink:vkGetPhysicalDeviceSciSyncAttributesNV() 30 * Fill the public attribute list via stext:NvSciSyncAttrListSetAttrs() 31 * Reconcile the stext:NvSciSyncAttrList via 32 stext:NvSciSyncAttrListReconcile() 33 * Create a stext:NvSciSyncObj via stext:NvSciSyncObjAlloc() 34 * Import the stext:NvSciSyncObj to a slink:VkSemaphore by passing the 35 slink:VkImportSemaphoreSciSyncInfoNV structure to the 36 flink:vkImportSemaphoreSciSyncObjNV command, or to a slink:VkFence by 37 passing the slink:VkImportFenceSciSyncInfoNV structure to the 38 flink:vkImportFenceSciSyncObjNV command. 39 40To import/export a stext:NvSciSyncFence to a slink:VkFence object, that 41slink:VkFence object must: already have a stext:NvSciSyncObj previously 42imported. 43 44For details of the stext:NvSciSync APIs and data structures, see the 45https://developer.nvidia.com/docs/drive/drive-os/latest/linux/sdk/api%5Freference/group%5F%5Fnvsci%5F%5Ftop.html[`NvStreams 46Documentation`]. 47 48include::{generated}/interfaces/VK_NV_external_sci_sync.adoc[] 49 50=== Issues 51 521) What should we call this extension? 53 54RESOLVED. 55The external API is stext:NvSciSync, but the Vulkan convention is to append 56the vendor suffix at the end of an identifier. 57Using stext:NvSciSyncNV seems awkward, so we have chosen to use just the 58stext:SciSync portion of the name in Vulkan commands and tokens. 59Since this is for interacting with objects from outside Vulkan, we use 60"external" in the name, similar to apiext:VK_KHR_external_fence_fd. 61To avoid an explosion of extensions, we include the capability to import and 62export both semaphores and fences in one extension but include separate 63features in case implementations only implement (or safety certify) a 64subset. 65 662) How do we resolve the NvStreams terminology of NvSciSyncFence which 67conflicts with the Vulkan SC terminology of VkFence. 68 69RESOLVED: "fence" refers to VkFence. 70"NvSciSyncFence" refers to the NvStreams type and "VkFence" refers to the 71Vulkan SC type. 72 73 74=== Version History 75 76 * Revision 2, 2022-03-29 (Daniel Koch) 77 ** use separate entry points for stext:NvSciSyncFence and 78 stext:NvSciSyncObj handles 79 * Revision 1, 2020-11-25 (Kai Zhang, Daniel Koch) 80 ** Initial revision 81