mirror of
https://github.com/games-on-whales/gst-wayland-display.git
synced 2026-10-15 21:02:00 +00:00
[PR #20] [MERGED] [WIP] Producing CUDA buffers #23
Labels
No labels
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/gst-wayland-display#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/gst-wayland-display/pull/20
Author: @ABeltramo
Created: 10/2/2025
Status: ✅ Merged
Merged: 10/22/2025
Merged by: @ABeltramo
Base:
stable← Head:cuda-interop📝 Commits (10+)
6593619feat: added basic cuda and gst-cuda FFI bindings88ee6c7feat: DMA Buffer -> EGL -> CUDA6ba6efefeat: CUDA -> GstCudaStream -> GstBuffer75ec420fix: manually pass EGLDisplay from Smithay, removed dead codeef02a94lint: small refactor and cleanup76726c8feat: basicmemory:CUDAMemorycaps negotiationb2fdce2feat: CUDA cap exchanges and plugged together new GsCUDABuffere868786feat: load EGL extensions only once75e345cfeat: share the CUDA Context with the Gstreamer pipelinea3ee9aclint: cleanup and minor refactor📊 Changes
16 files changed (+1899 additions, -294 deletions)
View changed files
📝
Cargo.lock(+30 -22)📝
README.md(+32 -5)📝
gst-plugin-wayland-display/Cargo.toml(+2 -0)📝
gst-plugin-wayland-display/src/lib.rs(+9 -0)📝
gst-plugin-wayland-display/src/waylandsrc/imp.rs(+277 -18)📝
wayland-display-core/Cargo.toml(+8 -0)➕
wayland-display-core/build.rs(+25 -0)📝
wayland-display-core/src/comp/mod.rs(+25 -2)📝
wayland-display-core/src/comp/rendering.rs(+9 -4)📝
wayland-display-core/src/lib.rs(+5 -2)📝
wayland-display-core/src/tests/device.rs(+26 -19)➕
wayland-display-core/src/utils/allocator/cuda/ffi.rs(+513 -0)➕
wayland-display-core/src/utils/allocator/cuda/mod.rs(+562 -0)📝
wayland-display-core/src/utils/allocator/mod.rs(+253 -170)📝
wayland-display-core/src/utils/device/gpu.rs(+99 -52)📝
wayland-display-core/src/utils/video_info.rs(+24 -0)📄 Description
The idea here is that we'll directly produce and push
GSTCudaMemorybuffers, so that we can achieve something likeBasically embedding the whole
glupload ! cudauploadthat we need in order to import our DMA Buffers into CUDA. Ultimately, this should properly fix https://github.com/games-on-whales/wolf/pull/179#issuecomment-3058215348Current status
It works!
The code is a mess and performance is terrible, but I've been iterating over different things for so long that I just need to push something that actually works end to end at displaying a proper image.
We currently incur only in a single GPU->GPU copy when going from CUDA->Gstreamer. I'm not sure if that can be avoided, it feels that we are ultimately doing the same dance that Gstreamer does when importing GL Buffers into CUDA but I would like to dive a bit deeper there..
This change will also help with multi-GPU setups because we'll be in full control over which Nvidia GPU will be picked and used in the full pipeline.
TODO
render_nodeparam🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.