[PR #35] [CLOSED] NV12 in compositor + late dmabuf→CUDA #38

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/35
Author: @JBailes
Created: 6/18/2026
Status: ❌ Closed

Base: feat/await-listener ← Head: feat/nv12-output


📝 Commits (10+)

  • 7bbf357 feat(waylandsrc): add opt-in nv12 property (scaffold)
  • dc5fb05 feat(core): GLES RGB->NV12 conversion (Nv12Target)
  • 816ea4b feat(core): wire NV12 output into the frame path
  • 99f65b9 feat(waylandsrc): advertise NV12 DMABuf when nv12 is enabled
  • 1095007 fix(core): RGB->NV12 conversion via raw GLES2 (unblocks radv)
  • 62648c1 feat: per-GPU NV12 modifier (LINEAR/AMD, i915 Y-tiled/Intel)
  • 50456dc feat(nv12): unify RGB->NV12 converter across Intel/AMD/Nvidia
  • f96d0b6 fix(nv12): allocate only render-capable plane modifiers
  • 9bd4742 feat(cuda): late NV12 dmabuf->CUDA conversion
  • a493139 feat(cuda): dmabuftocuda element for late NV12 dmabuf->CUDA upload

📊 Changes

13 files changed (+1422 additions, -29 deletions)

View changed files

➕ .github/workflows/rust-test.yml (+43 -0)
📝 gst-plugin-wayland-display/Cargo.toml (+1 -1)
➕ gst-plugin-wayland-display/src/dmabuftocuda/imp.rs (+314 -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 (+300 -20)
📝 wayland-display-core/build.rs (+0 -2)
📝 wayland-display-core/src/comp/mod.rs (+15 -3)
📝 wayland-display-core/src/utils/allocator/cuda/mod.rs (+117 -0)
📝 wayland-display-core/src/utils/allocator/mod.rs (+91 -0)
📝 wayland-display-core/src/utils/mod.rs (+1 -0)
➕ wayland-display-core/src/utils/nv12.rs (+509 -0)
📝 wayland-display-core/src/utils/renderer/mod.rs (+10 -3)

📄 Description

Closes #7. Stacks on #34.

Compositor does RGB→NV12 itself and outputs an encoder-ready NV12 DMABuf. Drops the downstream converter.

Same DMABuf path on all three vendors. Both planes R8 -> UV interleaves Cb/Cr by gl_FragCoord parity (Nvidia has no GR88 render modifier). Planes allocated with the GPU's own render modifier. Extends to P010 for 10-bit/HDR.

dmabuftocuda (cuda feature): imports the NV12 DMABuf to CUDAMemory via EGLImage, late, at the encoder. No glupload.

Tested, 720p, live client:

  • Intel nv12 ! vapostproc ! vah265enc — 270/270
  • AMD nv12 ! vapostproc ! vah265enc — 269/269
  • Nvidia nv12 ! dmabuftocuda ! nvh265enc — 270/270

Known: non-fatal g_object_unref(G_IS_OBJECT) warning at teardown, in gstreamer's element-context-cache. Chasing.


🔄 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/35 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 6/18/2026 **Status:** ❌ Closed **Base:** `feat/await-listener` ← **Head:** `feat/nv12-output` --- ### 📝 Commits (10+) - [`7bbf357`](https://github.com/games-on-whales/gst-wayland-display/commit/7bbf3572269e382000409ce077809abf7206909c) feat(waylandsrc): add opt-in nv12 property (scaffold) - [`dc5fb05`](https://github.com/games-on-whales/gst-wayland-display/commit/dc5fb0537ac862128618798d2a276764fa35c787) feat(core): GLES RGB->NV12 conversion (Nv12Target) - [`816ea4b`](https://github.com/games-on-whales/gst-wayland-display/commit/816ea4b31e908489f8467234f06a28830b9e746d) feat(core): wire NV12 output into the frame path - [`99f65b9`](https://github.com/games-on-whales/gst-wayland-display/commit/99f65b9aea84af51a8bd2700ccf0050878853333) feat(waylandsrc): advertise NV12 DMABuf when nv12 is enabled - [`1095007`](https://github.com/games-on-whales/gst-wayland-display/commit/109500709641dae1d5039d19f22efc3ecf33feec) fix(core): RGB->NV12 conversion via raw GLES2 (unblocks radv) - [`62648c1`](https://github.com/games-on-whales/gst-wayland-display/commit/62648c1473b2f55d120374544e353ddc429ad4b9) feat: per-GPU NV12 modifier (LINEAR/AMD, i915 Y-tiled/Intel) - [`50456dc`](https://github.com/games-on-whales/gst-wayland-display/commit/50456dc2b5d31b02f6d86af35ee8ba07577656ad) feat(nv12): unify RGB->NV12 converter across Intel/AMD/Nvidia - [`f96d0b6`](https://github.com/games-on-whales/gst-wayland-display/commit/f96d0b64fc173d8d661979189ee97cf173f06202) fix(nv12): allocate only render-capable plane modifiers - [`9bd4742`](https://github.com/games-on-whales/gst-wayland-display/commit/9bd47425a641f798671b58fe66800f49ad0fb03a) feat(cuda): late NV12 dmabuf->CUDA conversion - [`a493139`](https://github.com/games-on-whales/gst-wayland-display/commit/a493139fd34af8f9138e4d45cd109e308a9746fb) feat(cuda): dmabuftocuda element for late NV12 dmabuf->CUDA upload ### 📊 Changes **13 files changed** (+1422 additions, -29 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/rust-test.yml` (+43 -0) 📝 `gst-plugin-wayland-display/Cargo.toml` (+1 -1) ➕ `gst-plugin-wayland-display/src/dmabuftocuda/imp.rs` (+314 -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` (+300 -20) 📝 `wayland-display-core/build.rs` (+0 -2) 📝 `wayland-display-core/src/comp/mod.rs` (+15 -3) 📝 `wayland-display-core/src/utils/allocator/cuda/mod.rs` (+117 -0) 📝 `wayland-display-core/src/utils/allocator/mod.rs` (+91 -0) 📝 `wayland-display-core/src/utils/mod.rs` (+1 -0) ➕ `wayland-display-core/src/utils/nv12.rs` (+509 -0) 📝 `wayland-display-core/src/utils/renderer/mod.rs` (+10 -3) </details> ### 📄 Description Closes #7. Stacks on #34. Compositor does RGB→NV12 itself and outputs an encoder-ready NV12 DMABuf. Drops the downstream converter. Same DMABuf path on all three vendors. Both planes R8 -> UV interleaves Cb/Cr by `gl_FragCoord` parity (Nvidia has no GR88 render modifier). Planes allocated with the GPU's own render modifier. Extends to P010 for 10-bit/HDR. `dmabuftocuda` (cuda feature): imports the NV12 DMABuf to CUDAMemory via EGLImage, late, at the encoder. No glupload. Tested, 720p, live client: - Intel `nv12 ! vapostproc ! vah265enc` — 270/270 - AMD `nv12 ! vapostproc ! vah265enc` — 269/269 - Nvidia `nv12 ! dmabuftocuda ! nvh265enc` — 270/270 Known: non-fatal `g_object_unref(G_IS_OBJECT)` warning at teardown, in gstreamer's element-context-cache. Chasing. --- <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#38
No description provided.