Skip to content

streamer(vulkan): prioritize capable dGPUs and fix AppImage GLib clash - #992

Merged
capy-ai[bot] merged 2 commits into
devfrom
merge/pr-989-hybrid-gpu-vulkan
Sep 19, 2026
Merged

capy-ai[bot] merged 2 commits into
devfrom
merge/pr-989-hybrid-gpu-vulkan

Conversation

@zortos293

Copy link
Copy Markdown
Collaborator

Merges #989 (by @quadsteel) with CI fixes applied on top. The original commit is preserved verbatim with authorship intact as 68dc0b16; the follow-up commit addresses the review findings.

Original change (quadsteel): intelligent Vulkan device selection and scoring that prioritizes capable discrete GPUs on hybrid systems, clean vkDeviceWaitIdle teardown for Wayland surfaces, and AppImage GLib/GObject host exclusion to fix driver symbol collisions. Full rationale and hardware verification are in #989.

Fixes applied on top:

  • Isolate device-scoring preferences from process env vars. Scoring now takes an explicit VulkanDevicePreferences value with a thin from_env wrapper, so the unit tests exercise a pure function instead of mutating process-wide env state. The original tests flaked ~60% of runs when cargo scheduled the two scoring tests on parallel threads.
  • cargo fmt the touched package (CI Check Rust formatting failed on linux-x64 and macos-arm64).
  • Clear the clippy::unnecessary_sort_by lint in both ranking call sites.
  • Drop a redundant unsafe block around the safe FFmpeg options builder and replace a CString::unwrap with a graceful fallback to default device selection.

Validation:

  • cargo test --workspace (streamer): all suites green, scoring tests stable across repeated runs.
  • cargo clippy -p opennow-streamer-platform-linux --all-targets: clean.
  • cargo fmt --all --check (streamer + core): clean.
  • test_ci_workflow.py + test_bundled_deb.py: 23 passed.

Closes #989 (superseded; will close that PR once this merges).

Open in Capy

quadsteel and others added 2 commits September 19, 2026 17:53
- Filter and score Vulkan physical devices based on video decode queue
  isolation and PRIME offload variables instead of indexing device 0.
- Fall through to alternative physical devices when queue isolation fails.
- Exclude host GLib and GObject binaries from the AppImage packaging pipeline
  to resolve host VA-API driver dlopen symbol clashes.
- Ensure proper sync object drain before Vulkan teardown under Wayland.
Score computation now takes an explicit VulkanDevicePreferences value, with
a thin from_env wrapper preserving the OPENNOW_VK_* / PRIME behavior. The
unit tests exercise the pure function directly, so they no longer mutate
process-wide env vars and cannot flake when cargo runs them in parallel.

Also addresses review nits: sort_by_key, drop the redundant unsafe around
the safe options builder, and fall back to default device selection if the
index string ever fails CString conversion instead of unwrapping.
@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2e60b173-30a5-4bbc-9763-37bfb94ac46b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@capy-ai
capy-ai Bot merged commit 09fef49 into dev Sep 19, 2026
14 checks passed
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.

1 participant