refactor(host/W6.1): extract GPU vendor/adapter detection into the pf-gpu leaf crate

Fourth de-coupling for the host crate carve (plan §W6.1 leaf). gpu.rs (inventory,
selection preference, active-session accounting — deps only pf-host-config + pf-paths, no
subsystem refs) moves to a new pf-gpu leaf so pf-encode/pf-capture/pf-vdisplay can consult
the selected GPU without an orchestrator edge. ~50 crate::gpu:: sites repoint to pf_gpu::;
the ~30 pub(crate) items become pub (crate API). assign_ids gets a macOS-only
allow(dead_code) (used only by the Linux/Windows enumerate arms).

Verified: Linux (home-worker-5) clippy -p pf-gpu -p punktfunk-host --all-targets
-D warnings + pf-gpu tests (12 pass); Windows (192.168.1.158) clippy --features
nvenc,amf-qsv --all-targets green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-17 09:00:53 +02:00
parent 3495d189e1
commit 6ea036766a
12 changed files with 126 additions and 83 deletions
Generated
+15
View File
@@ -2808,6 +2808,20 @@ dependencies = [
"pkg-config",
]
[[package]]
name = "pf-gpu"
version = "0.12.0"
dependencies = [
"anyhow",
"pf-host-config",
"pf-paths",
"serde",
"serde_json",
"tempfile",
"tracing",
"windows 0.62.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pf-host-config"
version = "0.12.0"
@@ -3133,6 +3147,7 @@ dependencies = [
"opus",
"parking_lot",
"pf-driver-proto",
"pf-gpu",
"pf-host-config",
"pf-paths",
"pipewire",