Skip to content

MetalSharp Wine 6.0

Choose a tag to compare

@aaf2tbz aaf2tbz released this 08 Nov 04:52
8c8d270

MetalSharp Wine 6.0 ships two builds. The arm64 build (MetalSharp-Wine.app) is Wine 11.20 for Apple silicon, native arm64 with x86 code run by FEX. The x86_64 build (MetalSharp-Wine-x86_64.app) is new: an x86_64 Wine 11.17 that runs under Rosetta 2, with the same graphics lanes plus Apple's D3DMetal. MetalSharp's FEX | x86_64 toggle switches between them, and they share prefixes.

Both builds run on macOS 15 and later. Below macOS 27 they hold Mullion to Metal 3.2 shaders and the VKD3D lane's Direct3D 9 to shader model 3, and the x86_64 build runs Game Porting Toolkit 3.0's D3DMetal.

On the arm64 side, FEX runs x86 code more like an x86 CPU does: debug-register breakpoints, code that protectors decrypt on execute, undefined flags as Intel leaves them, and x87 state across exceptions. x86 callbacks and cold program starts are faster. VKD3D-Proton-MacOS moves to 5.3 with the Metal Shader Converter bridge, and WineMetalGL to 3.9.0.

The x86_64 build

MetalSharp-Wine-x86_64.app is MetalSharp's regular runtime as one Developer ID-signed app. docs/X86_64.md has the details.

  • Wine 11.17 as ported by WineForge (a05564cf), with 59 MetalSharp commits (patches/wine-x86_64/), including the arm64 build's general fixes: display modes, fullscreen, the mouse, GCMouse raw input, painting, msync, and wined3d on MoltenVK.
  • Every graphics lane:
    • Mullion (Direct3D 12, 11 and 10), x86_64 and i386.
    • VKD3D / DXVK: VKD3D-Proton-MacOS 5.3's Direct3D 12 with DXVK-MacOS's DXGI and Direct3D 11 to 8, on VKD3D-Proton-MacOS 5.3's universal MoltenVK with Metal Shader Converter, the same lane versions as the arm64 build.
    • D3DMetal: Apple's Direct3D 12 and 11.
    • WineMetalGL (OpenGL 4.6 on Metal).
  • DLSS on MetalFX in games that ship it, on every lane. Mullion and VKD3D / DXVK use their own NGX core. D3DMetal uses Apple's nvngx-on-metalfx (Super Resolution only).
  • D3DMetal by macOS version: Game Porting Toolkit 4.0 beta 3's on macOS 27 and later, 3.0's below. Both ship unmodified and Apple-signed, under Apple's license (share/licenses/d3dmetal).
  • Media: GStreamer 1.26.7 and FFmpeg 7.1.2, so Media Foundation video plays. The x86_64 runtime before this had none that loaded.
  • It needs Rosetta 2. 32-bit programs run on Wine's WoW64.

macOS 15 to 26

  • The arm64 build is for macOS 15 and later, as the x86_64 build is. MetalSharp recommended it from macOS 26.4 before. 64-bit programs run on macOS 15. 32-bit x86 programs still need macOS 26.4, where Apple's cross-architecture entitlement provides the low 4GB they need.
  • Payloads held to macOS 15. Unity Mono, SDL2 and SDL3, FMOD, CSteamworks, libgdiplus and MetalSharp's host runtime were linked on macOS 26 and 27 with those as their minimum, so macOS 15 would have refused them. Checked against the macOS 15 SDK, none of them needs anything macOS 15 lacks. Both builds now carry them with macOS 15 as their minimum.
  • Below macOS 27, MetalSharp sets mullion.shaderMetalVersion = 320 in mullion.conf and d3d9.shaderModel = 3 for the VKD3D lane on both builds. The x86_64 build's D3DMetal lane runs Game Porting Toolkit 3.0's D3DMetal. On macOS 27 and later, Mullion picks its own Metal version and D3DMetal is Game Porting Toolkit 4.0 beta 3's.

x86 emulation (FEX)

Running x86 code as an x86 CPU does

  • Undefined flags are left the way Intel hardware and Rosetta 2 leave them. AF is cleared after logical operations, shifts, TEST, the BT family and BMI. SF, ZF, AF and PF are cleared after MUL and IMUL. Bit scans and shifts set PF, AF and OF as hardware does (FEX 0031).
  • x87 control word, tag word and status (C0–C3, TOP) survive an exception. Before, a handler or the code after it saw them reset (FEX 0033). An x64 exception context also carries the segment registers and the 0x27f control word that x64 Windows reports (Wine 0138).
  • Hardware breakpoints in Dr0–Dr3 and Dr7 raise EXCEPTION_SINGLE_STEP where they're set, from SetThreadContext or a handler's context (FEX 0027, Wine 0133).
  • An instruction that runs from executable memory into memory that isn't raises its execute fault at the first byte that couldn't be fetched, as on Windows. Protections that decrypt code on execute rely on this (FEX 0024).
  • Code is re-translated when another view of the same data section rewrites it (FEX 0025, Wine 0132). Per-instruction code checks compile in linear time (FEX 0026).
  • CPUID names the TSC's frequency, and the processor clock Windows reports matches it. CPUID shows no hypervisor by default, with the hypervisor leaves zeroed to match (FEX 0028, 0032, Wine 0134).
  • A thread spinning in a loop whose back-edge is a conditional branch now notices a suspend request. Before, SuspendThread and GetThreadContext on it could hang (FEX 0034).
  • Stack walks end at a return address that isn't user code, instead of faulting inside ntdll (Wine 0135). The ARM64EC call checker accepts hot-patchable export prologues (Wine 0138).

Speed

  • Calls from native code into x86 code return through FEX's call-ret stack. This covers qsort comparators, window procedures and enumeration callbacks (FEX 0030). The stack's guards are sized to 16K pages (FEX 0029).
  • Cold program starts are faster. win32u no longer initializes OpenGL, which enumerated every pixel format, while each new program waits for its desktop (Wine 0136).

Graphics

  • VKD3D-Proton-MacOS moves from 5.0 to 5.3.
    • Shaders convert through Apple's Metal Shader Converter, with DirectXShaderCompiler's DXBC to DXIL converter for DXBC shaders (METALSHARP_MSC=0 and METALSHARP_MSC_DXBC=0 turn them off).
    • Minecraft Bedrock ray tracing fixes, METALSHARP_DLSS_SCALE, and geometry shaders reading fewer components (VKD3D-Proton-MacOS#11).
    • Nanite mesh pipelines convert and draw upright.
    • Black 3D in DXVK games that read constant buffers out of range is fixed (VKD3D-Proton-MacOS#19).
  • The VKD3D-Proton lane uses DXVK 2.7.1's DXGI and Direct3D 10/11, as ARM64X.
  • MoltenVK pipelines compile on the calling thread. Before, God of War Ragnarök's sixteen compile threads filled every GCD worker and stalled. Hogwarts Legacy keeps background compiles (Wine 0130, 0131).
  • Mullion moves to aaf2tbz/mullion metalsharp-2.1-main f5dad40e.
  • WineMetalGL moves from 3.8.0 to 3.9.0.

Wine

  • New prefixes keep HKLM\Software\Wine as a lasting key. Before, it could be created volatile and lose its settings on restart (Wine 0137).

Downloads

  • MetalSharp-Wine-6.0-arm64.zip: the Developer ID signed and notarized MetalSharp-Wine.app. Use this one for the arm64 build: i386 and 4K pages need it.
  • metalsharp-wine-6.0-arm64.tar.xz: the same Wine as a relocatable folder (bin/wine). It's ad-hoc signed, so x86_64 and ARM64 only, with 16K pages.
  • MetalSharp-Wine-6.0-x86_64.zip: the Developer ID signed and notarized MetalSharp-Wine-x86_64.app, the x86_64 build.
  • SHA256SUMS: checksums of all three.

Requirements: macOS 15 or later on Apple silicon, for both builds. The arm64 build needs macOS 26.4 or later for 32-bit x86 programs. The x86_64 build needs Rosetta 2. The macOS version checks and graphics settings come from MetalSharp; its next update carries them.

Sources: MetalSharp Wine main (tag v6.0) pins:

  • source/wine 702b230
  • source/fex f7e653d
  • source/wine-x86_64 5d534ba
  • Mullion f5dad40e
  • VKD3D-Proton-MacOS v5.3 (2103382)
  • DXVK-MacOS v3.1.1-macos.3
  • WineMetalGL 3.9.0 (8074a44)
  • WFDXCompat 3311bdc