Repository navigation
Conversation
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
bmjask
left a comment
There was a problem hiding this comment.
No concrete source defect found; optional Wine host-version detection and OnceLock use are sound, and this preparatory PR is behavior-neutral today. It is draft/stacked with failing description checks and lacks Windows/Wine whole-suite evidence. Also, XCL_MAC_HOST treats every value except literal "0"—including empty and "false"—as true. Document that conspicuously or accept only 0/1 to avoid accidental activation of future Mac-specific paths.
|
Nothing has happened on this PR for 3 days, so it is marked |
util::mac_host(): the process runs under Wine on a Mac (CrossOver or the Game Porting Toolkit), where D3D12 is Apple's D3DMetal and the title's code runs through Rosetta 2. ntdll's wine_get_host_version names the host's system; "Darwin" is a Mac. XCL_MAC_HOST=1 / 0 overrides it. Nothing calls it yet. The Mac changes that need to know they run there (the barrier default, title textures on shared pages) build on it; until now only Ahmet-Dedeler's mac7 branch had it. Part of xcl-dev#258.
6d6a3e3 to
69c0b04
Compare
Apple's metal-shaderconverter, which D3DMetal runs on every pipeline, does not handle DXIL UMul (binaryWithTwoOuts, opcode 42) in every program: on some it overflows its stack and the compile never returns. The direct translator emits UMul for the stride * index term of a windowed buffer address (lower_window.rs), so on a Mac every test and title pipeline with such an address can stop there. On a Mac (util::mac_host), umul_wide now builds the high half from 16-bit parts, as the HLSL kernel's mul_hi_u32 does, so the window code still needs no Int64Ops. Windows keeps UMul. Measured on an M5 Pro, macOS 27.2.1, CrossOver 26.3 + D3DMetal, on main 9dfbe3e with xcl-dev#2361: - gpu_memory_windows_above_4_gib, gpu_memory_windows_reject_out_of_uma_aliasing and gpu_sparse_vram_descriptors_buffers_and_xmem: on main each reports "has overflowed its stack" and hangs; with this change all three pass. - umul_wide_without_umul_matches_cpu (new): passes on 32 lanes; its kernel has no binaryWithTwoOuts and no Int64Ops. - window_at_lowers_to_32bit_carry_without_int64 now expects no UMul on a Mac: it passes, and with XCL_MAC_HOST=0 it still finds UMul, as before (with the Mac branch disabled it failed, measured on my Mac branch on 27 Nov). - gpu_window_at_32bit_carry_edge_cases: passes.
|
No open or merged PR adds AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Adds
util::mac_host(): the process runs under Wine on a Mac (CrossOver or the Game Porting Toolkit), where D3D12 is Apple's D3DMetal and the title's code runs through Rosetta 2. ntdll'swine_get_host_versionnames the host's system, and "Darwin" is a Mac;XCL_MAC_HOST=1/0overrides it. Nothing calls it yet: two Mac changes that need to know they run there build on it (thes_barrierdefault and title textures on shared pages, both stacked on this). Until now only themac7branch from #258 had it. Part of #258.What is in it
crates/xcl/src/util.rs:mac_host()(next tounder_wine()), its decision inmac_host_from(forced, sysname), and the testa_mac_host_is_darwin_under_wine_unless_forced.Tested
x86_64-pc-windows-gnu, debug, at6d6a3e3(onmain65fc114).util::tests::a_mac_host_is_darwin_under_wine_unless_forcedandutil::tests::dll_keys, each in its own process in the CrossOver bottle: 2 passed.mac7's, which has been running on this Mac.Regression run
main's. I have no title of my own to runscripts/smoke.ps1on.Not tested
wine_get_host_versiondoes not exist, so it answers false), Wine on Linux, the whole suite.AI use