upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/cpu_features.md
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 16:38:20 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 16:38:20 -0500
commitc116c3fa28983444cd47feea0461e1e7eaac83b5 (patch)
treef2f4821b744b678f0cf1ce98638e981ea737b0c6 /docs/cpu_features.md
parent5866d6974e86fc2d39e6ce0691af63b354f6c8b9 (diff)
parent24d8af66af151f024b0b520fb397d899924f5486 (diff)
Merge main into t-drive-overlay
docs/boot.md: main added LEONIDA_WRITE_DIR / LEONIDA_SAVE_DIR to the --overlay bullet and a new "Under Wine on Linux" section; keep both and the T: paragraph of this branch after main's sentences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/cpu_features.md')
-rw-r--r--docs/cpu_features.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/cpu_features.md b/docs/cpu_features.md
index 4b72ca2f5..47ffd81dc 100644
--- a/docs/cpu_features.md
+++ b/docs/cpu_features.md
@@ -58,7 +58,33 @@ in the image.
58 `insertq`/`extrq` are bit-field operations on the low quadword. `cpu_emulation_test` checks each form against the 58 `insertq`/`extrq` are bit-field operations on the low quadword. `cpu_emulation_test` checks each form against the
59 CPU on a host that has it and against the handler on one that does not (an i7-10700K: all four lacking, all checks 59 CPU on a host that has it and against the handler on one that does not (an i7-10700K: all four lacking, all checks
60 pass). 60 pass).
61- The CLZERO routine is too hot for the #UD path: one exception and two `VirtualQuery` calls per 64-byte line. On an
62 i9-13900K the routine held one thread at ~99% for the whole boot (sampled: `VirtualQuery` under
63 `cpu_emulation::apply`) and the title presented ~3 frames a second. On a CPU without CLZERO the loader therefore
64 rewrites the routine's loops before any image code runs (`runtime/src/clzero_patch.h`): each of the two loop shapes
65 (6 + 4 sites) jumps to a stub within 2 GiB of the image that zeroes the line with eight 8-byte stores and keeps the
66 loop's registers and flags. Same boot afterwards: 164,946 PresentX in 300 s against 869 in 420 s, no CLZERO left on
67 the #UD path. `LEONIDA_CLZERO_PATCH=0` keeps the emulation; `clzero_patch_test` runs both shapes on any CPU.
61- The CPUID sites see the host's vendor, family and features, not the console's. What the game does with the 68- The CPUID sites see the host's vendor, family and features, not the console's. What the game does with the
62 answers is not measured here. 69 answers is not measured here.
63 70
64Not measured: which of these sites a boot reaches, and in which order. 71Not measured: which of these sites a boot reaches, and in which order.
72
73### Hosts without AVX
74
75Measured on one host: Intel Xeon X5675 (Westmere, SSE4.2; no AVX, AVX2, FMA, BMI2 or XSAVE), Fedora 44,
76`wine-11.21 (Staging)`, Intel SDE 10.13.1, and a local `gta6rt.exe` build from 2026-11-24.
77
78- **What works without AVX:** building the native Linux runtime and Vulkan test tools (`ctest`), running the Vulkan GPU
79 suite (`scripts/run_gpu_tests.py`), shader translation and asset export (`make_game.py` stages).
80- **Running `gta6rt` directly:** `--init` and `--run` exit 4 at the AVX preflight. With `LEONIDA_SKIP_CPU_CHECK=1`,
81 the preflight is skipped and the guest faults on its first AVX instruction.
82- **Under Intel SDE (`sde64 -hsw`):** without `-chip_check_disable 1`, SDE aborts on `clzero` instead of raising
83 `SIGILL` for `gta6rt`'s handler. With `-chip_check_disable 1`, the guest passes its first AVX instruction and reaches
84 `InitializeApiImplEx2` (offline) after ~110 s, then stops before any window or D3D12 call: SDE traps an `int 3`
85 without `-raise-int3`, and with `-raise-int3` the process terminates with `SIGSEGV` (`LEONIDA_SKIP_INT3=1` with
86 `--trace` did not change this, recording `0` `int3_skipped` events). Adding `-ptr-raise` causes Pin to abort with an
87 internal instrumentation error under Wine's exception handling.
88- **Outcome on this host:** no useful path to boot `gta6rt --run` was found under SDE + Wine.
89
90Not measured: other emulators (such as QEMU TCG with AVX2) or Rosetta 2.