Expand description
Graphics-API interop (Runtime API).
Mirrors baracuda_driver::graphics
on the Runtime side. Runtime contexts are implicit, so register_*
doesn’t take a Context — it uses the current device’s primary
context.
For modern Vulkan / D3D12 flows, prefer
crate::external::ExternalMemory.
§Workflow
- Register the graphics resource (
gl::register_buffer,d3d11::register_resource, …) — returns aGraphicsResource. - Call
GraphicsResource::mapon a stream to hand it to CUDA. GraphicsResource::mapped_pointerorGraphicsResource::mapped_array→ usable device memory.- … compute …
GraphicsResource::unmapreleases it back to the graphics API.
Drop unregisters the resource automatically.
Modules§
- MapResource
Flags CUgraphicsMapResourceFlags— map-time access hints.- Register
Flags CUgraphicsRegisterFlags— shared register-time flags across GL / D3D / VDPAU / EGL.- d3d9
- Direct3D 9 interop (Windows).
- d3d10
- Direct3D 10 interop (Windows).
- d3d11
- Direct3D 11 interop (Windows) — the D3D path most still relevant today.
- egl
- EGL interop — Jetson camera / video pipelines via EGLImage + EGLStream.
- gl
- OpenGL interop.
- nvsci
- NvSci interop — query sync-object attributes CUDA expects from
NvSciSync signalers / waiters. Feed the resulting
NvSciSyncAttrListinto libnvsciSync’s reconcile + alloc, then import the resulting object viacrate::external::ExternalSemaphore::importwith theNvSciSynchandle type. - vdpau
- VDPAU interop (Linux video-decode pipelines).
Structs§
- Graphics
Resource - Runtime-side handle to a graphics-API resource. Drop unregisters it.