16 vk::StructureChain<vk::FenceCreateInfo, vk::ExportFenceCreateInfoKHR>
info;
18 info.get<vk::ExportFenceCreateInfoKHR>().handleTypes =
19 vk::ExternalFenceHandleTypeFlagBits::eSyncFd;
22 auto [
result, fence] = context_vk.GetDevice().createFenceUnique(
info.get());
23 if (
result != vk::Result::eSuccess) {
29 context_vk.SetDebugName(fence.get(),
"ExternalFenceSyncFD");
44 vk::FenceGetFdInfoKHR
info;
45 info.fence = fence_->Get();
46 info.handleType = vk::ExternalFenceHandleTypeFlagBits::eSyncFd;
47 auto [
result, fd] = fence_->GetUniqueWrapper().getOwner().getFenceFdKHR(
info);
48 if (
result != vk::Result::eSuccess) {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static ContextVK & Cast(Context &base)
fml::UniqueFD CreateFD() const
Create a new sync file descriptor for the underlying fence. The fence must already be signaled or hav...
ExternalFenceVK(const std::shared_ptr< Context > &context)
Create a new un-signaled fence that can be exported as a sync file descriptor.
const vk::Fence & GetHandle() const
const SharedHandleVK< vk::Fence > & GetSharedHandle() const
bool IsValid() const
If a valid fence could be created.
std::shared_ptr< SharedObjectVKT< T > > SharedHandleVK
auto MakeSharedVK(vk::UniqueHandle< T, VULKAN_HPP_DEFAULT_DISPATCHER_TYPE > handle)
static SkString to_string(int n)