d8a453f6ca
apple / swift (push) Failing after 1s
apple / screenshots (push) Has been skipped
windows-drivers / probe-and-proto (push) Successful in 18s
ci / rust (push) Successful in 1m14s
windows-drivers / driver-build (push) Successful in 1m11s
ci / web (push) Successful in 41s
ci / docs-site (push) Successful in 1m1s
android / android (push) Successful in 3m22s
deb / build-publish (push) Successful in 2m37s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 4s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 6s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 5s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
windows-host / package (push) Successful in 5m52s
ci / bench (push) Successful in 4m47s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m28s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m18s
docker / deploy-docs (push) Successful in 17s
The pf-vdisplay driver now consumes the OS swap-chain so a virtual monitor is a usable display rather than a stalled one. Compiles + loads on-glass (no regression: adapter still inits, Status=OK); adversarially reviewed — no blockers, the leak/deadlock invariants preserved. - new swap_chain_processor.rs: a worker thread (MMCSS "Distribution") that binds the render D3D device (IddCxSwapChainSetDevice, single-borrow 60x@50ms retry) then drains the swap-chain (ReleaseAndAcquireBuffer2 -> FinishedProcessingFrame; E_PENDING waits 16ms on the surface event). NO frame publisher yet (STEP 6). RAII terminate+join Drop; the load-bearing top-of-loop terminate check (the oracle's reconnect-leak fix). Fixed a Rust-2021 disjoint- capture bug: `.0` field access bypassed the Sendable Send wrapper -> rebind the whole wrappers. - new direct_3d_device.rs: CreateDXGIFactory2 -> EnumAdapterByLuid(render LUID) -> D3D11CreateDevice; a DEVICE_POOL of one Arc<Direct3DDevice> per render LUID (the NVIDIA-UMD-worker-thread leak fix). - monitor.rs: MonitorObject gains swap_chain_processor; set/take helpers return it for the caller to drop OUTSIDE the MONITOR_MODES lock (dropping joins the worker — must never happen under the lock); remove_monitor/clear_all drop it before IddCxMonitorDeparture. - callbacks.rs: assign_swap_chain spawns the processor (pooled device per RenderAdapterLuid; WdfObjectDelete on D3D-init failure so the OS retries); unassign_swap_chain drops it. Fixed the stale `panic = "abort"` doc (workspace is unwind; the extern "C" boundary aborts on unwind). - Cargo.toml: windows 0.58 + thiserror (both already resolved in the driver lock). The 3 needed swap-chain DDIs were already wrapped in wdk-iddcx; their HRESULT-shaped NTSTATUS is classified by hand (hr>=0 success, 0x8000000A E_PENDING). - Also rustfmt'd the whole driver workspace (it had never been driver-fmt'd). Built via the ultracode flow: STEP-5 map workflow -> agent-implement -> box build (caught the Send-capture bug) -> adversarial-verify-agent -> deploy (loads). Session-1 on-glass validation (the drain loop servicing an ACTIVE monitor) is the next gate — assign_swap_chain only fires under an interactive session. Note for STEP 6: target_id_for_object uses the MONITOR_MODES handle lookup the oracle moved to a WDF context; revisit before target_id keys the shared frame ring. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
55 lines
2.3 KiB
Rust
55 lines
2.3 KiB
Rust
//! WDK link flags for the cdylib (wdk-build) + `IddCxStub` (the driver calls IddCx DDIs via wdk-iddcx,
|
|
//! and exports `IddMinimumVersionRequired`). `/INTEGRITYCHECK` (set by wdk-build) is cleared by the CI
|
|
//! packaging step. Glob recipe matches wdk-probe/build.rs.
|
|
fn main() -> Result<(), wdk_build::ConfigError> {
|
|
wdk_build::configure_wdk_binary_build()?;
|
|
link_iddcx_stub();
|
|
Ok(())
|
|
}
|
|
|
|
/// Link `IddCxStub.lib`. It ships under `Lib\<sdkver>\um\<arch>\iddcx\<iddcxver>\`, and the iddcx versions
|
|
/// are NOT interchangeable: the stub's `IddFunctions` dispatch table must match the running framework
|
|
/// (linking the `1.0` stub made even IddCxDeviceInitConfig fail; the box framework is 1.10, and upstream
|
|
/// virtual-display-rs pins 1.10). So pick the HIGHEST `iddcx\<X.Y>` dir that has the lib (version-aware,
|
|
/// since "1.10" < "1.2" lexically). x64 only.
|
|
fn link_iddcx_stub() {
|
|
const ARCH: &str = "x64";
|
|
const ROOTS: [&str; 2] = [
|
|
r"C:\Program Files (x86)\Windows Kits\10\Lib",
|
|
r"C:\Program Files\Windows Kits\10\Lib",
|
|
];
|
|
let mut best: Option<((u32, u32), std::path::PathBuf)> = None;
|
|
for root in ROOTS {
|
|
let Ok(versions) = std::fs::read_dir(root) else {
|
|
continue;
|
|
};
|
|
for ver in versions.flatten() {
|
|
let iddcx = ver.path().join("um").join(ARCH).join("iddcx");
|
|
let Ok(subdirs) = std::fs::read_dir(&iddcx) else {
|
|
continue;
|
|
};
|
|
for sub in subdirs.flatten() {
|
|
if !sub.path().join("IddCxStub.lib").is_file() {
|
|
continue;
|
|
}
|
|
let name = sub.file_name().to_string_lossy().into_owned();
|
|
let mut parts = name.split('.');
|
|
let v = (
|
|
parts.next().and_then(|x| x.parse().ok()).unwrap_or(0u32),
|
|
parts.next().and_then(|x| x.parse().ok()).unwrap_or(0u32),
|
|
);
|
|
if best.as_ref().is_none_or(|(bv, _)| v > *bv) {
|
|
best = Some((v, sub.path()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let Some((_, dir)) = best else {
|
|
panic!(
|
|
"IddCxStub.lib not found under any Windows Kits Lib\\<ver>\\um\\{ARCH}\\iddcx\\<iddcxver>\\"
|
|
);
|
|
};
|
|
println!("cargo:rustc-link-search={}", dir.display());
|
|
println!("cargo:rustc-link-lib=static=IddCxStub");
|
|
}
|