|
Ream v0.1.0-1
C++ graphics library for Linux
|
OpenGL backend implementation of RSync. More...
#include <RGLSync.h>
Inheritance diagram for RGLSync:Public Member Functions | |
| ~RGLSync () noexcept | |
| Destroys the underlying EGL sync object. | |
| RGLDevice * | device () const noexcept |
| Returns the device this sync belongs to as an RGLDevice. | |
| bool | gpuWait (RDevice *waiter=nullptr) const noexcept override |
| Inserts a GPU-side wait on this fence. | |
| int | cpuWait (int timeoutMs=-1) const noexcept override |
| Blocks the calling thread until the fence is signaled. | |
| CZSpFd | fd () const noexcept override |
Exports this fence as a sync_file file descriptor. | |
Public Member Functions inherited from RSync | |
| bool | isExternal () const noexcept |
| Whether this sync was imported via FromExternal(). | |
| RDevice * | device () const noexcept |
| Returns the device this sync is associated with. | |
Public Member Functions inherited from RObject | |
| RObject ()=default | |
| Constructs a default RObject. | |
Static Public Member Functions | |
| static std::shared_ptr< RGLSync > | FromExternal (int fd, RGLDevice *device=nullptr) noexcept |
Creates a sync by importing an external sync_file fence. | |
| static std::shared_ptr< RGLSync > | Make (RGLDevice *device=nullptr) noexcept |
| Creates a sync marking the current point in the device's GL command stream. | |
Static Public Member Functions inherited from RSync | |
| static std::shared_ptr< RSync > | FromExternal (int fd, RDevice *device=nullptr) noexcept |
Imports an external sync_file fence. | |
| static std::shared_ptr< RSync > | Make (RDevice *device=nullptr) noexcept |
| Creates a new sync fence. | |
OpenGL backend implementation of RSync.
Wraps an EGL fence sync object (EGLSyncKHR). It is either created for the current point in a device's GL command stream (Make(), preferring a native-fence sync so it can be exported as a sync_file fd) or imported from an external fence fd (FromExternal()). Waits are performed via the device's EGL sync procs; cross-device GPU waits go through fd export/import.
|
noexcept |
Destroys the underlying EGL sync object.
|
staticnoexcept |
Creates a sync by importing an external sync_file fence.
Takes ownership of the fd even on failure. Requires the device's SyncImport capability.
| fd | The fence file descriptor to import. |
| device | Target device, or nullptr for the main device. |
nullptr on failure. Creates a sync marking the current point in the device's GL command stream.
Requires the device's SyncCPU capability; prefers a native-fence sync (exportable to an fd) when SyncExport is available, otherwise falls back to a plain EGL fence.
| device | Target device, or nullptr for the main device. |
nullptr on failure.
|
inlinenoexcept |
Returns the device this sync belongs to as an RGLDevice.
|
overridevirtualnoexcept |
Inserts a GPU-side wait on this fence.
Non-blocking. Makes the waiter's next submission depend on this fence being signaled.
| waiter | Device that must wait. If nullptr, the main device is used. |
Implements RSync.
|
overridevirtualnoexcept |
Blocks the calling thread until the fence is signaled.
| timeoutMs | Timeout in milliseconds; -1 waits indefinitely. |
Implements RSync.
|
overridevirtualnoexcept |
Exports this fence as a sync_file file descriptor.
Implements RSync.