Loading...
Searching...
No Matches
InteropFence.hpp
Go to the documentation of this file.
1#pragma once
2
35#include <Gfx/Graph/interop/CudaInterop.h>
36#include <score_plugin_gfx_export.h>
37
38#include <cstdint>
39#include <memory>
40
41class QRhi;
42class QRhiCommandBuffer;
43
44namespace score::gfx::interop
45{
46
52struct SCORE_PLUGIN_GFX_EXPORT InteropFence
53{
54 virtual ~InteropFence() = default;
55
58 virtual bool valid() const noexcept = 0;
59
63 virtual bool init(QRhi& rhi, CudaInteropContextHandle cudaCtx) = 0;
64
67 virtual void release() = 0;
68
72 virtual void signalAfterEncode(QRhiCommandBuffer& cb, std::uint64_t value) = 0;
73
78 virtual bool waitOnCuda(std::uint64_t value) = 0;
79};
80
86SCORE_PLUGIN_GFX_EXPORT
87std::unique_ptr<InteropFence> makeInteropFence(QRhi& rhi);
88
89} // namespace score::gfx::interop
STL namespace.
Backend-uniform fence interface. Per-vendor adapters hold one instance, signal it after the per-frame...
Definition InteropFence.hpp:53
virtual bool valid() const noexcept=0