Files
Josh Guyette 66fed525af native: use the Microsoft x64 calling convention on x86_64
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]>
2026-11-10 10:03:00 -08:00
..
2024-06-23 14:17:22 +01:00
2025-04-23 17:30:10 +08:00