|
Ream v0.1.0-1
C++ graphics library for Linux
|
Vulkan RSync represented by a sync_file fd. More...
#include <RVKSync.h>
Inheritance diagram for RVKSync:Public Member Functions | |
| 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< RVKSync > | Make (RVKDevice *device) noexcept |
Captures all queue work submitted so far on device as a sync. | |
| static std::shared_ptr< RVKSync > | FromExternal (int fd, RVKDevice *device) noexcept |
Wraps an existing sync_file fd as a sync on device. | |
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. | |
Vulkan RSync represented by a sync_file fd.
Like the GL backend's Android-native-fence approach, the durable representation is a sync_file fd (poll()able and freely dup-able). A VkSemaphore is only used transiently to mint the fd (Make: empty submit signals a SYNC_FD-exportable semaphore, then export) or to consume it (gpuWait: import into the waiter's next submission). An fd of -1 means the sync is already signaled.
Captures all queue work submitted so far on device as a sync.
Performs an empty submit that signals a SYNC_FD-exportable semaphore, then exports it as a sync_file fd. If SYNC_FD export is unavailable, returns an already-signaled (no-op) sync.
Wraps an existing sync_file fd as a sync on device.
Takes ownership of fd even on failure (per the RSync contract).
|
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.