Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

MoltenVK linear fallback: Red Dead Redemption 2 runs (engine r6)

Gauthier Piarrettef265790696ac
diff --git a/Scripts/build-moltenvk.sh b/Scripts/build-moltenvk.sh
index b2ac49b..6e66aae 100755
--- a/Scripts/build-moltenvk.sh
+++ b/Scripts/build-moltenvk.sh
@@ -5,20 +5,28 @@
set -euo pipefail
TAG="${1:-v1.4.1}"
OUT="${2:-$(pwd)/build-moltenvk}"
-PATCH="$(cd "$(dirname "$0")/.." && pwd)/spike/patches/moltenvk-shadow-import.patch"
+PATCHES="$(cd "$(dirname "$0")/.." && pwd)/spike/patches"
WORK="$(mktemp -d)"
echo "[moltenvk] tag $TAG, work dir $WORK"
git clone -q --depth 1 --branch "$TAG" https://github.com/KhronosGroup/MoltenVK.git "$WORK/src"
cd "$WORK/src"
-git apply --check "$PATCH" && git apply "$PATCH"
+# Every moltenvk-*.patch in spike/patches, in name order: shadow-import (the Sims, 32-bit Vulkan
+# titles) and linear-fallback (Red Dead Redemption 2's linear 3D and mipmapped images).
+for PATCH in "$PATCHES"/moltenvk-*.patch; do
+ case "$PATCH" in *moltenvk-shadow-imported-host-memory.patch) continue;; esac
+ echo "[moltenvk] applying $(basename "$PATCH")"
+ git apply --check "$PATCH" && git apply "$PATCH"
+done
./fetchDependencies --macos
xcodebuild build -project MoltenVKPackaging.xcodeproj -scheme "MoltenVK Package (macOS only)" \
-destination "generic/platform=macOS" -configuration Release ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO -quiet
DYLIB="$(find Package/Release -name libMoltenVK.dylib -path '*macOS*' | head -1)"
test -f "$DYLIB"
-strings "$DYLIB" | grep -q "HIGHBALL shadow-import" || { echo "patch missing from build"; exit 1; }
+for MARK in "HIGHBALL shadow-import" "HIGHBALL linear-fallback"; do
+ strings "$DYLIB" | grep -q "$MARK" || { echo "patch missing from build: $MARK"; exit 1; }
+done
mkdir -p "$OUT/pkg" && cp "$DYLIB" "$OUT/pkg/libMoltenVK.dylib"
-NAME="moltenvk-${TAG#v}-shadow-import-1-x86_64.tar.gz"
+NAME="moltenvk-${TAG#v}-shadow-import-1-linear-fallback-1-x86_64.tar.gz"
tar -czf "$OUT/$NAME" -C "$OUT/pkg" libMoltenVK.dylib
echo "[moltenvk] $OUT/$NAME"
echo " sha256: $(shasum -a 256 "$OUT/$NAME" | awk '{print $1}')"
diff --git a/spike/engines/x64-crossover26.3-r6.json b/spike/engines/x64-crossover26.3-r6.json
new file mode 100644
index 0000000..314031c
--- /dev/null
+++ b/spike/engines/x64-crossover26.3-r6.json
@@ -0,0 +1,111 @@
+{
+ "$schema": "https://highball.app/schemas/engine-manifest/v0",
+ "arch": "x86_64",
+ "baseEnv": {
+ "DYLD_FALLBACK_FRAMEWORK_PATH": "${frameworks}",
+ "DYLD_FALLBACK_LIBRARY_PATH": "${frameworks}:${frameworks}/GStreamer.framework/Versions/1.0/lib",
+ "GST_PLUGIN_PATH": "${frameworks}/GStreamer.framework/Versions/1.0/lib/gstreamer-1.0",
+ "WINEDEBUG": "fixme-all"
+ },
+ "components": {
+ "d3dmetal-tsshim": {
+ "extract": {
+ "into": "renderers/d3dmetal-tsshim/wine",
+ "subpath": "renderers/d3dmetal-tsshim/wine"
+ },
+ "kind": "renderer",
+ "layout": [
+ "x86_64-windows/d3d12.dll"
+ ],
+ "license": "MIT",
+ "note": "D3DMetal timestamp shim, same component as the default engine's r2.",
+ "order": 1,
+ "sha256": "1ac868e6a4a9f713cd4ed22b8b53b2b7dde2e702a39aa23aa19a58448dd4e731",
+ "size": 46096,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/d3dmetal-tsshim-20260907/d3dmetal-tsshim-20260907.tar.xz",
+ "version": "20260907"
+ },
+ "dxmt": {
+ "extract": {
+ "into": "renderers/dxmt/wine",
+ "subpath": "highball"
+ },
+ "kind": "renderer",
+ "license": "MIT (Highball branch of DXMT: SwapDeviceContextState, cross-process opt-in)",
+ "sha256": "0b86f0c793e99ae88bb4ff5f8575403ad138598a44a90248c71d6bc3ec18923b",
+ "size": 18922634,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/dxmt-highball-20260904T194518Z-7421db2/dxmt-highball-20260904T194518Z-7421db2.tar.gz"
+ },
+ "moltenvk": {
+ "extract": {
+ "into": "frameworks/libMoltenVK.dylib",
+ "subpath": "libMoltenVK.dylib"
+ },
+ "kind": "runtime",
+ "license": "Apache-2.0",
+ "note": "MoltenVK 1.4.1 rebuilt with two Highball patches (spike/patches/moltenvk-shadow-import.patch and moltenvk-linear-fallback.patch, Scripts/build-moltenvk.sh). Shadow import is off unless a launch sets MVK_SHADOW_IMPORT=1 (32-bit native-Vulkan games such as The Sims Legacy Collection). Linear fallback is always on: a linear-tiled image that Metal cannot back with linear memory (3D, mipmapped or array images) is created with optimal tiling instead of failing vkCreateImage, which is what takes Red Dead Redemption 2 from an exit at 98 per cent to the main menu and the story.",
+ "order": 1,
+ "sha256": "858c9a6229662cbff8afda795424317086e377e06765c24f83732385d3047dfd",
+ "size": 1675221,
+ "url": "https://github.com/gauthierpiarrette/highball/releases/download/engine-components/moltenvk-1.4.1-shadow-import-1-linear-fallback-1-x86_64.tar.gz",
+ "version": "1.4.1+shadow-import-1+linear-fallback-1"
+ },
+ "runtime": {
+ "extract": {
+ "into": "frameworks",
+ "subpath": "Template-1.0.11.app/Contents/Frameworks"
+ },
+ "kind": "frameworks",
+ "license": "mixed (LGPL-2.1 GStreamer, Apache-2.0 MoltenVK, LGPL gnutls, ...)",
+ "sha256": "9fa15479e7ff6abd99c1d07be285fb95f41fc6991586502427152b1f7d6ccb8a",
+ "size": 84533420,
+ "url": "https://github.com/Sikarugir-App/Wrapper/releases/download/v1.0/Template-1.0.11.tar.xz"
+ },
+ "wine": {
+ "extract": {
+ "into": "engine",
+ "subpath": "engine"
+ },
+ "kind": "engine",
+ "license": "LGPL-2.1+",
+ "note": "Built from CodeWeavers' crossover-sources-26.3.0.tar.gz (sha pinned in highball-engine/inputs.json) by highball-engine's build workflow, run 34352802492, with patches 0001, 0002, 0003, 0005, 0006, 0007 and 0008. 0008 mirrors TEB->Tib.FiberData into the macOS %gs block: on macOS that block is the host thread block rather than the TEB, and the field was never mirrored, so GetCurrentFiber(), an intrinsic that reads the slot directly and cannot be intercepted, returned a host value that games with a fiber job system passed back to SwitchToFiber. Stripped; Wine Mono 10.4.1 and Gecko 2.47.4 included.",
+ "sha256": "ed8a426452f8f4caa0c84fd88c35fbf9b53ea203ac7f3d11007cb05100d01a4e",
+ "size": 334866734,
+ "url": "https://github.com/gauthierpiarrette/highball-engine/releases/download/engine-wine-11.0-20260909T125736Z-fiberdata-mirror-0008b/engine-wine-11.0-20260909T125736Z-fiberdata-mirror-0008b.tar.gz",
+ "version": "wine-11.0 (CrossOver 26.3 tree) Highball build 2026-09-09, fiber mirror"
+ },
+ "winetricks": {
+ "kind": "tool",
+ "license": "LGPL-2.1",
+ "note": "Pinned to upstream commit 5a59ea07 (20260125+dev, 2026-08-07) — the exact bytes 0.7.x verified with dotnet48. The old branch URL drifted and broke every fresh engine install (issues #27/#28); URLs here must be immutable.",
+ "sha256": "f35c29737ca08a583569e6a3752d52fbe23333c5acfad5f16c4177d25eaf3f4b",
+ "url": "https://raw.githubusercontent.com/Winetricks/winetricks/5a59ea07513b24093bd90fad943ecf9543cf05bc/src/winetricks"
+ }
+ },
+ "displayName": "Wine 11.0 (CrossOver 26.3 tree, Highball build) + DXMT (Highball branch) + D3DMetal 3.0 + MoltenVK 1.4.1",
+ "id": "x64-crossover26.3-r6",
+ "licenses": {
+ "apple-gptk-license-2023-08-17": {
+ "applies": [
+ "renderers/d3dmetal (bundled in the Sikarugir Template: D3DMetal.framework sha1 1405e5c6… identical to GPTK 3.0-3)"
+ ],
+ "summary": "Apple Game Porting Toolkit license: non-commercial use/distribution only; no modification; use scoped to developing, testing or evaluating games on Apple hardware.",
+ "text": "spike/d3dmetal-license.txt"
+ }
+ },
+ "minMacOS": "14.0",
+ "notes": [
+ "r6 (2026-09-11): r5 plus the MoltenVK linear-fallback patch. Red Dead Redemption 2 loads, reaches its main menu and starts the story on this engine (M1 Pro, macOS 26.6.2, 1280x720 windowed, about 60 fps in menus); every earlier engine exits at 98 per cent of the first load because MoltenVK refuses the game's linear 3D, mipmapped and array images. Nothing else changed from r5.",
+ "r5 (2026-09-09): r4 plus patch 0008, the fiber mirror. Marvel's Guardians of the Galaxy reaches gameplay on this engine and crashes on Play Game on every earlier one, verified twice from a clean start on an M1 Pro, macOS 26.6.2, at 27.5 fps in the opening scene. A reproducer that needs no game (private/notes/fibertest4.c) faults identically to the game on r4 and runs clean here.",
+ "Cost of 0008, measured: offset 0x20 holds the thread's pthread QoS class on macOS, so a thread that uses fibers loses that scheduling hint. Windows and macOS both fix that offset, so a correct GetCurrentFiber() and an intact QoS cache cannot coexist. Confined to threads that call the fiber APIs, and a stress run of 8 threads and 6.4M switches showed TLS and thread creation unaffected (320000 wrong fiber values on r4, 0 here).",
+ "Optional engine (2026-09-07): Highball's own build of the CrossOver 26.3 Wine tree (Wine 11.0) with the same DXMT, D3DMetal, MoltenVK and Template runtime as the default engine. Not the default: a bottle moves to it from its Advanced settings, or Highball offers it when a launcher's recipe names it (the EA app). Verified here: EA app install and sign-in, The Sims 4 through it (DXMT, 128 fps on an M1 Pro), Steam with GTA V install, Rockstar launcher sign-in window, Ubisoft Connect window.",
+ "Games were not re-verified on this engine (CS:GO's cascaded shadow maps are known to differ), which is why it is offered for the launchers that need it, one environment at a time, and never becomes the default on its own. Steam's own client renders here (CEF), as do the Rockstar and Ubisoft sign-in windows; their account services were the wall in testing, not the engine.",
+ "Why it exists: Wine 10 (the default engine) cannot start the EA app's vital background service or run its .NET setup steps, and its winemac lacks the cross-process remote-layer route that the Rockstar and Ubisoft launchers' browsers need (highball#15, #56, #60). This tree carries Highball's patches for both.",
+ "Three patches make the tree behave like the default engine: the Windows user follows the macOS user (CrossOver hack 12735 reverted), WINEDLLPATH_PREPEND is honoured so the renderer overlays apply, and wined3d's automatic renderer is OpenGL first as upstream. winemac.so exports macdrv_functions, so the DXMT and D3DMetal bridges work. This engine ships no winemetal.dll of its own; the DXMT overlay carries it. Wine Mono and Gecko are included.",
+ "DXMT here is Highball's branch (cross-process swapchains, DXMT_ALLOW_CROSS_PROCESS_SWAPCHAIN=1), needed by the EA client. D3DMetal is the Template's 3.0 with the timestamp shim in front, as on the default engine. Accepted licences carry over when a bottle moves.",
+ "Moving a bottle here re-runs the Windows setup (different Wine build); moving back is the same step. Nothing installed in the bottle is removed either way."
+ ],
+ "requires": [
+ "rosetta2"
+ ]
+}
diff --git a/spike/patches/moltenvk-linear-fallback.patch b/spike/patches/moltenvk-linear-fallback.patch
new file mode 100644
index 0000000..fafcf0a
--- /dev/null
+++ b/spike/patches/moltenvk-linear-fallback.patch
@@ -0,0 +1,37 @@
+diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm
+index 5463d5a..54efcc6 100644
+--- a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm
++++ b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm
+@@ -1403,8 +1403,14 @@ static MTLRegion getMTLRegion(const ImgRgn& imgRgn) {
+
+ bool isLin = true;
+
++ // HIGHBALL linear-fallback: Metal cannot back a 3D or mipmapped texture with linear memory, but a
++ // game that asks for one (Red Dead Redemption 2 does, for its 3D LUTs) gets nothing at all when
++ // vkCreateImage fails. Create the image with optimal tiling instead and say so once; the image
++ // then lives in the usual MTLTexture and host writes reach it through the memory binding's
++ // flush path rather than through a shared MTLBuffer.
+ if (getImageType() != VK_IMAGE_TYPE_2D) {
+- setConfigurationResult(reportError(VK_ERROR_FEATURE_NOT_PRESENT, "vkCreateImage() : If tiling is VK_IMAGE_TILING_LINEAR, imageType must be VK_IMAGE_TYPE_2D."));
++ static bool reported3D = false;
++ if (!reported3D) { reported3D = true; reportMessage(MVK_CONFIG_LOG_LEVEL_WARNING, "HIGHBALL linear-fallback: linear tiling requested for a non-2D image; creating it with optimal tiling instead (reported once)."); }
+ isLin = false;
+ }
+
+@@ -1422,12 +1428,14 @@ static MTLRegion getMTLRegion(const ImgRgn& imgRgn) {
+ }
+
+ if (pCreateInfo->mipLevels > 1) {
+- setConfigurationResult(reportError(VK_ERROR_FEATURE_NOT_PRESENT, "vkCreateImage() : If tiling is VK_IMAGE_TILING_LINEAR, mipLevels must be 1."));
++ static bool reportedMips = false;
++ if (!reportedMips) { reportedMips = true; reportMessage(MVK_CONFIG_LOG_LEVEL_WARNING, "HIGHBALL linear-fallback: linear tiling requested for a mipmapped image; creating it with optimal tiling instead (reported once)."); }
+ isLin = false;
+ }
+
+ if (pCreateInfo->arrayLayers > 1) {
+- setConfigurationResult(reportError(VK_ERROR_FEATURE_NOT_PRESENT, "vkCreateImage() : If tiling is VK_IMAGE_TILING_LINEAR, arrayLayers must be 1."));
++ static bool reportedLayers = false;
++ if (!reportedLayers) { reportedLayers = true; reportMessage(MVK_CONFIG_LOG_LEVEL_WARNING, "HIGHBALL linear-fallback: linear tiling requested for an array image; creating it with optimal tiling instead (reported once)."); }
+ isLin = false;
+ }
+