docs(windows-rewrite): M1 IddCx make-or-break RESOLVED (the 6 working knobs)
apple / swift (push) Failing after 1s
apple / screenshots (push) Has been skipped
ci / web (push) Successful in 48s
android / android (push) Successful in 3m16s
ci / docs-site (push) Successful in 54s
ci / bench (push) Successful in 4m53s
ci / rust (push) Successful in 1m20s
decky / build-publish (push) Successful in 24s
deb / build-publish (push) Successful in 7m19s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 2m45s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 31s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 2m17s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 2m56s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 46s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m56s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m55s
docker / deploy-docs (push) Has been cancelled
apple / swift (push) Failing after 1s
apple / screenshots (push) Has been skipped
ci / web (push) Successful in 48s
android / android (push) Successful in 3m16s
ci / docs-site (push) Successful in 54s
ci / bench (push) Successful in 4m53s
ci / rust (push) Successful in 1m20s
decky / build-publish (push) Successful in 24s
deb / build-publish (push) Successful in 7m19s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 2m45s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 31s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 2m17s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 2m56s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 46s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m56s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m55s
docker / deploy-docs (push) Has been cancelled
CI-green @ 6d8c7a5 (run 5548): IddCx bindgens + compiles in wdk-sys with WDF
type-identity. Record the exact generate_iddcx recipe (c++ parse, IDD_STUB,
allowlist_recursively(false), DXGI/OPM/D3D local emit, UINT alias,
translate_enum_integer_types) and that the wdf-umdf fallback is unneeded.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -665,18 +665,39 @@ versioned-subpath subsets exactly.
|
|||||||
iddcx — glob, don't trust max) + `static=IddCxStub`; hand-declare `#[no_mangle] pub static
|
iddcx — glob, don't trust max) + `static=IddCxStub`; hand-declare `#[no_mangle] pub static
|
||||||
IddMinimumVersionRequired: ULONG = 4;`; keep the FORCE_INTEGRITY clear.
|
IddMinimumVersionRequired: ULONG = 4;`; keep the FORCE_INTEGRITY clear.
|
||||||
|
|
||||||
**Make-or-break (the spike to run FIRST):** can `IddCx.h` bindgen in wdk-sys's config without a header
|
**Make-or-break — RESOLVED ✅ (CI-green @ `6d8c7a5`, run 5548, no fallback).** `IddCx.h` bindgens AND the
|
||||||
conflict? (upstream #514/#516; clean-fix PR #654 is **unmerged**.) Validate by adding the subset + an
|
generated module compiles inside wdk-sys with WDF **type-identity**; the #515/#516 header conflict NEVER
|
||||||
`iddcx-probe` that calls `IddCxDeviceInitConfig`/`IddCxDeviceInitialize`/`IddCxAdapterInitAsync` →
|
materialized. Vendored the **published windows-drivers-rs 0.5.1** crates (wdk-build + wdk-sys) under
|
||||||
**CI gate**: cdylib compiles + links IddCxStub. **On-glass gate (RTX box)**: self-signed driver loads +
|
`packaging/windows/drivers/vendor/`, `[patch.crates-io]`'d. The six knobs `generate_iddcx` actually
|
||||||
the IddCx adapter initializes (runtime table/struct-index correctness only surfaces here). Possible gotcha:
|
needed (each a real gotcha, all CI-proven; the recipe above was close but the codegen/scope details
|
||||||
IddCx.h may need an `IDD_STUB` preprocessor define to emit the table model (the oracle's wrapper.h set it).
|
differed):
|
||||||
|
|
||||||
**Fallback** if the bindgen header-conflict can't be resolved: keep the proven vendored unified
|
1. **`--language=c++`** — `wdk_default` parses **C**; IddCx.h's `IDARG_*` typedefs need C++ or you get a
|
||||||
`wdf-umdf-sys` as a second `-sys` crate for `pf-vdisplay` only (a second stack, contra Decision C, but
|
"must use 'struct' tag" cascade (verified by direct `clang` on the box: 0 errors as C++, fails as C).
|
||||||
already green + on-glass-proven) and track upstream #654. **Reject** Option 2 (standalone `iddcx-sys` +
|
2. **`-DIDD_STUB`** — table-dispatch mode; skips `IddCxFuncEnum.h`'s `#error IDDCX_VERSION_MAJOR is not
|
||||||
`use wdk_sys::*` + giant WDF/DXGI blocklist) — version-fragile, structs embed WDF/DXGI by value.
|
defined` (it lives inside `#ifndef IDD_STUB`). **Do NOT add `WDF_STUB`** — wdk-sys parses `wdf.h`
|
||||||
|
non-stubbed, and stubbing it only here would desync the shared WDF types (breaking type-identity).
|
||||||
|
3. **`allowlist_recursively(false)` + `allowlist_file("(?i).*iddcx.*")`, full codegen (no
|
||||||
|
`.complement()`)** — emit ONLY IddCx items; WDF/Win types resolve to wdk-sys's via
|
||||||
|
`use crate::types::*` in `src/iddcx.rs`. No giant blocklist (Option 2 avoided).
|
||||||
|
4. **`allowlist_type("_?DXGI_.*" / "IDXGI.*" / "_?OPM_.*" / "_?D3DCOLORVALUE")`** — emit the non-WDF types
|
||||||
|
wdk-sys doesn't bindgen, locally (absent from `crate::types`, so non-conflicting). The `_?` is
|
||||||
|
load-bearing: `typedef struct _OPM_X {} OPM_X` needs the tag AND the alias (recursively(false) won't
|
||||||
|
pull the tag from the typedef).
|
||||||
|
5. **`pub type UINT = ::core::ffi::c_uint;` in `src/iddcx.rs`** — `UINT` (unsigned int) is absent from
|
||||||
|
`crate::types`; covers the top-level struct-field uses.
|
||||||
|
6. **`translate_enum_integer_types(true)`** — C++ parsing kept `UINT` as the underlying repr of the
|
||||||
|
DXGI/OPM ModuleConsts enums (`pub mod _X { pub type Type = UINT; }`), and nested modules can't see the
|
||||||
|
parent `UINT`. This emits native `u32` reprs → self-contained enum modules.
|
||||||
|
|
||||||
Only after the spike passes: port the full ~30-DDI / ~40-struct surface (incl. the HDR `*2` DDIs) + the
|
The wrapper note still holds: table dispatch via `wdk_sys::iddcx::_IDDFUNCENUM::<Name>TableIndex as usize`
|
||||||
|
(ModuleConsts const, **not** the oracle's NewType `.0`); NTSTATUS = plain `i32` (`wdk_sys::NT_SUCCESS`).
|
||||||
|
Driver build.rs will add the IddCxStub link-search + `IddMinimumVersionRequired` + keep the
|
||||||
|
FORCE_INTEGRITY clear. **Option 2 stays rejected; the `wdf-umdf-sys` fallback is unneeded.**
|
||||||
|
|
||||||
|
**NEXT (M1 cont.):** port the full ~30-DDI / ~40-struct surface (incl. the HDR `*2` DDIs) + the
|
||||||
swap-chain processor + frame transport, with the clean ownership model (DeviceContext-owned state,
|
swap-chain processor + frame transport, with the clean ownership model (DeviceContext-owned state,
|
||||||
`EvtCleanupCallback` on `MonitorContext`, single `Monitor` identity, the owned `pf-vdisplay-proto` plane).
|
`EvtCleanupCallback` on `MonitorContext`, single `Monitor` identity, the owned `pf-vdisplay-proto` plane).
|
||||||
|
First gate: a probe linking `IddCxStub` and calling `IddCxDeviceInitConfig`/`…Initialize`/
|
||||||
|
`…AdapterInitAsync` (CI = compile+link). On-glass load + IDD-push stream needs the RTX box (ephemeral —
|
||||||
|
currently down/Proxmox).
|
||||||
|
|||||||
Reference in New Issue
Block a user