Performance
Shift Engine is designed to scale from integrated GPUs, handhelds and Apple Silicon up to 4K high-refresh desktops using one Vulkan codebase. All numbers on this page are measured directly from Release builds using the built-in --bench harness and tools/benchmark.py.
Architecture#
- GPU-driven world rendering (
WorldGpu) & 4-tier PVS/LOD: Colorado geometry and billboard trees are resident in GPU arenas, filtered by the disc's visibility tables (PVSZLookup) and 4-tier LOD selection, and culled on the GPU via compute shaders (world_cull.comp,tree_cull.comp) against the frustum and a hierarchical depth pyramid (hiz_gen.comp), emitting indirect draws with minimal CPU recording overhead. - Discard-free opaque passes and Early-Z sky: Opaque world surfaces render with
early_fragment_tests(world_opaque/world_gpu_opaque), cutout foliage alpha-tests early, and the sky dome and stars render after opaque geometry at far depth so covered sky pixels are rejected by Early-Z (cutting sky GPU time at 4K from0.37 msto0.03 ms). - Lazy render targets and optional SOTA / RT passes: Bloom, XeGTAO, Hi-Z SSR, occluded volumetric shafts, McGuire motion blur, FXAA, motion-vector, temporal-history, upscaler (CAS / FSR1 / TAAU / Apple MetalFX), cockpit-mirror and optional Vulkan hardware ray-tracing / path-tracing (ReSTIR DI + SVGF) targets are allocated only when active. World arenas, texture LRU caches, UI4 atlases and dynamic cubemaps scale with the selected preset, and cubemap/mirror updates are amortized across frames.
- Zero-hitch streaming and hot car swap: Traffic spawns and despawns avoid
vkDeviceWaitIdle()via spare frame descriptor sets and multi-frame retirement rings; MoltenVK splits offscreen rendering from swapchain presentation so GPU work never stalls behindnextDrawable. Switching cars, changing paint, installing upgrades or entering/leaving races hot-swaps the car in place (Showroom::reload_car()) without tearing down the renderer or world. - Parallel CPU pipeline and SIMD kernels: Archive decompression, world/collision/prop gathering, texture decoding and multi-car AI physics run on worker pools alongside x86-64 AVX2 and ARM64 NEON assembly hot-path kernels and the dedicated allocation-free RT audio thread. Live frame diagnostics include a 12-phase hitch profiler on F3.
Split bindless and TBDR#
Earlier Vulkan bindless renderers commonly use COMBINED_IMAGE_SAMPLER[4096], which exceeds the per-stage sampler limits on Apple Silicon (MoltenVK / Metal 3 Argument Buffers) and many Android Adreno/Mali drivers, forcing a slow CPU draw fallback.
Shift Engine avoids that fallback with three portability optimizations:
- Split bindless descriptors:
WorldGpubinds1×immutableVK_DESCRIPTOR_TYPE_SAMPLERalongsideVK_DESCRIPTOR_TYPE_SAMPLED_IMAGE[4096], qualifying Apple Silicon MoltenVK and Android Turnip/Vulkan 1.1+ devices for the full GPU-driven world culling and Hi-Z path. - Persistent
VkPipelineCache: All 30+ graphics and compute pipelines share a vendor-, device- and UUID-validated on-disk pipeline cache (vk_pipeline_cache.bin), eliminating repeated SPIR-V-to-Metal (MSL/PSO) and mobile driver shader compilation stalls across launches. - TBDR-friendly MSAA and render passes: MSAA color and offscreen depth attachments use
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT/ lazily allocated memory withDONT_CAREstore ops, and empty particle splits are skipped so tile-based GPUs (Apple Silicon, Adreno, Mali) keep MSAA resolves on-chip instead of flushing full-resolution buffers to RAM.
Measured numbers#
Uncapped v0.3.0 vs. PinyonShift (same hardware)#
Uncapped FPS Comparison (Shift Engine v0.3.0 carview --bench vs. PinyonShift on identical hardware): - multivac (Ryzen 7 5800X + RTX 4080), 8-car race 720p no MSAA: 836.8 fps vs 119 fps (7.0x) - multivac (Ryzen 7 5800X + RTX 4080), 8-car race 1440p 4x MSAA: 574.0 fps vs 118 fps (4.9x) - multivac (Ryzen 7 5800X + RTX 4080), 8-car race 4K 4x MSAA: 437.6 fps vs 102 fps no MSAA (4.3x) - minivac (Apple M4 Pro, MoltenVK), 1440p 4x MSAA: 225.0 fps race / 211.2 fps free roam vs ~51 fps (4.1-4.4x) - Odin 2 Portal (Snapdragon 8 Gen 2 / Adreno 740), 720p smooth-60: 134.1 fps free roam / 103.6 fps race vs ~60 fps (1.7-2.2x) - blindvac (Core i5-8250U / Intel UHD 620), 8-car race 720p low-power: 79.5 fps vs 19.7 fps (4.0x)
Uncapped headless carview --bench runs on Shift Engine v0.3.0 (--bench-full-fx + --bench-audio + HUD enabled, 8–10 s per scenario after warmup, zero FPS cap or VSync) compared against PinyonShift's published measurements on the exact same four physical machines (multivac, minivac, Odin 2 Portal, and blindvac). Note that Shift Engine's headless benchmark omits swapchain presentation overhead, whereas PinyonShift's numbers are windowed/fullscreen captures (with PinyonShift CPU-bound on its draw recorder thread on desktop and GPU-bound on macOS, handheld, and iGPU).
| Device & hardware | Workload & resolution | Shift Engine v0.3.0 (uncapped) | PinyonShift (same device) | Speedup |
|---|---|---|---|---|
Desktop (multivac) — Ryzen 7 5800X, RTX 4080 (Win 11) | 8-car race, 720p (1x) no MSAA | 836.8 fps avg (1.16 ms p50) | 119 fps (8.41 ms) | 7.0× |
Desktop (multivac) — Ryzen 7 5800X, RTX 4080 (Win 11) | 8-car race, 1440p (2x) 4× MSAA | 574.0 fps avg (1.63 ms p50) | 118 fps (8.5 ms, 240 cap) | 4.9× |
Desktop (multivac) — Ryzen 7 5800X, RTX 4080 (Win 11) | 8-car race, 4K (3x) 4× MSAA (retail) | 437.6 fps avg (2.27 ms p50) | 102 fps (9.82 ms, no MSAA) | 4.3× |
Desktop (multivac) — Ryzen 7 5800X, RTX 4080 (Win 11) | 8-car race, 4K (3x) ultra (XeGTAO + SSR) | 153.9 fps avg (6.53 ms p50) | — | — |
macOS (minivac) — Apple M4 Pro, MoltenVK | Free roam, 720p (1x) 4× MSAA (retail) | 396.5 fps avg (2.53 ms p50) | 120 fps (8.35 ms, display cap) | 3.3×+ |
macOS (minivac) — Apple M4 Pro, MoltenVK | Free roam, 1440p (2x) no MSAA (low) | 261.6 fps avg (3.73 ms p50) | ~82 fps | 3.2× |
macOS (minivac) — Apple M4 Pro, MoltenVK | Free roam / 8-car race, 1440p (2x) 4× MSAA (retail) | 211.2 / 225.0 fps avg (4.64 / 4.38 ms) | ~51 fps (19.5 ms) | 4.1–4.4× |
macOS (minivac) — Apple M4 Pro, MoltenVK | 8-car race, 4K (3x) 4× MSAA (retail) | 128.4 fps avg (7.20 ms p50) | — | — |
Android (Odin 2 Portal) — Snapdragon 8 Gen 2, Adreno 740 | Free roam, 720p smooth-60 (2× MSAA) | 134.1 fps avg (7.50 ms p50) | ~60 fps (SMOOTH 60, Turnip) | 2.2× |
Android (Odin 2 Portal) — Snapdragon 8 Gen 2, Adreno 740 | 8-car race, 720p smooth-60 (2× MSAA) | 103.6 fps avg (9.45 ms p50) | ~60 fps (SMOOTH 60, Turnip) | 1.7× |
Android (Odin 2 Portal) — Snapdragon 8 Gen 2, Adreno 740 | 8-car race, 720p retail (4× MSAA) | 73.0 fps avg (13.47 ms p50) | ~52 fps (4× MSAA, Turnip) | 1.4× |
Laptop (blindvac) — Core i5-8250U, Intel UHD 620 (Win 11) | 8-car race, 720p low-power (no MSAA) | 79.5 fps avg (12.52 ms p50) | 19.7 fps (51 ms, Ultra Low 30) | 4.0× |
Laptop (blindvac) — Core i5-8250U, Intel UHD 620 (Win 11) | 8-car race, 720p low (shadows on) | 42.8 fps avg (23.34 ms p50) | 12.5 fps (76 ms, Low-spec 60) | 3.4× |
Desktop (multivac — Ryzen 7 5800X + NVIDIA GeForce RTX 4080)#
Windows 11, AMD Ryzen 7 5800X (8C/16T), 128 GB RAM, NVIDIA GeForce RTX 4080 (driver 621.14, Vulkan 1.4), Release build (v0.3.0), uncapped (10 s, 2 s warmup, full FX + audio):
| Scenario | Resolution & preset | Avg FPS | p50 FPS (ms) | 1% low | CPU p50 | GPU p50 | VRAM |
|---|---|---|---|---|---|---|---|
race_pack (8 cars) | 1280×720 low (1× MSAA) | 836.8 | 859.9 (1.16 ms) | 562.9 | 1.12 ms | 0.42 ms | 1,120 MiB |
race_pack (8 cars) | 1280×720 retail (4× MSAA) | 571.4 | 623.9 (1.60 ms) | 334.4 | 1.55 ms | 0.65 ms | 1,405 MiB |
race_pack (8 cars) | 1920×1080 high (4× MSAA) | 526.5 | 553.9 (1.81 ms) | 339.2 | 1.75 ms | 1.58 ms | 1,533 MiB |
race_pack (8 cars) | 2560×1440 retail (4× MSAA) | 574.0 | 615.2 (1.63 ms) | 267.9 | 1.58 ms | 1.24 ms | 1,600 MiB |
race_pack (8 cars) | 3840×2160 retail (4× MSAA) | 437.6 | 440.0 (2.27 ms) | 293.4 | 1.61 ms | 2.20 ms | 1,913 MiB |
race_pack (8 cars) | 3840×2160 ultra (4× MSAA + XeGTAO + SSR) | 153.9 | 153.1 (6.53 ms) | 132.7 | 2.36 ms | 6.50 ms | 2,225 MiB |
noon_cruise (free roam) | 1280×720 retail (4× MSAA) | 668.0 | 755.4 (1.32 ms) | 113.0 | 1.28 ms | 0.62 ms | 1,149 MiB |
noon_cruise (free roam) | 2560×1440 retail (4× MSAA) | 666.8 | 694.4 (1.44 ms) | 250.5 | 1.29 ms | 1.36 ms | 1,344 MiB |
noon_cruise (free roam) | 3840×2160 ultra (4× MSAA + XeGTAO + SSR) | 153.2 | 153.2 (6.53 ms) | 132.4 | 2.05 ms | 6.50 ms | 1,969 MiB |
cockpit_mirrors | 1920×1080 high (4× MSAA, 3-band mirrors) | 554.5 | 583.5 (1.71 ms) | 220.8 | 1.66 ms | 1.44 ms | 1,277 MiB |
Android Handheld (Odin 2 Portal — Snapdragon 8 Gen 2 / Adreno 740)#
AYN Odin 2 Portal (Android arm64, stock Qualcomm Adreno Vulkan driver 0676.53 over adb shell with -DSHIFT_ANDROID_EXECUTABLE=ON, v0.3.0, uncapped 8 s, 1.5 s warmup, full FX + audio). Note that these numbers were measured on the stock Qualcomm driver (CPU-culled gpu_world=0); in the APK build, bundled Mesa Turnip additionally unlocks GPU-driven world culling.
| Scenario | Resolution & preset | Avg FPS | p50 FPS (ms) | 1% low | CPU p50 | GPU p50 | VRAM |
|---|---|---|---|---|---|---|---|
race_pack (8 cars) | 1280×720 low-power (1× MSAA) | 138.3 | 140.5 (7.12 ms) | 79.6 | 2.01 ms | 6.98 ms | 361 MiB |
race_pack (8 cars) | 1280×720 smooth-60 (2× MSAA) | 103.6 | 105.8 (9.45 ms) | 83.7 | 2.28 ms | 9.45 ms | 409 MiB |
race_pack (8 cars) | 1280×720 performance-120 (2× MSAA) | 83.5 | 84.6 (11.83 ms) | 64.9 | 3.06 ms | 11.61 ms | 465 MiB |
race_pack (8 cars) | 1280×720 retail (4× MSAA + shadows) | 73.0 | 74.2 (13.47 ms) | 43.6 | 3.47 ms | 13.38 ms | 509 MiB |
race_pack (8 cars) | 1920×1080 quality-30 (4× MSAA) | 39.3 | 39.5 (25.30 ms) | 32.9 | 4.71 ms | 25.19 ms | 623 MiB |
race_pack (8 cars) | 1920×1080 ultra (4× MSAA + XeGTAO + SSR) | 20.0 | 20.1 (49.81 ms) | 9.9 | 6.22 ms | 49.63 ms | 769 MiB |
noon_cruise (free roam) | 1280×720 smooth-60 (2× MSAA) | 134.1 | 133.3 (7.50 ms) | 101.9 | 1.42 ms | 7.51 ms | 262 MiB |
noon_cruise (free roam) | 1280×720 retail (4× MSAA + shadows) | 116.3 | 118.1 (8.47 ms) | 66.4 | 1.99 ms | 8.66 ms | 354 MiB |
noon_cruise (free roam) | 1920×1080 quality-30 (4× MSAA) | 48.5 | 48.6 (20.59 ms) | 29.5 | 3.39 ms | 20.61 ms | 461 MiB |
Low-Spec Integrated GPU Laptop (blindvac — Core i5-8250U / Intel UHD 620)#
2017 laptop: Windows 11, Intel Core i5-8250U (4C/8T), 16 GB RAM, Intel UHD Graphics 620 (Vulkan 1.3.215, GPU-driven gpu_world=1), Release build (v0.3.0), uncapped (8 s, 1.5 s warmup, full FX + audio, 100.0% hitch-free across all six runs):
| Scenario | Resolution & preset | Avg FPS | p50 FPS (ms) | 1% low | CPU p50 | GPU p50 | VRAM |
|---|---|---|---|---|---|---|---|
race_pack (8 cars) | 1280×720 low-power (1× MSAA) | 79.5 | 79.8 (12.52 ms) | 72.6 | 2.15 ms | 12.40 ms | 1,248 MiB |
race_pack (8 cars) | 1280×720 low (1× MSAA + shadows) | 42.8 | 42.8 (23.34 ms) | 40.2 | 2.94 ms | 23.31 ms | 1,248 MiB |
race_pack (8 cars) | 1280×720 retail (4× MSAA + shadows) | 27.9 | 27.9 (35.82 ms) | 26.4 | 3.78 ms | 35.71 ms | 1,376 MiB |
noon_cruise (free roam) | 1280×720 low-power (1× MSAA) | 69.3 | 70.1 (14.27 ms) | 59.4 | 1.81 ms | 14.25 ms | 992 MiB |
noon_cruise (free roam) | 1280×720 low (1× MSAA + shadows) | 41.4 | 42.0 (23.82 ms) | 37.2 | 2.33 ms | 23.76 ms | 992 MiB |
noon_cruise (free roam) | 1280×720 retail (4× MSAA + shadows) | 27.7 | 27.9 (35.89 ms) | 24.1 | 3.27 ms | 35.84 ms | 1,376 MiB |
Apple Silicon (minivac — Mac mini M4 Pro / MoltenVK)#
Apple M4 Pro Mac mini (macOS, Vulkan on Metal via MoltenVK, Release build v0.3.0, uncapped 10 s, 2 s warmup, full FX + audio). On macOS, WorldGpu indirect draw is currently disabled (gpu_world=False) to work around MoltenVK indirect-buffer issues, yet direct CPU-culled submission holds 0.66–1.35 ms CPU p50 across every resolution up to 4K while TBDR transient MSAA and persistent VkPipelineCache keep 1440p 4× MSAA above 210 fps and 4K 4× MSAA above 128 fps under 1.32 GiB VRAM:
| Scenario | Resolution & preset | Avg FPS | p50 FPS (ms) | 1% low | CPU p50 | GPU p50 | VRAM |
|---|---|---|---|---|---|---|---|
race_pack (8 cars) | 1280×720 low (1× MSAA) | 516.9 | 519.5 (1.93 ms) | 275.3 | 0.76 ms | 1.89 ms | 730 MiB |
race_pack (8 cars) | 1280×720 retail (4× MSAA) | 378.7 | 387.4 (2.58 ms) | 96.7 | 0.87 ms | 2.56 ms | 804 MiB |
race_pack (8 cars) | 1920×1080 high (4× MSAA) | 159.2 | 160.5 (6.23 ms) | 103.3 | 1.21 ms | 6.22 ms | 932 MiB |
race_pack (8 cars) | 2560×1440 low (1× MSAA) | 260.9 | 264.2 (3.78 ms) | 121.5 | 1.10 ms | 3.78 ms | 780 MiB |
race_pack (8 cars) | 2560×1440 retail (4× MSAA) | 225.0 | 228.2 (4.38 ms) | 116.2 | 1.12 ms | 4.39 ms | 996 MiB |
race_pack (8 cars) | 3840×2160 retail (4× MSAA) | 128.4 | 138.9 (7.20 ms) | 15.9 | 1.35 ms | 7.17 ms | 1,315 MiB |
noon_cruise (free roam) | 1280×720 retail (4× MSAA) | 396.5 | 395.5 (2.53 ms) | 289.8 | 0.75 ms | 2.53 ms | 804 MiB |
noon_cruise (free roam) | 2560×1440 low (1× MSAA) | 261.6 | 268.1 (3.73 ms) | 141.1 | 0.66 ms | 3.78 ms | 524 MiB |
noon_cruise (free roam) | 2560×1440 retail (4× MSAA) | 211.2 | 215.6 (4.64 ms) | 88.8 | 0.80 ms | 4.69 ms | 996 MiB |
cockpit_mirrors | 1920×1080 high (4× MSAA, 3-band mirrors) | 168.7 | 170.0 (5.88 ms) | 87.9 | 0.94 ms | 5.91 ms | 934 MiB |
Steam Deck (earlier baseline)#
Earlier 60-second 1280×720 free-roam cruise measurement (carview --drive --bench, 3,601 frames) on Steam Deck LCD (AMD Van Gogh, RADV, SteamOS 3.7, low preset at powersave clocks): GPU 2.9 / 3.6 / 13.8 ms (p50/p95/max), CPU 2.85 / 3.9–4.05 ms (p50/p99).
Historical desktop optimization baseline (aa0fb579 → e1400b72)#
Earlier single-pass optimization comparison on multivac (Ryzen 7 5800X + RTX 4080, MSVC Release, --render-scale 0):
| Scenario | Before (aa0fb579) | After (e1400b72) | Improvement |
|---|---|---|---|
1080p low-power | CPU 1.14 / 6.71 ms, GPU 0.55 ms, VRAM 639 MiB | CPU 0.41 / 0.84 ms, GPU 0.31 ms, VRAM 323 MiB | 2.8× CPU p50, 8.0× CPU p99, −49% VRAM |
1080p high (4× MSAA) | CPU 1.58 / 6.61 ms, GPU 0.90 ms, VRAM 749 MiB | CPU 0.70 / 1.37 ms, GPU 0.68 ms, VRAM 553 MiB | 2.3× CPU p50, 4.8× CPU p99, −26% VRAM |
4K high (3840×2160) | CPU 1.54 / 4.40 ms, GPU 2.49 ms, VRAM 1,331 MiB | CPU 0.73 / 2.69 ms, GPU 2.04 ms, VRAM 943 MiB | 2.1× CPU p50, −0.45 ms GPU, −29% VRAM |
4K ultra (SSAO + FXAA) | CPU 2.05 / 10.04 ms, GPU 3.28 ms, VRAM 1,331 MiB | CPU 0.75 / 1.54 ms, GPU 2.69 ms, VRAM 1,045 MiB | 2.7× CPU p50, 6.5× CPU p99, −0.59 ms GPU |
| 1080p cockpit (3-band mirrors) | CPU 2.72 / 9.92 ms, GPU 1.22 / 21.30 ms, VRAM 749 MiB | CPU 0.81 / 3.25 ms, GPU 1.00 / 1.80 ms, VRAM 556 MiB | 3.4× CPU p50, 11.8× GPU p99 |
1080p 8-car race (FR22) | CPU 4.48 / 17.38 ms, GPU 1.49 / 26.07 ms, VRAM 864 MiB | CPU 1.16 / 1.72 ms, GPU 0.97 / 2.47 ms, VRAM 667 MiB | 3.9× CPU p50, 10.1× CPU p99, 1.54× GPU |
| 1080p 240 km/h streaming (20 s) | CPU 1.73 / 8.49 ms (23.9 ms hitch), GPU 0.78 ms | CPU 0.74 / 1.29 ms (0 stream hitch), GPU 0.59 ms | 2.3× CPU p50, 6.6× CPU p99, 0 hitch |
| Cold / warm startup (Colorado) | 11.18 – 13.51 s | 3.91 s cold / 3.74 s warm (vk_pipeline_cache.bin) | 3.0–3.4× faster |
Car switch (R34 → DBS) | ~11,500 – 12,600 ms | 212.8 ms (535 textures & 4,556 GPU draws kept) | 54–59× faster |
Presets and scaling#
| Preset | Intended hardware | Key defaults |
|---|---|---|
retail | Default on desktop & Steam Deck | 1:1 Xbox 360 parity: 4× MSAA, 4× AF, 2-cascade shadows, bloom on, SOTA overlays off |
low-power | Mobile / handheld low-wattage, integrated GPUs | 1× MSAA, 540p + VRS on Android, shadows and bloom off, compact world arena and LRU |
performance-120 | High-refresh handhelds & Android 120 Hz | 2× MSAA, 540p CAS + VRS on Android, 120 Hz display pacing + ADPF, 1024 2-cascade PCF shadows, bloom on |
smooth-60 | Default on Android handhelds; Steam Deck 60 fps | 2× MSAA, 720p CAS + VRS on Android, 1024 2-cascade PCF shadows, bloom on, quarter-rate reflections |
low | Integrated GPUs, older laptops | 1× MSAA, reduced shadow and reflection budgets |
quality-30 | Handheld 30 fps quality mode | 4× MSAA, low shadows, bloom on, quarter-rate reflections |
high | Mainstream desktop GPUs (1080p–4K) | 4× MSAA, cascaded shadows, full world draw distance, bloom, SOTA passes |
ultra | High-end desktop GPUs & showcase OLED | Full resolution, XeGTAO, Hi-Z SSR, FXAA, highest shadow draw distance and cubemap budgets |
Modifying any individual graphics option automatically switches the active preset to custom. Render scale (--render-scale), Shadow Draw Distance (Low through Ultra / Extended, including extended Mid/Far cascade & tree shadow range), CAS / FSR1 / TAAU / Apple MetalFX upscaling (and macOS 26+ MetalFX Frame Interpolation), live MSAA (Off/2x/4x), LOD controls, and Variable Rate Shading (--vrs, measured -18% GPU time at 1080p on RTX 4080) can be toggled live from the Settings overlay (F6) or settings.txt.
Running benchmarks#
carview embeds seven deterministic scenarios (noon_cruise, midnight_lights, cockpit_mirrors, race_pack, autoshow_studio, ui4_heavy, cold_boot_switch) and writes JSON schema v1 reports and per-frame CSV traces. tools/benchmark.py orchestrates suites locally or over SSH with zero external Python dependencies:
# Validate the benchmark script itself (no game files needed)
python tools/benchmark.py --self-test
# Run a quick local suite (noon_cruise + ui4_heavy)
python tools/benchmark.py run \
--bin build/apps/carview/carview \
--play /path/to/play \
--suite quick \
--device-label "Desktop RTX 4080" \
--out out/benchmarks/desktop
# Run remotely on a macOS Apple Silicon host or Steam Deck over SSH
python tools/benchmark.py run \
--remote mac-host \
--bin ~/shift-engine/build/apps/carview/carview \
--play ~/shift-play \
--suite standard \
--device-label "Apple M4 Pro (MoltenVK)" \
--out out/benchmarks/m4_pro
# Generate a side-by-side Markdown report and self-contained HTML dashboard
python tools/benchmark.py compare \
out/benchmarks/desktop/suite.json \
out/benchmarks/m4_pro/suite.json \
--out out/benchmarks/comparison.md \
--html out/benchmarks/comparison.html
See docs/BENCHMARK.md for the full JSON schema v1 field list, Android adb commands and direct carview flags.