mirror of
https://github.com/utmapp/dxmt.git
synced 2026-12-01 07:53:21 -10:00
The native build defined STDMETHODCALLTYPE, __stdcall and WINAPI as empty, so on x86_64 macOS every D3D entry point and COM method used the System V convention. Embedders built against the Windows ABI (virglrenderer's Neptune backend declares NPT_STDMETHODCALLTYPE as ms_abi on x86_64 macOS, as d3dmetal-native does) pass arguments in rcx/rdx/r8/r9, so D3D11CreateDevice read its outputs from the wrong registers and spun on a garbage pointer. Define them as __attribute__((ms_abi)) on x86_64, make STDMETHOD and the IUnknown methods carry the convention so overrides match, and leave arm64 unchanged (it has a single convention). Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Josh Guyette <[email protected]>