Loading...
Searching...
No Matches
AmdPinnedBuffers.hpp File Reference

AMD GL pinned-memory and bus-addressable extension wrapper. More...

Detailed Description

AMD GL pinned-memory and bus-addressable extension wrapper.

AMD's GL driver exposes three extensions that score's vendor-neutral HostPinnedRing and (where supported) a direct P2P backend can use:

  • GL_AMD_pinned_memory — bind a host pointer as the storage of a GL buffer via glBufferData(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, size, host_ptr, usage). The GL driver page-locks the host memory and DMA-reads/writes it directly. This is the path DeckLink's LoopThroughWithOpenGLCompositing sample uses.
  • GL_AMD_bus_addressable_memory — true P2P. Allocate a buffer in visible GPU framebuffer (GL_BUS_ADDRESSABLE_MEMORY_AMD), call glMakeBuffersResidentAMD to retrieve a bus address that a third-party DMA engine (capture card, NIC) can write into directly. AJA's demos/AMD/SDICommon/GLTransferBuffers.cpp exercises this for direct P2P SDI capture/output.
  • GL_EXTERNAL_VIRTUAL_MEMORY_AMD / GL_EXTERNAL_PHYSICAL_MEMORY_AMD — older variants of the same idea; the bridge probes for them and exposes their presence so the consumer can pick the most- specific path that's present.

Mechanism: this is a pure GL-extension wrapper. It depends on a live GL context being current on the calling thread. It resolves entry points via Qt's QOpenGLContext::getProcAddress so there's no link-time dependency on libGL or libGLEW.

The bridge is owned by the GL backend of HostPinnedRing (and the planned AMD direct-P2P strategy); other backends — Vulkan, D3D11, Metal — won't instantiate it.

Go to the source code of this file.

Classes

struct  score::gfx::interop::AmdPinnedBuffers
 

Namespaces

namespace  score
 Base toolkit upon which the software is built.
 
namespace  score::gfx
 Graphics rendering pipeline for ossia score.
 
namespace  score::gfx::interop::amd_gl_tokens
 

Variables

constexpr unsigned int score::gfx::interop::amd_gl_tokens::EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD = 0x9160
 
constexpr unsigned int score::gfx::interop::amd_gl_tokens::BUS_ADDRESSABLE_MEMORY_AMD = 0x9168
 
constexpr unsigned int score::gfx::interop::amd_gl_tokens::EXTERNAL_VIRTUAL_MEMORY_AMD = 0x9161
 
constexpr unsigned int score::gfx::interop::amd_gl_tokens::EXTERNAL_PHYSICAL_MEMORY_AMD = 0x9162