Skip to content

feat(linux/vulkan): enable RADV low-latency Vulkan Video encoding#4984

Merged
ReenigneArcher merged 1 commit intoLizardByte:masterfrom
neatnoise:radv-lowlatency-vulkan-video
Apr 13, 2026
Merged

feat(linux/vulkan): enable RADV low-latency Vulkan Video encoding#4984
ReenigneArcher merged 1 commit intoLizardByte:masterfrom
neatnoise:radv-lowlatency-vulkan-video

Conversation

@neatnoise
Copy link
Copy Markdown
Contributor

Description

Mesa RADV Vulkan driver has added a new low-latency Vulkan Video encode option (lowlatencyenc) for AMD VCN GPUs, merged to Mesa Git for the upcoming Mesa 26.1 release. This lowers video encoding latency at the cost of higher GPU power usage.

This PR appends lowlatencyenc to the existing RADV_PERFTEST environment variable, alongside the already-set video_encode flag. This enables low-latency Vulkan Video encoding by default on AMD GPUs using the RADV driver.

The RadeonSI/VA-API path already benefits from the existing AMD_DEBUG=lowlatencyenc that Sunshine sets.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@sonarqubecloud
Copy link
Copy Markdown

@ReenigneArcher ReenigneArcher added this to the vulkan milestone Apr 13, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Bundle Report

Changes will decrease total bundle size by 784.43kB (-49.96%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
rapideye-esm (removed) -784.43kB (-100.0%) ⬇️

@ReenigneArcher ReenigneArcher changed the title feat(linux/misc): enable RADV low-latency Vulkan Video encoding feat(linux/vulkan): enable RADV low-latency Vulkan Video encoding Apr 13, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.96%. Comparing base (5a41707) to head (354ca6f).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4984      +/-   ##
==========================================
- Coverage   17.99%   17.96%   -0.03%     
==========================================
  Files         108      108              
  Lines       23424    23424              
  Branches    10340    10340              
==========================================
- Hits         4216     4209       -7     
+ Misses      16242    14236    -2006     
- Partials     2966     4979    +2013     
Flag Coverage Δ
Archlinux 11.60% <0.00%> (ø)
FreeBSD-14.3-aarch64 ?
FreeBSD-14.3-amd64 13.59% <0.00%> (ø)
Homebrew-ubuntu-22.04 13.92% <100.00%> (ø)
Linux-AppImage 12.21% <100.00%> (ø)
Windows-AMD64 14.90% <ø> (ø)
Windows-ARM64 13.22% <ø> (-0.01%) ⬇️
macOS-arm64 19.02% <ø> (ø)
macOS-x86_64 18.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/linux/misc.cpp 15.60% <100.00%> (ø)

... and 51 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a41707...354ca6f. Read the comment docs.

@ReenigneArcher ReenigneArcher merged commit 43f973d into LizardByte:master Apr 13, 2026
73 checks passed
@gschintgen
Copy link
Copy Markdown
Contributor

Hi, out of curiosity: how does this interact with Sunshine's current Vulkan tuning options? Doesn't this force-override the user-chosen tuning setting?

See for example this discussion: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40524#note_3384466

(I did not actually test the new behaviour, I'm just wondering.)

Thanks for all your other recent work, it's appreciated!

@gschintgen
Copy link
Copy Markdown
Contributor

Here's the relevant code change on AMD's side: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40524/diffs?commit_id=c1722405d6ea0f5f1a8756683a83a3465771c842&file=46855871bcdc5640eb0b11b0acc8d8eca28398b3#46855871bcdc5640eb0b11b0acc8d8eca28398b3_1080_1080

If I'm reading that correctly the env variable is just an alternative to setting the tuning parameter (which Sunshine already does, AFAIK).

@neatnoise
Copy link
Copy Markdown
Contributor Author

neatnoise commented Apr 14, 2026

@gschintgen good spot. I added condition. Could you @ReenigneArcher please reopen the PR with latest neatnoise:radv-lowlatency-vulkan-video changes?

@ReenigneArcher
Copy link
Copy Markdown
Member

Merged PRs cannot be re-opened.

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.

3 participants