A Vulkan semaphore that can be exported as a platform specific file descriptor. More...
#include <external_semaphore_vk.h>
Public Member Functions | |
ExternalSemaphoreVK (const std::shared_ptr< Context > &context) | |
Create a new un-signaled semaphore that can be exported as a sync file descriptor. More... | |
~ExternalSemaphoreVK () | |
ExternalSemaphoreVK (const ExternalSemaphoreVK &)=delete | |
ExternalSemaphoreVK & | operator= (const ExternalSemaphoreVK &)=delete |
bool | IsValid () const |
If a valid fence could be created. More... | |
fml::UniqueFD | CreateFD () const |
Create a new sync file descriptor for the underlying semaphore. More... | |
const vk::Semaphore & | GetHandle () const |
const SharedHandleVK< vk::Semaphore > & | GetSharedHandle () const |
A Vulkan semaphore that can be exported as a platform specific file descriptor.
The semaphore are exported as sync file descriptors.
Definition at line 27 of file external_semaphore_vk.h.
|
explicit |
Create a new un-signaled semaphore that can be exported as a sync file descriptor.
[in] | context | The device context. |
Definition at line 13 of file external_semaphore_vk.cc.
References impeller::BackendCast< ContextVK, Context >::Cast(), impeller::MakeSharedVK(), and VALIDATION_LOG.
|
default |
|
delete |
fml::UniqueFD impeller::ExternalSemaphoreVK::CreateFD | ( | ) | const |
Create a new sync file descriptor for the underlying semaphore.
The semaphore must already be signaled or have a signal operation pending in a queue. There are no checks for this in the implementation and only Vulkan validation will catch such a misuse and undefined behavior.
Since this call can return an invalid FD even in case of success, make sure to make the IsValid
check before attempting to export a FD.
Definition at line 44 of file external_semaphore_vk.cc.
References IsValid(), and VALIDATION_LOG.
const vk::Semaphore & impeller::ExternalSemaphoreVK::GetHandle | ( | ) | const |
Definition at line 61 of file external_semaphore_vk.cc.
const SharedHandleVK< vk::Semaphore > & impeller::ExternalSemaphoreVK::GetSharedHandle | ( | ) | const |
Definition at line 65 of file external_semaphore_vk.cc.
bool impeller::ExternalSemaphoreVK::IsValid | ( | ) | const |
If a valid fence could be created.
Definition at line 40 of file external_semaphore_vk.cc.
Referenced by CreateFD().
|
delete |