linux_drm_syncobj

package
v0.50.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: BSD-2-Clause Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const LinuxDrmSyncobjManagerInterfaceName = "wp_linux_drm_syncobj_manager_v1"

LinuxDrmSyncobjManagerInterfaceName is the name of the interface as it appears in the client.Registry. It can be used to match the client.RegistryGlobalEvent.Interface in the [Registry.SetGlobalHandler] and can be used in [Registry.Bind] if this applies.

View Source
const LinuxDrmSyncobjSurfaceInterfaceName = "wp_linux_drm_syncobj_surface_v1"

LinuxDrmSyncobjSurfaceInterfaceName is the name of the interface as it appears in the client.Registry. It can be used to match the client.RegistryGlobalEvent.Interface in the [Registry.SetGlobalHandler] and can be used in [Registry.Bind] if this applies.

View Source
const LinuxDrmSyncobjTimelineInterfaceName = "wp_linux_drm_syncobj_timeline_v1"

LinuxDrmSyncobjTimelineInterfaceName is the name of the interface as it appears in the client.Registry. It can be used to match the client.RegistryGlobalEvent.Interface in the [Registry.SetGlobalHandler] and can be used in [Registry.Bind] if this applies.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinuxDrmSyncobjManager

type LinuxDrmSyncobjManager struct {
	client.BaseProxy
}

LinuxDrmSyncobjManager : global for providing explicit synchronization

This global is a factory interface, allowing clients to request explicit synchronization for buffers on a per-surface basis.

See wp_linux_drm_syncobj_surface_v1 for more information.

func NewLinuxDrmSyncobjManager

func NewLinuxDrmSyncobjManager(ctx *client.Context) *LinuxDrmSyncobjManager

NewLinuxDrmSyncobjManager : global for providing explicit synchronization

This global is a factory interface, allowing clients to request explicit synchronization for buffers on a per-surface basis.

See wp_linux_drm_syncobj_surface_v1 for more information.

func (*LinuxDrmSyncobjManager) Destroy

func (i *LinuxDrmSyncobjManager) Destroy() error

Destroy : destroy explicit synchronization factory object

Destroy this explicit synchronization factory object. Other objects shall not be affected by this request.

func (*LinuxDrmSyncobjManager) GetSurface

GetSurface : extend surface interface for explicit synchronization

Instantiate an interface extension for the given wl_surface to provide explicit synchronization.

If the given wl_surface already has an explicit synchronization object associated, the surface_exists protocol error is raised.

Graphics APIs, like EGL or Vulkan, that manage the buffer queue and commits of a wl_surface themselves, are likely to be using this extension internally. If a client is using such an API for a wl_surface, it should not directly use this extension on that surface, to avoid raising a surface_exists protocol error.

surface: the surface

func (*LinuxDrmSyncobjManager) ImportTimeline

func (i *LinuxDrmSyncobjManager) ImportTimeline(fd int) (*LinuxDrmSyncobjTimeline, error)

ImportTimeline : import a DRM syncobj timeline

Import a DRM synchronization object timeline.

If the FD cannot be imported, the invalid_timeline error is raised.

fd: drm_syncobj file descriptor

type LinuxDrmSyncobjManagerError

type LinuxDrmSyncobjManagerError uint32
const (
	// LinuxDrmSyncobjManagerErrorSurfaceExists : the surface already has a synchronization object associated
	LinuxDrmSyncobjManagerErrorSurfaceExists LinuxDrmSyncobjManagerError = 0
	// LinuxDrmSyncobjManagerErrorInvalidTimeline : the timeline object could not be imported
	LinuxDrmSyncobjManagerErrorInvalidTimeline LinuxDrmSyncobjManagerError = 1
)

LinuxDrmSyncobjManagerError :

func (LinuxDrmSyncobjManagerError) Name

func (LinuxDrmSyncobjManagerError) String

func (LinuxDrmSyncobjManagerError) Value

type LinuxDrmSyncobjSurface

type LinuxDrmSyncobjSurface struct {
	client.BaseProxy
}

LinuxDrmSyncobjSurface : per-surface explicit synchronization

This object is an add-on interface for wl_surface to enable explicit synchronization.

Each surface can be associated with only one object of this interface at any time.

Explicit synchronization is guaranteed to be supported for buffers created with any version of the linux-dmabuf protocol. Compositors are free to support explicit synchronization for additional buffer types. If at surface commit time the attached buffer does not support explicit synchronization, an unsupported_buffer error is raised.

As long as the wp_linux_drm_syncobj_surface_v1 object is alive, the compositor may ignore implicit synchronization for buffers attached and committed to the wl_surface. The delivery of wl_buffer.release events for buffers attached to the surface becomes undefined.

Clients must set both acquire and release points if and only if a non-null buffer is attached in the same surface commit. See the no_buffer, no_acquire_point and no_release_point protocol errors.

If at surface commit time the acquire and release DRM syncobj timelines are identical, the acquire point value must be strictly less than the release point value, or else the conflicting_points protocol error is raised.

func NewLinuxDrmSyncobjSurface

func NewLinuxDrmSyncobjSurface(ctx *client.Context) *LinuxDrmSyncobjSurface

NewLinuxDrmSyncobjSurface : per-surface explicit synchronization

This object is an add-on interface for wl_surface to enable explicit synchronization.

Each surface can be associated with only one object of this interface at any time.

Explicit synchronization is guaranteed to be supported for buffers created with any version of the linux-dmabuf protocol. Compositors are free to support explicit synchronization for additional buffer types. If at surface commit time the attached buffer does not support explicit synchronization, an unsupported_buffer error is raised.

As long as the wp_linux_drm_syncobj_surface_v1 object is alive, the compositor may ignore implicit synchronization for buffers attached and committed to the wl_surface. The delivery of wl_buffer.release events for buffers attached to the surface becomes undefined.

Clients must set both acquire and release points if and only if a non-null buffer is attached in the same surface commit. See the no_buffer, no_acquire_point and no_release_point protocol errors.

If at surface commit time the acquire and release DRM syncobj timelines are identical, the acquire point value must be strictly less than the release point value, or else the conflicting_points protocol error is raised.

func (*LinuxDrmSyncobjSurface) Destroy

func (i *LinuxDrmSyncobjSurface) Destroy() error

Destroy : destroy the surface synchronization object

Destroy this surface synchronization object.

Any timeline point set by this object with set_acquire_point or set_release_point since the last commit may be discarded by the compositor. Any timeline point set by this object before the last commit will not be affected.

func (*LinuxDrmSyncobjSurface) SetAcquirePoint

func (i *LinuxDrmSyncobjSurface) SetAcquirePoint(timeline *LinuxDrmSyncobjTimeline, pointHi, pointLo uint32) error

SetAcquirePoint : set the acquire timeline point

Set the timeline point that must be signalled before the compositor may sample from the buffer attached with wl_surface.attach.

The 64-bit unsigned value combined from point_hi and point_lo is the point value.

The acquire point is double-buffered state, and will be applied on the next wl_surface.commit request for the associated surface. Thus, it applies only to the buffer that is attached to the surface at commit time.

If an acquire point has already been attached during the same commit cycle, the new point replaces the old one.

If the associated wl_surface was destroyed, a no_surface error is raised.

If at surface commit time there is a pending acquire timeline point set but no pending buffer attached, a no_buffer error is raised. If at surface commit time there is a pending buffer attached but no pending acquire timeline point set, the no_acquire_point protocol error is raised.

pointHi: high 32 bits of the point value
pointLo: low 32 bits of the point value

func (*LinuxDrmSyncobjSurface) SetReleasePoint

func (i *LinuxDrmSyncobjSurface) SetReleasePoint(timeline *LinuxDrmSyncobjTimeline, pointHi, pointLo uint32) error

SetReleasePoint : set the release timeline point

Set the timeline point that must be signalled by the compositor when it has finished its usage of the buffer attached with wl_surface.attach for the relevant commit.

Once the timeline point is signaled, and assuming the associated buffer is not pending release from other wl_surface.commit requests, no additional explicit or implicit synchronization with the compositor is required to safely re-use the buffer.

Note that clients cannot rely on the release point being always signaled after the acquire point: compositors may release buffers without ever reading from them. In addition, the compositor may use different presentation paths for different commits, which may have different release behavior. As a result, the compositor may signal the release points in a different order than the client committed them.

Because signaling a timeline point also signals every previous point, it is generally not safe to use the same timeline object for the release points of multiple buffers. The out-of-order signaling described above may lead to a release point being signaled before the compositor has finished reading. To avoid this, it is strongly recommended that each buffer should use a separate timeline for its release points.

The 64-bit unsigned value combined from point_hi and point_lo is the point value.

The release point is double-buffered state, and will be applied on the next wl_surface.commit request for the associated surface. Thus, it applies only to the buffer that is attached to the surface at commit time.

If a release point has already been attached during the same commit cycle, the new point replaces the old one.

If the associated wl_surface was destroyed, a no_surface error is raised.

If at surface commit time there is a pending release timeline point set but no pending buffer attached, a no_buffer error is raised. If at surface commit time there is a pending buffer attached but no pending release timeline point set, the no_release_point protocol error is raised.

pointHi: high 32 bits of the point value
pointLo: low 32 bits of the point value

type LinuxDrmSyncobjSurfaceError

type LinuxDrmSyncobjSurfaceError uint32
const (
	// LinuxDrmSyncobjSurfaceErrorNoSurface : the associated wl_surface was destroyed
	LinuxDrmSyncobjSurfaceErrorNoSurface LinuxDrmSyncobjSurfaceError = 1
	// LinuxDrmSyncobjSurfaceErrorUnsupportedBuffer : the buffer does not support explicit synchronization
	LinuxDrmSyncobjSurfaceErrorUnsupportedBuffer LinuxDrmSyncobjSurfaceError = 2
	// LinuxDrmSyncobjSurfaceErrorNoBuffer : no buffer was attached
	LinuxDrmSyncobjSurfaceErrorNoBuffer LinuxDrmSyncobjSurfaceError = 3
	// LinuxDrmSyncobjSurfaceErrorNoAcquirePoint : no acquire timeline point was set
	LinuxDrmSyncobjSurfaceErrorNoAcquirePoint LinuxDrmSyncobjSurfaceError = 4
	// LinuxDrmSyncobjSurfaceErrorNoReleasePoint : no release timeline point was set
	LinuxDrmSyncobjSurfaceErrorNoReleasePoint LinuxDrmSyncobjSurfaceError = 5
	// LinuxDrmSyncobjSurfaceErrorConflictingPoints : acquire and release timeline points are in conflict
	LinuxDrmSyncobjSurfaceErrorConflictingPoints LinuxDrmSyncobjSurfaceError = 6
)

LinuxDrmSyncobjSurfaceError :

func (LinuxDrmSyncobjSurfaceError) Name

func (LinuxDrmSyncobjSurfaceError) String

func (LinuxDrmSyncobjSurfaceError) Value

type LinuxDrmSyncobjTimeline

type LinuxDrmSyncobjTimeline struct {
	client.BaseProxy
}

LinuxDrmSyncobjTimeline : synchronization object timeline

This object represents an explicit synchronization object timeline imported by the client to the compositor.

func NewLinuxDrmSyncobjTimeline

func NewLinuxDrmSyncobjTimeline(ctx *client.Context) *LinuxDrmSyncobjTimeline

NewLinuxDrmSyncobjTimeline : synchronization object timeline

This object represents an explicit synchronization object timeline imported by the client to the compositor.

func (*LinuxDrmSyncobjTimeline) Destroy

func (i *LinuxDrmSyncobjTimeline) Destroy() error

Destroy : destroy the timeline

Destroy the synchronization object timeline. Other objects are not affected by this request, in particular timeline points set by set_acquire_point and set_release_point are not unset.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL