A Vulkan fence that can be exported as a platform specific file descriptor. More...
#include <external_fence_vk.h>
Public Member Functions | |
| ExternalFenceVK (const std::shared_ptr< Context > &context) | |
| Create a new un-signaled fence that can be exported as a sync file descriptor. More... | |
| ~ExternalFenceVK () | |
| ExternalFenceVK (const ExternalFenceVK &)=delete | |
| ExternalFenceVK & | operator= (const ExternalFenceVK &)=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 fence. The fence 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. More... | |
| const vk::Fence & | GetHandle () const |
| const SharedHandleVK< vk::Fence > & | GetSharedHandle () const |
A Vulkan fence that can be exported as a platform specific file descriptor.
The fences are exported as sync file descriptors.
Definition at line 28 of file external_fence_vk.h.
|
explicit |
Create a new un-signaled fence that can be exported as a sync file descriptor.
| [in] | context | The device context. |
Definition at line 12 of file external_fence_vk.cc.
References impeller::BackendCast< ContextVK, Context >::Cast(), impeller::MakeSharedVK(), and VALIDATION_LOG.
|
default |
|
delete |
| fml::UniqueFD impeller::ExternalFenceVK::CreateFD | ( | ) | const |
Create a new sync file descriptor for the underlying fence. The fence 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 40 of file external_fence_vk.cc.
References IsValid(), and VALIDATION_LOG.
| const vk::Fence & impeller::ExternalFenceVK::GetHandle | ( | ) | const |
Definition at line 56 of file external_fence_vk.cc.
| const SharedHandleVK< vk::Fence > & impeller::ExternalFenceVK::GetSharedHandle | ( | ) | const |
Definition at line 60 of file external_fence_vk.cc.
| bool impeller::ExternalFenceVK::IsValid | ( | ) | const |
If a valid fence could be created.
Definition at line 36 of file external_fence_vk.cc.
Referenced by CreateFD().
|
delete |