Skip to content

feat: NVIDIA Linux accelerated OSR support#197

Merged
dsh0416 merged 9 commits into
mainfrom
dsh0416/improve-linux-vulkan
May 23, 2026
Merged

feat: NVIDIA Linux accelerated OSR support#197
dsh0416 merged 9 commits into
mainfrom
dsh0416/improve-linux-vulkan

Conversation

@dsh0416

@dsh0416 dsh0416 commented May 23, 2026

Copy link
Copy Markdown
Owner

Description

Fix Linux Vulkan accelerated OSR on NVIDIA proprietary drivers by addressing the full DMA-BUF import path: CEF Vulkan feature selection, required Vulkan extensions, DRM format modifier handling, memory allocation requirements, and external queue ownership transfer.

This makes the Linux Vulkan DMA-BUF path work more reliably on NVIDIA, while documenting the required nvidia-drm.modeset=1 kernel parameter.

Before this patch, the Linux OSR support has already been working on Intel and AMD GPUs.

Related Issues

Related to #4
Fixes #162

Changes Made

  • Enable CEF/ANGLE Vulkan features on Linux when Godot is using the Vulkan backend.
  • Request VK_EXT_image_drm_format_modifier and VK_EXT_queue_family_foreign through the Linux Vulkan hook.
  • Import DMA-BUF images with DRM modifier metadata, explicit plane layouts, and external image format probing.
  • Use per-image memory requirements and compatible FD memory type bits instead of a cached memory type/allocation size.
  • Add queue-family acquire/release barriers for externally owned DMA-BUF images.
  • Document the NVIDIA DRM modeset requirement.

Testing Performed

  • Ran cargo xtask bundle successfully on Linux.
  • Verified the NVIDIA DMA-BUF accelerated path with nvidia-drm.modeset=1 enabled.

Checklist

  • I tested my changes locally
  • I updated docs/tests if needed
  • CI passes (or I explained why it does not)

Copilot AI review requested due to automatic review settings May 23, 2026 16:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Linux Vulkan accelerated OSR reliability on NVIDIA proprietary drivers by completing the DMA-BUF import + synchronization path between CEF and Godot, and documenting the required nvidia-drm.modeset=1 configuration.

Changes:

  • Inject additional Vulkan device extensions on Linux needed for DRM modifier metadata and external/foreign queue ownership handling.
  • Update the Linux Vulkan DMA-BUF importer to include explicit plane layouts, image format probing, per-image memory requirements/type selection, and external ownership acquire/release barriers.
  • Enable CEF/ANGLE Vulkan feature selection on Linux when Godot is using Vulkan, and document the NVIDIA DRM modeset requirement.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
README.md Documents the NVIDIA nvidia-drm.modeset=1 requirement and links to the Vulkan support guide.
docs/api/vulkan-support.md Adds an NVIDIA driver requirement section with bootloader steps and verification command.
docs/zh_CN/api/vulkan-support.md Chinese translation of the NVIDIA driver requirement section with the same setup steps.
crates/gdcef/src/vulkan_hook/linux.rs Extends Linux Vulkan hook to request DRM modifier + queue family foreign extensions when supported.
crates/gdcef/src/accelerated_osr/windows/vulkan.rs Plumbs shared copy-context changes (memory requirements function pointer + external queue family field default).
crates/gdcef/src/accelerated_osr/vulkan_common.rs Adds external-queue acquire/release barriers for DMA-BUF-backed source images during copy submission.
crates/gdcef/src/accelerated_osr/linux/vulkan.rs Implements NVIDIA-focused DMA-BUF import robustness: modifier plane layouts, format probing, per-image memory requirements, and queue-submit locking.
crates/cef_app/src/lib.rs Enables Vulkan-related Chromium/ANGLE feature flags for Linux when the Godot backend is Vulkan.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/api/vulkan-support.md Outdated
Comment thread docs/zh_CN/api/vulkan-support.md Outdated
Comment thread crates/gdcef/src/accelerated_osr/linux/vulkan.rs Outdated
Comment thread crates/gdcef/src/accelerated_osr/linux/vulkan.rs
Comment thread crates/gdcef/src/accelerated_osr/linux/vulkan.rs Outdated
dsh0416 and others added 2 commits May 24, 2026 00:12
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dsh0416 dsh0416 merged commit 7f65c5e into main May 23, 2026
25 checks passed
@dsh0416 dsh0416 deleted the dsh0416/improve-linux-vulkan branch May 23, 2026 16:35
@dsh0416 dsh0416 changed the title feat: NVIDIA Linux OSR support feat: NVIDIA Linux accelerated OSR support May 23, 2026
@dsh0416 dsh0416 mentioned this pull request May 24, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: enable_accelerated_osr renders nothing

2 participants