Loading...
Searching...
No Matches
ImportedGpuBufferRing.hpp File Reference
Backend-uniform N-slot exportable GPU buffer ring for vendor P2P. More...
Detailed Description
Backend-uniform N-slot exportable GPU buffer ring for vendor P2P.
Captures the QRhi-adopted-buffer ring pattern shared by every GPU-direct video output strategy:
- Allocate N QRhi StorageBuffers.
- Extract each underlying native buffer (ID3D11Buffer*, GLuint, ...) via
QRhiBuffer::nativeBuffer(). - Import each into CUDA via the
CudaInteropC API. - Hand the resulting flat GPU device pointer to the peer device's DMA-pin API (AJA
DMABufferLock(inRDMA=true), MagewellMWPinVideoBuffer, Rivermaxrmx_register_memory, ...). - Per frame: rotate the ring; encoder writes into the current slot's QRhi buffer; peer device DMA-reads from the same slot's GPU device pointer.
Gives capture-card output addons a shared slot ring so each one doesn't re-implement the dance. Vendor-specific concerns (the DMA-lock call, the per-frame submission API, pacing) stay in each vendor's addon.
Backend support matrix:
- D3D11 : real (ID3D11Buffer + cuda_interop_import_d3d11_buffer)
- OpenGL : real (GLuint + cuda_interop_import_gl_buffer)
- Vulkan : stub (QRhi VMA-allocates without VkExportMemoryAllocateInfo; needs either a QRhi private-API patch or a parallel externally-managed buffer ring with beginExternal compute dispatch)
- D3D12 : stub (QRhi D3D12 backend lacks SHARED heap support)
Go to the source code of this file.
Classes | |
| struct | score::gfx::interop::GpuRingBufferSlot |
| One slot of the ring. Lifetime owned by ImportedGpuBufferRing. More... | |
| struct | score::gfx::interop::ImportedGpuBufferRingConfig |
| class | score::gfx::interop::ImportedGpuBufferRing |
| Vendor-neutral helper that allocates + manages the slot ring. More... | |
Namespaces | |
| namespace | score |
| Base toolkit upon which the software is built. | |
| namespace | score::gfx |
| Graphics rendering pipeline for ossia score. | |