34#include <Gfx/Graph/interop/CudaInterop.h>
37#include <score_plugin_gfx_export.h>
43namespace score::gfx::vkinterop
48class SCORE_PLUGIN_GFX_EXPORT VkCudaTimelineSemaphore
51 VkCudaTimelineSemaphore() =
default;
52 ~VkCudaTimelineSemaphore();
54 VkCudaTimelineSemaphore(
const VkCudaTimelineSemaphore&) =
delete;
55 VkCudaTimelineSemaphore& operator=(
const VkCudaTimelineSemaphore&) =
delete;
56 VkCudaTimelineSemaphore(VkCudaTimelineSemaphore&&) noexcept;
57 VkCudaTimelineSemaphore& operator=(VkCudaTimelineSemaphore&&) noexcept;
70 bool create(const VulkanCtx& vk, CudaInteropContextHandle cudaCtx,
71 uint64_t initialValue = 0,
bool binary = false);
74 void destroy() noexcept;
76 bool valid() const noexcept;
80 VkSemaphore vk() const noexcept {
return m_vkSem; }
84 CudaInteropSemaphoreHandle cuda() const noexcept {
return m_cudaSem; }
89 bool hostSignal(uint64_t value);
93 CudaInteropContextHandle m_cudaCtx{};
94 VkSemaphore m_vkSem{VK_NULL_HANDLE};
95 CudaInteropSemaphoreHandle m_cudaSem{};
Vulkan external-memory image/buffer create + export + import helpers.