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]>
* refactor(d3d11): normalize pipeline creation
* refactor(d3d11): introduce IMTLD3D11PipeineCache
* refactor(d3d11): cache input layout
* refactor(d3d11): unify graphics pipeline description
* refactor(d3d11): always do vertex pulling
since the performance is the same and less restriction, the implementation can be simplified by remove the old vertex descriptor method.
* refactor(d3d11): compare blend state by effective properties only
* feat: set thread QoS
* refactor(d3d11): improved cpu ultilization for shader/pso compilation
* chore: twist qos& thread priority mutation order
we eventually make NieR: Automata work, with some notable missing parts: 1. occlusion query, we report all 0 for now 2. uav counter, which is used occasionally
A ton of progress. However it progressed too far that I have to split the work now so that I can verify it works at runtime (currently it works for some demo but that's limited)