fix(windows-drivers): wstr! const->static (latent dangling .as_ptr) + record adapter-init ruleouts
apple / screenshots (push) Has been skipped
apple / swift (push) Failing after 1s
windows-drivers / probe-and-proto (push) Successful in 18s
windows-drivers / driver-build (push) Successful in 1m5s
windows-host / package (push) Successful in 5m12s
android / android (push) Successful in 4m11s
ci / web (push) Successful in 41s
ci / rust (push) Successful in 4m26s
deb / build-publish (push) Successful in 2m16s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 5s
ci / docs-site (push) Successful in 52s
decky / build-publish (push) Successful in 12s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
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 3s
ci / bench (push) Successful in 4m44s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m32s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m17s
docker / deploy-docs (push) Successful in 5s
apple / screenshots (push) Has been skipped
apple / swift (push) Failing after 1s
windows-drivers / probe-and-proto (push) Successful in 18s
windows-drivers / driver-build (push) Successful in 1m5s
windows-host / package (push) Successful in 5m12s
android / android (push) Successful in 4m11s
ci / web (push) Successful in 41s
ci / rust (push) Successful in 4m26s
deb / build-publish (push) Successful in 2m16s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 5s
ci / docs-site (push) Successful in 52s
decky / build-publish (push) Successful in 12s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
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 3s
ci / bench (push) Successful in 4m44s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m32s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m17s
docker / deploy-docs (push) Successful in 5s
wstr! used `const W; W.as_ptr()` which points to a temporary dropped at the end of the statement (dangling) — fixed to `static W` (stable address). On-glass it did NOT change the IddCxAdapterInitAsync INVALID_PARAMETER, and a minimal SDR adapter (Flags=NONE + required callbacks only) fails identically, so the caps content + callbacks are NOT the blocker (offsets are byte-perfect vs C; sizes match the framework table; dispatch + device are correct). Config restored to FP16 + full HDR callbacks. Remaining suspects: IDARG_IN_ADAPTER_INIT layout, the missing DeviceContext (oracle always sets one), or a box/framework regression. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,10 @@ use crate::STATUS_SUCCESS;
|
||||
macro_rules! wstr {
|
||||
($s:literal) => {{
|
||||
const N: usize = $s.len() + 1;
|
||||
const W: [u16; N] = {
|
||||
// `static` (NOT `const`) — a const's `.as_ptr()` points to a temporary dropped at the end of the
|
||||
// statement (a dangling pointer); IddCx then reads garbage for the endpoint name strings and
|
||||
// IddCxAdapterInitAsync fails INVALID_PARAMETER. A `static` has a stable 'static address.
|
||||
static W: [u16; N] = {
|
||||
let b = $s.as_bytes();
|
||||
let mut w = [0u16; N];
|
||||
let mut i = 0;
|
||||
@@ -104,9 +107,9 @@ pub fn init_adapter(device: WDFDEVICE) -> NTSTATUS {
|
||||
|
||||
let mut caps: iddcx::IDDCX_ADAPTER_CAPS = unsafe { core::mem::zeroed() };
|
||||
caps.Size = caps_size;
|
||||
// CAN_PROCESS_FP16 must be CONSISTENT with the config's callbacks: the config registers the *2 / gamma
|
||||
// / set-default-hdr-metadata callbacks (FP16-obligated), so the adapter MUST advertise FP16 or the
|
||||
// framework rejects the mismatch at IddCxAdapterInitAsync. The oracle sets both.
|
||||
// FP16 (HDR) — consistent with the config's *2/gamma/hdr callbacks. NOTE: a minimal SDR adapter
|
||||
// (Flags=NONE + only the required callbacks) ALSO fails IddCxAdapterInitAsync identically, so the
|
||||
// FP16/*2/HDR set is NOT the blocker (see windows-pfvd-onglass-load memory).
|
||||
caps.Flags = iddcx::IDDCX_ADAPTER_FLAGS::IDDCX_ADAPTER_FLAGS_CAN_PROCESS_FP16;
|
||||
caps.MaxMonitorsSupported = 16;
|
||||
caps.EndPointDiagnostics = diag;
|
||||
|
||||
Reference in New Issue
Block a user