Repository navigation
Description
Mac work on XCL is spread over #258 (one retail title), #42 (test results) and many PRs. This issue collects it in one place: what the Mac host does differently, which open PRs address it, and what is still unexplained. Test results on a Mac still go to #42, and #258 stays about its title. I will keep this description up to date; corrections and additions are welcome in the comments.
Setup most of us use
- CrossOver 26.3 (Wine) with D3DMetal on Apple Silicon. The title's x64 code runs through Rosetta 2.
- XCL cross-built for
x86_64-pc-windows-gnuorx86_64-pc-windows-gnullvm(CI: cross-build the Wine target (x86_64-pc-windows-gnullvm) on a macOS runner #783 builds the latter in CI on a macOS runner). - DXC: point
XCL_DXC_DIRat a Windows DXC (for exampleZ:\...\bin\x64) both when building and when running the tests. Without it at run time, the direct DXIL validator fails withdxcompiler.dll not found. - Run GPU tests one per process (
<lib test exe> --exact <test> --test-threads=1). When a timeout killswine, the Windows test process keeps running; end it yourself before the next run. - Careful with GPU stress tests: a run that made about 78,000
CreatePlacedResourceXcalls in 2.4 s restarted macOS WindowServer and logged me out.
Known host limits
| what D3DMetal / Wine / Rosetta does | effect on XCL | PR |
|---|---|---|
A compute program with any 64-bit atomic writes nothing at all (only non-returning unsigned min / max on device memory work), while every AtomicInt64On*Supported cap reads 1 |
64-bit atomic tests fail; a title's *_X2 atomics are lost with the rest of their program |
#983 (tests skip) |
DoublePrecisionFloatShaderOps is 0; f64 instructions give wrong results, and a program with any f64 instruction loses its other results too |
f64 tests fail | #787 |
Apple's metal-shaderconverter overflows its stack on DXIL UMul in some programs; the compile never returns |
a pipeline whose code addresses memory windows can stop at creation (three UMA tests on main hang this way) |
#3525 |
| Waves spinning in XCL's LDS barrier starve the wave they wait for (1024-thread group), until the spin gives up | threads read LDS before it is written | #2363 |
OpenExistingHeapFromAddress fails on process memory |
fixed: since #1329 (merged 28 Nov) the committed window gets a copy in video memory | #1329 |
D3D12_FORMAT_SUPPORT2_TILED is reported for no format; reserved textures on shared tiles read scrambled bytes unless block-compressed or made with unordered access |
every title texture keeps its own copy in video memory (about 16 GB more wired memory while a title loads) | #2402, #2492 |
| D3DMetal is native code, not a PE module, and expects its own C++ vtable layout | XCL's extended vtable layout puts its metadata where D3DMetal looks | #1904 |
| A GPU-side queue wait held about 32 s or more gets Metal's "Caused GPU Timeout Error", and the queue never completes work again (15 to 25 s recover) | a title that waits that long on a fence stops for good | none yet |
PrivateUsage is 0 under Wine |
memory lines and smoke summaries report 0 MB committed | #2362 (Mac), #1097 (Linux Wine) |
DwmGetWindowAttribute(DWMWA_CLOAKED) returns E_NOTIMPL |
the test title's "not cloaked" check fails | #1462 |
The exe's TLS callback gets no DLL_PROCESS_DETACH at exit |
report.json is not rewritten when a title ends |
#1461, #1479 |
| Rosetta 2 runs an AVX masked store an element at a time and resumes a fault only on the first element | a title's masked store into a page Wine's write watch protects ends the run (rosetta error: unexpectedly need to EmulateForward on a synchronous exception) |
#1303, #1311, #1313, #1344 |
^C typed in CrossOver's terminal reaches no process; closing the terminal kills everything with no report |
the host can outlive its launcher | #3431 |
Other open PRs that matter on a Mac
- Memory: detect a macOS host under Wine (mac_host) #2361:
util::mac_host(), detecting a macOS host under Wine. D3D12.X: title textures share video-memory pages on a macOS host too #2402, D3D12.X: render targets share video-memory pages on a macOS host too #2492, Recompiler: on a macOS host, s_barrier is the native group barrier by default #2363 and Recompiler: build the wide unsigned multiply without UMul on a Mac #3525 are stacked on it. - xcl run: echo log lines on a thread of their own, never blocking a caller #3430: log lines echo to stderr on their own thread, so an unread stderr no longer stops the title.
- D3D12.X: a Release on a thread XCL did not create is made on a Wine thread #2498 (stacked on D3D12.X: a native host's last Release only queues the resource #2445): a
Releaseon a thread XCL did not create is made on a Wine thread. - D3D12.X: read the late-release setting at adoption, not at first release #1789: the late-release setting is read when the device is adopted.
- Recompiler: the translated cache keys on the HLSL emitter's switches #2327: the translation cache keys on the HLSL emitter's switches.
- e2e: under Wine, stage the test title under the target directory's drive path #2414: under Wine, the e2e test stages the test title under the target directory's drive.
- Tests: implicit-LOD sample offset test uses s_wqm and the host's LOD #982, Tests: heap probes for aliased buffers and timestamp queries #1328: test-only fixes and probes.
Not explained yet
- On
main9dfbe3e, the test title stops on a Mac after 31 checks: the cloaking check fails (e2e: the console screen may be hidden where DWM cannot cloak it #1462), then the run hangs in some tries and crashes with0xc0000005in others. On my fork'svakaobr/xclmac/integration, which carries most of the PRs above plus a few fork-only changes, it passes all 50 checks. I have not found which change makes the difference. - After the Metal GPU timeout above, the queue's fence never advances and XCL keeps submitting to it.
gpu::dxil::ops_tests::groupshared_barrier_and_atomics_runfails on a Mac (ops_tests.rs:398), with or without Recompiler: on a macOS host, s_barrier is the native group barrier by default #2363.
What would help most
Nearly every PR above was tested only on a Mac. They need a Windows run of the whole suite and, for runtime changes, scripts/smoke.ps1 pairs before they can be merged. If you have a Windows GPU and some time, a merge-check on any of them (see #3041) moves this further than anything else.
AI use: Claude Code with Claude Opus 5.5 collected the issues and PRs and drafted this from my measurements and theirs. I checked it before posting.
Activity