Documentation
¶
Overview ¶
Package syncobj bridges Vulkan SYNC_FD semaphores and Wayland DRM syncobj timelines on the compositor-selected render node. It never interprets a Vulkan OPAQUE_FD as a DRM syncobj FD.
Index ¶
- type Node
- func (n *Node) AcquirePoint(syncFile int, timeline uint32, point uint64) error
- func (n *Node) Close() error
- func (n *Node) Create() (uint32, error)
- func (n *Node) Destroy(handle uint32) error
- func (n *Node) ExportTimeline(handle uint32) (int, error)
- func (n *Node) ImportFence(syncFile int) (uint32, error)
- func (n *Node) Query(handle uint32) (uint64, error)
- func (n *Node) ReleaseFence(timeline uint32, point uint64) (int, error)
- func (n *Node) Signaled(handle uint32, point uint64) (bool, error)
- func (n *Node) Transfer(src uint32, srcPoint uint64, dst uint32, dstPoint uint64) error
- func (n *Node) WaitPoint(handle uint32, point uint64, timeout time.Duration) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node owns the DRM render fd. Only open the render node of the Vulkan device matched to linux-dmabuf main_device. Never substitute a different GPU.
func (*Node) AcquirePoint ¶
AcquirePoint transfers the Vulkan submission's exported SYNC_FD into the persistent acquire timeline. The caller retains syncFile on import error.
func (*Node) ExportTimeline ¶
ExportTimeline returns a new owned syncobj FD (not a sync_file). The caller hands it to WLTurbo's ImportTimeline, which closes only after a successful request send; on send failure the caller must close the FD.
func (*Node) ImportFence ¶
ImportFence consumes syncFile only after FD_TO_HANDLE imports it into a pre-created destination syncobj. With IMPORT_SYNC_FILE, Handle is an input, not an output: asking the kernel to import into handle zero returns ENOENT. The caller retains syncFile if the ioctl rejects it.
func (*Node) Query ¶
Query returns the last signaled point. This is diagnostic only: timeline wait, not an optimistic query, authorizes release.
func (*Node) ReleaseFence ¶
ReleaseFence exports a compositor release point as a sync_file suitable for TEMPORARY Vulkan semaphore import. The caller owns the returned FD until Vulkan accepts the import; failed imports must close it.