[PR #39] [CLOSED] feat(cuda): dmabuftocuda for Nvidia NV12 encode #40

Closed
opened 2026-10-15 12:47:47 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/gst-wayland-display/pull/39
Author: @JBailes
Created: 6/22/2026
Status: ❌ Closed

Base: feat/vulkan-encode ← Head: feat/nv12-dmabuftocuda


📝 Commits (1)

  • 8f77fdf feat(cuda): dmabuftocuda element for NV12 dmabuf to CUDA upload

📊 Changes

10 files changed (+715 additions, -18 deletions)

View changed files

📝 README.md (+15 -0)
📝 gst-plugin-wayland-display/Cargo.toml (+1 -1)
➕ gst-plugin-wayland-display/src/dmabuftocuda/imp.rs (+375 -0)
➕ gst-plugin-wayland-display/src/dmabuftocuda/mod.rs (+17 -0)
📝 gst-plugin-wayland-display/src/lib.rs (+4 -0)
📝 gst-plugin-wayland-display/src/waylandsrc/imp.rs (+28 -13)
📝 gst-plugin-wayland-display/tests/encode.rs (+21 -0)
📝 wayland-display-core/src/utils/allocator/cuda/mod.rs (+158 -1)
📝 wayland-display-core/src/utils/allocator/mod.rs (+86 -0)
📝 wayland-display-core/src/utils/renderer/mod.rs (+10 -3)

📄 Description

Nvidia path. Stacks on #37.

waylanddisplaysrc ! dmabuftocuda ! nvh265enc. Behind the cuda feature.

dmabuftocuda does the late NV12 dmabuf to CUDA upload for nvenc. EGLImage and CUDA registration cached per ring fd, so per frame is just the copy. Sink negotiates NV12 only, so the source can't fixate RGBA and panic. Also fixes the cuda feature wiring (broken on stable) and a context teardown double-unref. The new code is behind the cuda feature.

Tested to EOS, 20 frames:

  • Nvidia 5080, dmabuftocuda ! nvh265enc
  • AMD 7900 XTX and Intel UHD 770, VA encode still green

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/gst-wayland-display/pull/39 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 6/22/2026 **Status:** ❌ Closed **Base:** `feat/vulkan-encode` ← **Head:** `feat/nv12-dmabuftocuda` --- ### 📝 Commits (1) - [`8f77fdf`](https://github.com/games-on-whales/gst-wayland-display/commit/8f77fdf43b7b4b48ceae1114a4aacf0abbb3deaa) feat(cuda): dmabuftocuda element for NV12 dmabuf to CUDA upload ### 📊 Changes **10 files changed** (+715 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+15 -0) 📝 `gst-plugin-wayland-display/Cargo.toml` (+1 -1) ➕ `gst-plugin-wayland-display/src/dmabuftocuda/imp.rs` (+375 -0) ➕ `gst-plugin-wayland-display/src/dmabuftocuda/mod.rs` (+17 -0) 📝 `gst-plugin-wayland-display/src/lib.rs` (+4 -0) 📝 `gst-plugin-wayland-display/src/waylandsrc/imp.rs` (+28 -13) 📝 `gst-plugin-wayland-display/tests/encode.rs` (+21 -0) 📝 `wayland-display-core/src/utils/allocator/cuda/mod.rs` (+158 -1) 📝 `wayland-display-core/src/utils/allocator/mod.rs` (+86 -0) 📝 `wayland-display-core/src/utils/renderer/mod.rs` (+10 -3) </details> ### 📄 Description Nvidia path. Stacks on #37. waylanddisplaysrc ! dmabuftocuda ! nvh265enc. Behind the cuda feature. dmabuftocuda does the late NV12 dmabuf to CUDA upload for nvenc. EGLImage and CUDA registration cached per ring fd, so per frame is just the copy. Sink negotiates NV12 only, so the source can't fixate RGBA and panic. Also fixes the cuda feature wiring (broken on stable) and a context teardown double-unref. The new code is behind the cuda feature. Tested to EOS, 20 frames: - Nvidia 5080, dmabuftocuda ! nvh265enc - AMD 7900 XTX and Intel UHD 770, VA encode still green --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:47:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/gst-wayland-display#40
No description provided.