fix(windows-drivers): DXGI enum-modules + define UINT in iddcx module
apple / swift (push) Failing after 1s
apple / screenshots (push) Has been skipped
windows-drivers / probe-and-proto (push) Successful in 19s
windows-drivers / driver-build (push) Failing after 57s
windows-host / package (push) Successful in 5m15s
ci / rust (push) Successful in 1m18s
android / android (push) Successful in 3m21s
ci / web (push) Successful in 38s
ci / docs-site (push) Successful in 52s
deb / build-publish (push) Successful in 3m19s
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 6s
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 3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 3s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
ci / bench (push) Successful in 4m53s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m55s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m52s
docker / deploy-docs (push) Has been cancelled

Last iddcx type gaps: (1) DXGI enum newtypes are `pub use self::_DXGI_X::Type as
DXGI_X` — the `_DXGI_X` module needs allowlisting too (broaden DXGI_.* to
_?DXGI_.*, matching the OPM fix); (2) UINT bindgen raw_line landed in a scope the
bindings cannot see — define `pub type UINT` directly in src/iddcx.rs next to
`use crate::types::*` instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-24 14:49:11 +00:00
parent f34e956818
commit c6a818e985
2 changed files with 5 additions and 4 deletions
+1 -4
View File
@@ -373,16 +373,13 @@ fn generate_iddcx(out_path: &Path, config: &Config) -> Result<(), ConfigError> {
// 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("_?DXGI_.*")
.allowlist_type("IDXGI.*")
// OPM types are `typedef struct _OPM_X {..} OPM_X` — allowlist BOTH the tag and the typedef
// (allowlist_recursively(false) won't pull the tag in from the typedef). Plus D3DCOLORVALUE,
// referenced by an OPM struct.
.allowlist_type("_?OPM_.*")
.allowlist_type("_?D3DCOLORVALUE")
// `UINT` is `unsigned int`; wdk-sys never references it so it's absent from crate::types and
// allowlist_type won't emit a bare primitive alias. Shim it (unambiguous on Windows).
.raw_line("pub type UINT = ::core::ffi::c_uint;")
};
trace!(bindgen_builder = ?bindgen_builder);
+4
View File
@@ -26,6 +26,10 @@ mod bindings {
)]
use crate::types::*;
// `UINT` (= unsigned int) is referenced by IddCx/DXGI/OPM structs but wdk-sys never uses it, so it
// is absent from crate::types. Define it here, in the same scope the generated bindings see.
pub type UINT = ::core::ffi::c_uint;
include!(concat!(env!("OUT_DIR"), "/iddcx.rs"));
}
#[allow(