Vendor-supplied pin / unpin callbacks shared by the GPU-direct and host-staged output helpers. More...
Detailed Description
Vendor-supplied pin / unpin callbacks shared by the GPU-direct and host-staged output helpers.
A capture/output card's SDK exposes a way to page-lock (pin) a memory region for its DMA engine: AJA DMABufferLock, Magewell MWPinVideoBuffer, Blackmagic DeckLink's frame allocator, NVIDIA Rivermax rmx_register_memory, etc. The generic output helpers (RdmaVideoOutput for GPU-side P2P buffers, CpuStagedVideoOutput for host-side staging buffers) own the buffers and invoke these callbacks once per buffer at init / shutdown; the vendor adapter keeps its SDK call in its own addon.
registerSlot returning false aborts init; partial state is rolled back before the helper's init() returns.
verifyTransfer (optional) is a one-time capability probe: after the first slot is pinned, the helper hands its pointer back so the vendor can attempt a single real DMA in the direction it will actually use. Pinning a GPU buffer only proves nvidia_p2p_get_pages accepted the range — it does NOT prove the card↔GPU PCIe path permits P2P in that direction. On AMD platforms, cross-host-bridge P2P routinely passes posted writes (capture) but blocks non-posted reads (playout), so a card can pin an output buffer yet fail every transfer. Returning false here aborts init so the strategy chain falls back cleanly instead of emitting silent per-frame drops.
verifyTransfer alone is a return code, and a dropped P2P transfer returns success. readbackTransfer closes that: it reads back, into host memory, the bytes verifyTransfer just pushed into the peer's scratch buffer, so RdmaPlayoutProbe can compare them 1:1 against the pattern it seeded. A vendor that supplies both gets a content-verified rung; one that supplies neither does not get an RDMA output rung at all.
Go to the source code of this file.
Classes | |
| struct | score::gfx::interop::VendorDmaRegistrar |
Namespaces | |
| namespace | score |
| Base toolkit upon which the software is built. | |
| namespace | score::gfx |
| Graphics rendering pipeline for ossia score. | |