Skip to content

graphics_and_performance

runner edited this page Oct 5, 2026 · 15 revisions

Graphics & Performance

Overview

This page covers the graphics architecture, backend selection, and performance characteristics of running Arknights: Endfield on Apple Silicon through the patched CrossOver Wine. For detailed memory-constrained Mac measurements, see 14-performance-on-16gb-macs.


The Graphics Stack at a Glance

Endfield.exe (Unity IL2CPP, DirectX 11)
       │
       ▼
CrossOver Graphics Backend (D3DMetal / DXMT / DXVK)
       │
       ▼
Metal Framework → Apple Silicon GPU
```text

| Component | Role |
|---|---|
| **D3DMetal** (Apple GPTK) | DirectX → Metal direct translation |
| **DXMT** (3Shain) | D3D11 → Metal, full native implementation |
| **DXVK** | DirectX → Vulkan → MoltenVK → Metal |
| **MoltenVK** | Vulkan → Metal translation layer |

---

## ⚠️ The DirectX 11 Rule

**Endfield must run in DirectX 11 mode.** The game defaults to Vulkan or DirectX 12, neither of which works well under CrossOver 26.3:

- **DirectX 12** → `vkd3d` cannot compile the game's DXIL/SM6 shaders → white/blank screen
- **Vulkan** → Requires a newer MoltenVK than CrossOver ships (experimental — see below)
- **DirectX 11** → Uses the mature D3DMetal/DXMT path and renders correctly

### Setting DirectX 11

**From the Gryphline launcher (recommended):**

1. Open **CrossOver_Endfield_Patch.app** (not stock CrossOver)
2. Select the **Arknights Endfield** bottle
3. Double-click **GRYPHLINK**
4. Click the dropdown next to the **Start** button
5. Select **"Launch with DirectX 11"**

This passes `-force-d3d11` to the game.

**Direct launch (alternative):**

```bash

# Easy launcher script (handles wineserver cleanup, graphics args, debug logging)

./scripts/launch-endfield.sh

# Or invoke wine directly with -force-d3d11

CXR="/Applications/CrossOver_Endfield_Patch.app/Contents/SharedSupport/CrossOver"
"$CXR/bin/wine" --bottle "Arknights Endfield" \
  --cx-app "C:/Program Files/GRYPHLINK/games/Arknights Endfield/Endfield.exe" \
  -force-d3d11
```bash

> **Note:** A game update can reset the renderer back to Vulkan/DX12 — that's the usual cause when the white screen "comes back". Re-select DirectX 11 after each update.

---

## Selecting a Graphics Backend

CrossOver → select the **Arknights Endfield** bottle → **Advanced Settings → Graphics**:

| Backend | Best For | DLSS | Notes |
|---|---|---|---|
| **D3DMetal** *(recommended)* | DX11/DX12 → Metal | ✅ MetalFX | Fastest direct path; GPTK4 upgrades to Metal 4 |
| **DXMT** | DX11 titles | ✅ MetalFX | Full native D3D11 implementation; good for modding |
| **DXVK** | Fallback | ❌ | Extra Vulkan→Metal hop; no DLSS |
| **Wine (wined3d)** | Debug only | ❌ | Slowest; use only for testing |

Also enable:
- **DLSS (MetalFX)** — upscaling via MetalFX (spoofed as NVIDIA DLSS)
- **MSync** — Mach semaphore synchronization (already configured by `create-bottle.sh`)

### `cxbottle.conf` Keys

The GUI settings are stored in the bottle's `cxbottle.conf`:

| GUI Setting | Key | Values |
|---|---|---|
| Graphics | `CX_GRAPHICS_BACKEND` | `d3dmetal`, `dxmt`, `dxvk`, `wined3d` |
| DLSS (D3DMetal) | `D3DM_ENABLE_METALFX` | `1` |
| DLSS (DXMT) | `DXMT_ENABLE_NVEXT` | `1` |
| MSync | `WINEMSYNC` | `1` |

These are automatically written by [`scripts/create-bottle.sh`](../scripts/create-bottle.sh).

---

## Experimental: The Vulkan Renderer

The game's Vulkan renderer runs through **MoltenVK** (Vulkan → Metal), not the bottle's D3DMetal setting.

### MoltenVK Versions

| Version | Status |
|---|---|
| **CrossOver bundled (1.2.10)** | Renders, but black window after swapchain recreation (FPS/V-Sync change) |
| **Stock MoltenVK 1.4.2** | Fixes black screen; remaining GPU hang issues in Snowy Forest |
| **This repo's patched MoltenVK** | Addresses remaining issues (from `patches/moltenvk`) |

### Enabling Vulkan

```bash

# Launch with Vulkan renderer

GFXARGS=-force-vulkan ./scripts/launch-endfield.sh
```python

### Vulkan Troubleshooting

**Bushes/grass render as odd, stretched polygons after updating MoltenVK** — the game's Vulkan pipeline cache is stale:

```bash

# Delete the cache and let it rebuild

rm "$HOME/Library/Application Support/CrossOver/Bottles/Arknights Endfield/drive_c/users/crossover/AppData/LocalLow/Gryphline/Endfield/vulkan_pso_cache.bin"
```python

The next launch is slower while pipelines recompile. Only the Vulkan renderer is affected — DirectX 11 is not.

**`VkShaderModule ... 'sampler' attribute parameter is out of bounds`** — MoltenVK binds descriptors for push-descriptor sets individually, so a shader using more than 16 combined image samplers exceeds Metal's 16-slot limit. These are usually unused material permutations.

---

## Installing GPTK4 (Optional Upgrade)

> **Apple's GPTK is evaluation-only software — download it yourself; you may not redistribute it.**

### What GPTK4 Provides

- **D3DMetal 4** (upgrades CrossOver's bundled D3DMetal 3.0 → 4)
- DirectX 12 → **Metal 4** (Apple's newest graphics API)
- MetalFX frame generation
- HDR support

### Requirements

- macOS 27 (beta) for full GPTK4 support
- On macOS 26, stay on the bundled D3DMetal 3.0

### Installation Steps

**1. Download from Apple**

[developer.apple.com/games/game-porting-toolkit](https://developer.apple.com/games/game-porting-toolkit/) → the Downloads list. Sign in with an Apple ID. The file you want is **"Evaluation environment for Windows games 4.x"** — its DMG holds the D3DMetal redistributable in `redist/lib/external/`.

Mount the `.dmg` (note the volume name with `ls /Volumes/`).

**2. Apply to your patched CrossOver copy**

**Scripted (recommended):**

```bash
GPTK_DIR="/Volumes/<mounted GPTK volume>/redist/lib/external" ./scripts/swap-into-crossover.sh
```bash

Or copy the folder to `~/Downloads/GPTK_4/redist/lib/external` — the script's default `GPTK_DIR` — and later rebuilds pick it up without the DMG.

**Manual:**

```bash
GPTK_VOL="/Volumes/<mounted GPTK volume — check with: ls /Volumes/>"
APP="/Applications/CrossOver_Endfield_Patch.app"
cd "$APP/Contents/SharedSupport/CrossOver/lib64/apple_gptk/external"
mv D3DMetal.framework D3DMetal.framework-old
mv libd3dshared.dylib  libd3dshared.dylib-old
ditto --noextattr --noqtn "$GPTK_VOL/redist/lib/external/" .
cd - >/dev/null
xattr -rd com.apple.FinderInfo "$APP"
codesign --force --sign - --preserve-metadata=entitlements "$APP"
codesign --verify --deep --strict "$APP" && echo "patched app verifies"
```bash

**CXPatcher / Procyon:** [CXPatcher](https://github.com/italomandara/CXPatcher) drops a GPTK `.dmg`'s D3DMetal into a CrossOver copy automatically. Its author has moved GPTK4 support to the successor **[Procyon](https://github.com/italomandara/Procyon)** — use Procyon's pre-release for GPTK4.

### Caveats

- GPTK4 wants macOS 27 (beta) + Metal 4. On macOS 26, stay on the bundled D3DMetal 3.0.
- Apple Silicon only; Rosetta 2 required.

---

## Performance Characteristics

### Tested Hardware

| Machine | Settings | Expected FPS |
|---|---|---|
| **M4 Pro** (24 GB) | Medium, 100% render scale | ~60 FPS |
| **M3 Pro / M4 Max** (24 GB+) | Medium, 100% render scale | ~60 FPS |
| **Base M1/M2/M3/M4** (16 GB) | Low / Very Low | 30–45 FPS |
| **MacBook Air** (any chip) | ❌ **Not recommended** | — |

### Thermal & CPU Behavior

- **CPU Utilization:** Expect CPU to be **completely maxed out**. Rosetta 2 x86_64 JIT translation overhead combined with the Unity IL2CPP main render thread pegs at least one core at ~100% sustained.
- **Temperatures:** Expect the chip to reach **~90 °C** under sustained play on actively cooled machines. Apple Silicon chips are designed to operate up to 100–105 °C before hard throttling.
- **Swap Pressure:** Gameplay performance is almost entirely dictated by **CPU single-core strength and RAM capacity / bandwidth**, not the GPU. Unified memory means GPU VRAM allocations (5–6 GB) and system RAM share the same pool.

### ⚠️ MacBook Air — OFF LIMITS

MacBook Airs have **no active cooling fans**. Sustained CPU translation under Rosetta generates intense, continuous heat, causing the device to severely thermal-throttle into heavy stuttering, freezes, and stalls very quickly. **An actively cooled Mac (MacBook Pro, Mac Studio, Mac mini) is required.**

### Bottleneck Summary

Gameplay performance is overwhelmingly **CPU and RAM bound**, not GPU:

1. **Rosetta 2 JIT overhead** — every x86_64 instruction block is translated to ARM64 at runtime; tpshell's VMProtect obfuscation dramatically increases the number of unique instruction blocks that must be JIT-compiled.
2. **Unity IL2CPP single-threaded render dispatch** — the game's main thread is extremely hot.
3. **Unified memory pressure** — 5–6 GB GPU VRAM competes directly with the OS and game for the same physical RAM pool.

---

## Performance Optimization Tips

### Before Launching

- Close browsers, Discord, and other heavy background apps before launching
- Ensure you have at least 8 GB of free RAM
- Use `-force-d3d11` launch flag (or select "Launch with DirectX 11" in the Gryphline launcher)

### In-Game Settings (16 GB Macs)

A starting point that was very playable on a 16 GB M4:

| Setting | Value |
|---|---|
| Graphics Quality | *Very Low*, then customized |
| Resolution | 1800×1169 fullscreen |
| FPS | 120, V-Sync off |
| Global/Teammate Skill Effects | *Low* |
| Shadow Quality | *Very Low* |
| **Texture Quality** | ***Medium*** |
| Volumetric Fog | off |
| Volumetric Cloud | *Very Low* |
| Anisotropic | ×4 |
| Ambient Occlusion | *Very Low* |
| Scene/Ambient Details, Vegetation Density | *Low* |
| Screen Space Reflections | off |
| Image Enhancement | **NVIDIA DLSS → DLAA**, Sharpening 0 |
| NVIDIA Reflex | on |
| Contact Shadows | on |

**Texture Quality** is the main *memory* lever — textures live in unified memory. Drop it first if large areas hitch or freeze.

**DLSS works:** D3DMetal presents the GPU as an NVIDIA adapter and CrossOver serves DLSS with MetalFX. **DLAA** (native-resolution AA) looked sharpest; switch to Quality if you need frames.

**Chromatic Aberration** is a deliberate colour-fringe blur — turning it off sharpens the image for free; a little **Sharpening** (0.3–0.5) helps with DLSS.

### macOS Display Settings

With High Resolution Mode off, CrossOver renders at the "looks like" resolution. **Default** size (1512×982 on a 14") maps 2:1 onto the Retina panel, while "More Space" (1800×1169) is stretched 1.68×, which looks soft — and Default is ~30% fewer pixels.

Keep **High Resolution Mode off** (white screen issue).

---

## Troubleshooting Graphics Issues

### White / Blank Screen (very common after a game update)

The game shipped an update that reset its renderer to **Vulkan or DirectX 12**, and neither works well under CrossOver 26.3.

**Fix:** Run the game in **DirectX 11** — start it with the launcher's **Launch with DirectX 11** (dropdown next to the Start button; the plain Start button uses the default renderer), or launch Unity with `-force-d3d11`.

Do **not** fix this by overwriting CrossOver's `d3d11/d3d12/dxgi.dll` with the `apple_gptk` copies — that breaks `unityplayer.dll` init (Windows error **1114**).

### Vulkan Mode: Black Screen After FPS/V-Sync Change

CrossOver's MoltenVK doesn't survive the game recreating its swapchain. The game keeps running but won't close normally; stop it with:

```bash
CXR="/Applications/CrossOver_Endfield_Patch.app/Contents/SharedSupport/CrossOver"
WINEPREFIX="$HOME/Library/Application Support/CrossOver/Bottles/Arknights Endfield" CX_ROOT="$CXR" "$CXR/bin/wineserver" -k
```bash

Then install MoltenVK 1.4.2 or the patched one, or play in DirectX 11.

### Vulkan Mode: Logged Out After Teleporting to Snowy Forest

A GPU hang that makes macOS kill WindowServer. The patched MoltenVK is meant to fix this; with stock MoltenVK, play that area in DirectX 11.

### `unityplayer.dll` "Missing or Corrupt" (Error 1114)

A DLL-init failure, usually from swapping graphics DLLs or launching `Endfield.exe` directly without the launcher's working directory. Restore CrossOver's default `d3d11/d3d12/dxgi.dll`, and launch via the Gryphline launcher.

### High Resolution Mode

The bottle's Advanced Settings renders a white screen — leave it off.

### Black Screen on Later Launches

Delete the game's registry data (`HKCU\Software\Gryphline\Endfield` and `…\Gryphline\sdk_data\…` — settings and login cache, e.g. via CrossOver → *Run Command* → `regedit`) and log in again. That resets the in-game settings.

---

## Related Documentation

- [Installation & setup](installation.md) — full requirements, build, deploy, bottle creation
- [Troubleshooting](troubleshooting.md) — common failures and fixes
- [14-performance-on-16gb-macs](14-performance-on-16gb-macs.md) — measured memory/CPU/GPU behavior on 16 GB Macs
- [13-working-solution.md](13-working-solution.md) — the full engineering write-up
- [06-graphics-and-gptk.md](06-graphics-and-gptk.md) — graphics backend research and GPTK overview

Clone this wiki locally