Signal for an NvSciSyncFence
VkFence (CPU only)
Use the vkQueueSubmit API to submit jobs enqueued on the Vulkan SC queue
by providing a valid VkFence to fence as a parameter. The fence tracks the
completion of all the jobs submitted to the Vulkan SC queue on which the API was
invoked.
Use vkGetFenceSciSyncFenceNV to get the pending
NvSciSyncFence. The application must provide a valid
VkFence to VkFenceGetSciSyncInfoNV::fence from which the
NvSciSyncFence is extracted.
Waiting on this NvSciSyncFence is equivalent to waiting for the completion
of all prior submissions on the queue, in submission order. Once all the submissions have
completed, the NvSciSyncFence is signaled and all the potential waiters on
this NvSciSyncFence are unblocked. This signal occurs asynchronously on the
GPU.
VkSemaphore
- GPU Signal
Use the
vkQueueSubmitAPI to submit jobs enqueued on the Vulkan SC queue. This API takesVkSubmitInfo::pSignalSemaphoresas a parameter. In addition, application must chain a validVkTimelineSemaphoreSubmitInfostruct to theVkSubmitInfo::pNext, whereVkTimelineSemaphoreSubmitInfo::pSignalSemaphoreValuesshould be tracked and maintained by application (The initial value is always0).As applications must maintain the signal value by incrementing it for each submission, use the
NvSciSyncAPINvSciSyncFenceUpdateFenceto get the pendingNvSciSyncFence, where the id is always0becauseVkSemaphoreonly supports onesysmemsemaphore as a signaler. ThisNvSciSyncFencetracks prior batches to the queue, in signal operation order. Once it is signaled, all the potential waiters on thisNvSciSyncFencewill be unblocked. This signal occurs asynchronously on the GPU. -
CPU Signal
Use the
vkSignalSemaphoreAPI to signal on the CPU. This API takes a validVkSemaphoreSignalInfo::semaphoreas a parameter. In addition, applications must track and maintain the signal value and provide it as a parameter toVkSemaphoreSignalInfo::value.Use the
NvSciSyncAPINvSciSyncFenceUpdateFenceto get the pendingNvSciSyncFence. The signal occurs asynchronously on the GPU. Once it is signaled, all the potential waiters on thisNvSciSyncFencewill be unblocked. - Deterministic Fence
Vulkan SC supports Deterministic Fence in
VkSemaphore. When Deterministic Fence is enabled inNvSciSync, Vulkan SC signaler doesn’t need to exportNvSciSyncFencetoNvSciIPC. When Vulkan SC applications pass a counter value to signal aVkSemaphore, applications pass the value, which increments by +1 (exactly one), from the counter value of the previous semaphore signal operation on thatVkSemaphore, in signal operation order. The initial counter value is0.