fix(windows-drivers): emit OPM struct tags + D3DCOLORVALUE + shim UINT

DXGI resolved. Remaining iddcx type gaps: OPM typedefs need their _OPM_* struct
tags too (recursively(false) drops them), D3DCOLORVALUE (an OPM field), and UINT
(unsigned int — absent from crate::types, and allowlist_type does not emit bare
primitive aliases). Broaden to _?OPM_.* + _?D3DCOLORVALUE and raw_line the UINT
alias.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-24 14:40:25 +00:00
parent 1da518be13
commit 9018878a25
+8 -2
View File
@@ -375,8 +375,14 @@ fn generate_iddcx(out_path: &Path, config: &Config) -> Result<(), ConfigError> {
// missing), so this stays type-identical for the WDF surface.
.allowlist_type("DXGI_.*")
.allowlist_type("IDXGI.*")
.allowlist_type("OPM_.*")
.allowlist_type("UINT")
// 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);