Skip to content

bindgen: blocklist AMX tile types on MinGW - #142

Open
serpilliere wants to merge 1 commit into
zmwangx:masterfrom
serpilliere:fix_tile1024i
Open

serpilliere wants to merge 1 commit into
zmwangx:masterfrom
serpilliere:fix_tile1024i

Conversation

@serpilliere

Copy link
Copy Markdown

Fixes #138

On x86_64-pc-windows-gnu, hwcontext_wrapper.h includes mingw-w64's WIDL-generated d3d11.h, which pulls in windows.h -> x86intrin.h before its include guard, and thus clang's amxintrin.h. Its __tile1024i_str struct has a 64-byte-aligned member that bindgen emits as both packed and aligned, so the generated bindings fail to compile (E0587/E0080).

FFmpeg never uses AMX types and the AMX intrinsics are already hidden by blocklist_function("_.*"), so blocklisting the types is a no-op on targets that don't see them (MSVC, i686, non-x86).

Patch assisted by Claude

Fixes zmwangx#138

On x86_64-pc-windows-gnu, hwcontext_wrapper.h includes mingw-w64's
WIDL-generated d3d11.h, which pulls in windows.h -> x86intrin.h before
its include guard, and thus clang's amxintrin.h. Its __tile1024i_str
struct has a 64-byte-aligned member that bindgen emits as both packed
and aligned, so the generated bindings fail to compile (E0587/E0080).

FFmpeg never uses AMX types and the AMX intrinsics are already hidden
by blocklist_function("_.*"), so blocklisting the types is a no-op on
targets that don't see them (MSVC, i686, non-x86).

Patch assisted by Claude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9.x: bindings fail to compile for x86_64-pc-windows-gnu: the D3D11VA block in hwcontext_wrapper.h pulls in clang's AMX intrinsics

1 participant