<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/runtime/src/main.cpp, branch main</title>
<subtitle>[no description]</subtitle>
<id>https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=main</id>
<link rel='self' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/'/>
<updated>2026-11-29T12:55:11+00:00</updated>
<entry>
<title>runtime: LEONIDA_SKIP_ASSERTS steps over guest asserts without a trace (RT-526)</title>
<updated>2026-11-29T12:55:11+00:00</updated>
<author>
<name>slipperysquid</name>
<email>coleseto123@gmail.com</email>
</author>
<published>2026-11-24T23:11:17+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=528e0862f2dc3411a66d30501b8f8670ddd0d88c'/>
<id>urn:sha1:528e0862f2dc3411a66d30501b8f8670ddd0d88c</id>
<content type='text'>
A diagnostic for the retail boot (RT-5 follow-ups), off the hot path and with no behaviour change unless asked
for: LEONIDA_SKIP_ASSERTS=N (src/assert_skip.h, installed by main.cpp before any image code runs under
--init/--run): a vectored handler, added last, steps over up to N int3 (0xCC) at addresses in no host module and
logs each one as module+RVA (and as an int3_skipped trace event when --trace is open). After N it says so once
and the next int3 ends the run as before. An int3 in a host module, a breakpoint with no 0xCC at its address, or
a RIP that is neither at nor one past the 0xCC is passed on. Needs no --trace and no debugger.

Tests (synthetic, no game files): assert_skip_test (int3 in a VirtualAlloc'd page, the limit, a host-module int3,
a two-byte int 3, value parsing) and run_tiny_game_skip_asserts (two int3 in the mapped stand-in game, stepped
over end to end).

Carried over from old upstream PR 9961 (#228) without its caller logging for forwarded device slots, which the
carry-over of old PR 9990 (#1390) brings instead.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge pull request #1390 from Diegobecker07/old-9990-slot-caller</title>
<updated>2026-11-29T08:10:05+00:00</updated>
<author>
<name>MoonEyes</name>
<email>ducoinbenjamin@yahoo.fr</email>
</author>
<published>2026-11-29T08:10:05+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=02c3ef96d197ff759398a5d373c0ce02b688f6a5'/>
<id>urn:sha1:02c3ef96d197ff759398a5d373c0ce02b688f6a5</id>
<content type='text'>
d3d12_xs: the first call of a forwarded device slot names its caller (OLD-9990, RT-526)</content>
</entry>
<entry>
<title>runtime(cpu): emulate F16C, FMA3 and AVX2 via XSTATE_AVX on AVX1 hosts</title>
<updated>2026-11-27T21:49:10+00:00</updated>
<author>
<name>robot00f</name>
<email>robot00f@users.noreply.github.com</email>
</author>
<published>2026-11-26T04:08:55+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=b6e51b737674beebef48d4945a474aa38c862eed'/>
<id>urn:sha1:b6e51b737674beebef48d4945a474aa38c862eed</id>
<content type='text'>
Add runtime/src/avx2_emulation.h and wire it into gta6rt so pre-Haswell AVX1 +
SSE4.2 CPUs (Intel Sandy Bridge and Ivy Bridge) can execute the game's vector
Haswell instruction delta using the host's native 256-bit YMM0..YMM15 state:

- Read and write 256-bit YMM registers through CONTEXT::FltSave.XmmRegisters
  (bits [127:0]) and LocateXStateFeature(XSTATE_AVX) (bits [255:128]), zeroing
  YMM[dst][255:128] on every 128-bit VEX register write and zero-initializing
  untouched upper lanes when transitioning XSTATE_MASK_AVX from clean (0).
- Emulate F16C (vcvtph2ps, vcvtps2ph with RN/RD/RU/RZ and MXCSR rounding), all
  60 FMA3 forms (132/213/231 packed 128/256, scalar ss/sd preserving [127:32] /
  [127:64], and alternating fmaddsub/fmsubadd) via single-rounding std::fmaf /
  std::fma, and AVX2 (256-bit integer SIMD promotions, register/memory
  vbroadcastss/sd/i128 and vpbroadcastb/w/d/q, vinserti128, vextracti128,
  vperm2i128, vpermq, vpermpd, vpermd, vpermps, vpblendd/w/vb, vpsllv*/vpsrlv*/
  vpsravd, vpmovsx*/vpmovzx*, vpmovmskb, and per-lane fault-accurate
  vpmaskmovd/vpmaskmovq).
- Add runtime/test/avx2_emulation_test.cpp covering IEEE-754 F16C conversions,
  VEX decoding, XSTATE_AVX + VPMASKMOVD page-boundary semantics, and live
  256-bit YMM execution on hardware.

Depends on: #2190
Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181466437
AI-assisted: yes (Antigravity, Gemini 4 Carbon)
</content>
</entry>
<entry>
<title>runtime(cpu): emulate BMI1, BMI2, MOVBE and patch LZCNT/TZCNT on AVX1 hosts</title>
<updated>2026-11-27T21:49:03+00:00</updated>
<author>
<name>robot00f</name>
<email>robot00f@users.noreply.github.com</email>
</author>
<published>2026-11-26T03:56:49+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=66ef2bd689a9e273697d2143e082c3288ae81481'/>
<id>urn:sha1:66ef2bd689a9e273697d2143e082c3288ae81481</id>
<content type='text'>
Add runtime/src/bmi_emulation.h and wire it into gta6rt and Loader::protect_sections
so pre-Haswell AVX1 + SSE4.2 CPUs (Intel Sandy Bridge and Ivy Bridge) can execute
the game's integer Haswell/ABM instruction delta:

- Decode and emulate VEX-encoded BMI1 (andn, bextr, blsi, blsmsk, blsr), BMI2
  (bzhi, mulx, pdep, pext, rorx, sarx, shlx, shrx), and legacy 16/32/64-bit MOVBE
  on STATUS_ILLEGAL_INSTRUCTION (#UD), using SEH-guarded non-inlined __movsb copies
  so valid pages take zero syscalls while xmem first-touch, write-watched shadow
  pages, read-only faults and unmapped faults behave like native accesses.
- Patch non-faulting legacy TZCNT (F3 0F BC) and LZCNT (F3 0F BD) before executable
  sections are protected by walking .pdata functions and 0xCC-delimited leaf
  routines: &gt;=5-byte 32/64-bit register sites jump to branchless BSF/BSR + CMOV +
  BT stubs within 2 GiB, and 4-byte, 16-bit or memory sites become UD2 (0F 0B)
  backed by a side-table for the #UD handler (configurable via LEONIDA_LZCNT_PATCH).
- Add runtime/test/bmi_emulation_test.cpp covering decoding, synthetic CONTEXT
  application, immediate byte-trap rejection, stub/UD2 flag consumers, and live
  execution on hardware.

Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181466437
AI-assisted: yes (Antigravity, Gemini 4 Carbon)
</content>
</entry>
<entry>
<title>compile gate: `auto` default, calibrated at device creation</title>
<updated>2026-11-27T12:24:49+00:00</updated>
<author>
<name>OreoFR</name>
<email>29048345+OreoFR@users.noreply.github.com</email>
</author>
<published>2026-11-27T12:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=1d7c662b4bf2870d600da56452d53fbaff295a52'/>
<id>urn:sha1:1d7c662b4bf2870d600da56452d53fbaff295a52</id>
<content type='text'>
With LEONIDA_COMPILE_GATE unset or `auto`, the device measures the driver once
before the VulkanContext exists: a worker creates a synthetic compute pipeline
(SPIR-V written in code, new specialization seed each run, no pipeline cache)
while the queue gets empty submissions waited on a fence. Quick submissions with
the create still in the driver give the adaptive gate; a held one, a create too
fast to tell, an unexplained slow submission or any failure give classic. The
verdict is cached per vendor/device/driver/pipelineCacheUUID in
compile_gate_calibration.txt beside the pipeline cache;
LEONIDA_COMPILE_GATE_RECALIBRATE=1 measures again. Only the title process
calibrates; build hosts and tests keep classic. `classic`, `adaptive`, `1`, `0`
still force a mode.

Tests: compile_gate_policy_test (no GPU: settings, NVIDIA version decode,
verdicts, cache file, SPIR-V shape) and vk_compile_gate_calibration_test (GPU:
a verdict within 20 s, adaptive on NVIDIA 621.40).

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>d3d12: --precompile-pipelines builds the skip-listed programs unless --skip-listed</title>
<updated>2026-11-26T17:40:56+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T17:36:34+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=76109561f4e392fd0da97a2d4b936b35c83e821a'/>
<id>urn:sha1:76109561f4e392fd0da97a2d4b936b35c83e821a</id>
<content type='text'>
LEONIDA_SKIP_COMPUTE is a play-time setting: the game drops the listed programs' dispatches. The precompile also
refused to build them, one "not built (LEONIDA_SKIP_COMPUTE)" line each and no override. Players run it with the
game's environment (docs/running.md), so their skip list kept those programs out of the journal for good, and a later
run without the list compiled them in the game.

- precompile_compute_pipelines builds every compute entry; with the list set it says how many entries it names.
  --skip-listed leaves them out on purpose, one line each.
- The last line counts the whole run: built (compiled, from a cache), journaled already, being built by another
  process, failed; left out: of those the list names, not buildable, filtered out (--filter, the size bounds and now
  --limit too).
- BuildHost::unbuildable no longer checks the list. The compile server checks it itself, as before: the game that
  starts it drops those dispatches.

Docs: running.md, linux_proton.md and d3d12_vulkan.md no longer give compile time as the reason for the skip list.
The 89-167 s per program came from wave64-emulated packs; with a native wave64 pack on an RX 7900 XTX (RADV, Mesa
26.3.1, Wine) all 721 library programs of 2 MiB or more built, 360 of them in 170 s on 32 threads, 2.5-32 s each, the
largest (13 MiB) in 28.5 s alone, at a peak of 14 GiB of RAM. Two world runs on that card with all of them journaled
and no skip list took them all from the journal and got no further than runs with the list (a stop with the GPU
idle at 404 s; an idle-queue device loss at about 214 s, which also happens with the list set). Their output is
not checked, so the docs keep the skip list and LEONIDA_RT_AS=off as the setting of our longest runs.

Test: precompile_skip_list (test/check_precompile_skip_list.cmake) precompiles two synthetic compute modules, one of
them listed, three times: with the list set both are built; with --skip-listed only the other one is, and the listed
one is named; a second run into the first journal finds both journaled. It fails on main.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Keep main's watchdog switch and say where the peek default went</title>
<updated>2026-11-26T02:55:15+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T02:55:15+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=7b1fe62850f69bc3ad0b3176aea8dda8168867ea'/>
<id>urn:sha1:7b1fe62850f69bc3ad0b3176aea8dda8168867ea</id>
<content type='text'>
f0611b752 took the executable's addresses out of the code. Two behaviours
changed with it; the removal stays, the changes are now explicit:

- runtime/src/main.cpp: the watchdog kick runs again only with
  LEONIDA_TITLE_WATCHDOG=0, as on main; LEONIDA_TITLE_WATCHDOG_KICK only
  supplies the two RVAs it needs. Either variable alone leaves the
  watchdog armed and the loader says so once (before this commit the kick
  ran whenever LEONIDA_TITLE_WATCHDOG_KICK was set).
- scripts/windows-boot/boot.ps1 no longer has the game- and
  session-state RVAs built in, so LEONIDA_PEEK has no default and the
  RESULT states read "?" unless LEONIDA_GAME_STATE_RVA and
  LEONIDA_SESSION_STATE_RVA are set. The script now warns when they are
  not, and runtime/README.md (LEONIDA_PEEK, LEONIDA_TITLE_WATCHDOG and
  _KICK rows), scripts/windows-boot/README.md and docs/first_run_ui.md
  say so.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge main into integration/boot-combined (RT-BOOT-COMBINED)</title>
<updated>2026-11-26T02:49:53+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T02:49:53+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=8d686309b0617e1a561c0404b8b79e6176385664'/>
<id>urn:sha1:8d686309b0617e1a561c0404b8b79e6176385664</id>
<content type='text'>
Conflict in runtime/shims/d3d12_xs_device.cpp, proxy_copy_descriptors_simple:
keep this branch's copy_null_rtv_marks call and main's fsdraw::enabled()
gate for the descriptor-copy diagnostic.

tools/rdna2spirv.py merged without a textual conflict, but #1662 on main
calls restore_dot4_inline_sel in the exact re-anchoring path, which this
branch had deleted. The merge puts main's function back so that call
resolves; the next commits reconcile it with the dot4 op_sel rule.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge main c1e1ef0b8 into RT-POST-LOAD-GPU-MEMORY (#2098)</title>
<updated>2026-11-25T23:36:19+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-25T23:36:19+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=3a2820b3bff812ff3cff6a4d4087912edb0541bb'/>
<id>urn:sha1:3a2820b3bff812ff3cff6a4d4087912edb0541bb</id>
<content type='text'>
Two conflicts:

- d3d12_com.cpp, note_direct_heap_indexing: main's console_descriptor_table_va(cbv_srv_uav_base_) for the tracked
  table, with this branch's per-site once() flag instead of note_once on every draw.
- d3d12_vulkan_device.cpp, PipelineState::build_compute: this branch's body (build_compute_pipeline, journal, compile
  helper). main's dev_status::Build around the compute create moves into build_compute_pipeline, next to the
  pipeline_profile::DriverCall, so the status line still names the compute pipeline in the driver.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge pull request #2137 from Snooozs/dev-overlay</title>
<updated>2026-11-25T23:02:32+00:00</updated>
<author>
<name>aslan2142</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-25T23:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=ffcfe68f12891826a2b15e19f31149d8bb44e778'/>
<id>urn:sha1:ffcfe68f12891826a2b15e19f31149d8bb44e778</id>
<content type='text'>
runtime: LEONIDA_DEV_OVERLAY shows what the runtime is doing over the title's window (RT-DEV-OVERLAY)</content>
</entry>
</feed>
