From 04e52b0c22b575a2ecbfcf941bac163d2fd0c3d7 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 24 Jun 2026 14:33:59 +0000 Subject: [PATCH] fix(windows-drivers): emit IddCx DXGI/OPM/UINT types locally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The iddcx bindgen now SUCCEEDS (C++ fix). Generated module had 38 unresolved-type errors — a bounded set wdk-sys does not bindgen: UINT, DXGI_FORMAT, DXGI_COLOR_SPACE_TYPE, IDXGIDevice/Resource, 6 OPM_* types. No WDF type is missing, so the crate::types sharing (type-identity) holds. Allowlist those families so they emit locally in iddcx.rs (non-conflicting — absent from crate::types), keeping allowlist_recursively(false). Co-Authored-By: Claude Opus 4.8 (1M context) --- packaging/windows/drivers/vendor/wdk-sys/build.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packaging/windows/drivers/vendor/wdk-sys/build.rs b/packaging/windows/drivers/vendor/wdk-sys/build.rs index 48aebba..b4defa1 100644 --- a/packaging/windows/drivers/vendor/wdk-sys/build.rs +++ b/packaging/windows/drivers/vendor/wdk-sys/build.rs @@ -369,6 +369,14 @@ fn generate_iddcx(out_path: &Path, config: &Config) -> Result<(), ConfigError> { .allowlist_recursively(false) .header_contents("iddcx-input.h", &header_contents) .allowlist_file("(?i).*iddcx.*") + // IddCx structs reference DXGI + OPM (output-protection) types and the `UINT` primitive that + // wdk-sys does NOT bindgen. Emit those locally (non-conflicting — they're absent from + // crate::types). WDF/GUID/ULONG types it shares DO resolve from crate::types (no WDF type is + // missing), so this stays type-identical for the WDF surface. + .allowlist_type("DXGI_.*") + .allowlist_type("IDXGI.*") + .allowlist_type("OPM_.*") + .allowlist_type("UINT") }; trace!(bindgen_builder = ?bindgen_builder);