The entry stub's RUNTIME_FUNCTION now ends before its final jmp [r10], so a stack walk there finds the return
address. The writer lock is taken with a 10 ms bound: a dropped record is counted and the next one writes
`# dropped <count>`. The next view is mapped ahead so a failed remap still ends the file in `# truncated`.
title_free_impl and create_file_w take the caller from the exported shim; a failed VirtualProtect deletes the
function table; pe_loader builds the module name only when tracing. Rules: 205, hash 873cd3bb78a70bc5.
Tested: full runtime build passes; ctest on the 149 non-GPU tests: 100% tests passed, 0 tests failed out of 149; xmem alone: 1/1 passed; xs_proxy_mock|xmem_: 100% tests passed, 0 tests failed out of 13; python -I tests/test_call_trace_rules.py OK. Not run in game.
LEONIDA_CALL_TRACE=<path> (cap LEONIDA_CALL_TRACE_MAX_MB, default 4096) records every call through the import
tables of the main image and the title DLLs in the shared v1 format, with the rules of tools/call_trace_rules.def.
Each import slot gets a 24-byte thunk to one of two common stubs (entry-only: jump, real return address; wrap: frame,
C and R lines), registered with RtlAddFunctionTable. The file is created new, written through 4 MiB mapped views.
Shims read their caller through RT_CALLER(), which sees through the wrap frame; unset, wrap() returns its target.
runtime/test/call_trace_test.cpp (ctest call_trace) and tests/test_call_trace_rules.py cover it.
Tested: full runtime build (RelWithDebInfo) passes; ctest on the 149 non-GPU tests that cannot open a Vulkan device or window: 100% tests passed, 0 tests failed out of 149; python tests of the rules, line endings, docs env vars pass. Not run in game.
timing_wanted() looked only at the periodic line and the dev overlay, so with
LEONIDA_SUBMIT_PHASES_SECONDS=0 the frame and floor lines (on every
LEONIDA_SUBMIT_FRAME_SECONDS, 10 s by default) were printed with zero phase
times (found by merzleckeier on #2738). They read the phase times too, so they
now count as a consumer. The new test turns the periodic line off before the
first read and checks that scopes stay timed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Current main after #2566. New conflict on top of the earlier carry merge:
runtime/CMakeLists.txt: main added the title_frames, title_mirror_hooks and
title_heap tests at the place of the PR's value_write_sink test; all kept,
the PR's test after main's.
Co-authored-by: abnalstlll-byte <284980532+abnalstlll-byte@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#778 filled the sample-locations grids from 1 sample upwards, so every 1x depth-stencil image was created
sample-locations compatible and carried sample locations through its transitions. D3D12 only has programmable
sample positions for multisampled targets; since #778 the world phase loses the device on an RTX 5080. Keep 1 sample
out (SamplePositions::programmable_count): 1x depth images are plain again, MSAA keeps the feature.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gt9hwPPpwX5RYWwXCnj43U
d3d12_vulkan: without Resizable BAR, textures and staging buffers leave the BAR window to the arena; tile heaps prefer VRAM (RT-ALLOC-NO-REBAR-RETRIES)
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 <noreply@anthropic.com>
submit_phases: main's nested-phase Scope kept; the PR's skip now applies only when nothing reads the times (timing_wanted(): period 0 and LEONIDA_DEV_OVERLAY not 1).
Co-authored-by: Ilyass Roussi <76879547+IlyassRS3@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d3d12_vulkan_device: report_pipeline_cache_growth() before main's over_save_limit check, note_pipeline_cache_size() before main's journal setup. Docs: main's paragraph, then the PR's growth-stall text without its old 256 MiB cap line.
Co-authored-by: Galaxy <23423870+thegalaxydev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Xbox console list slot 129 (DispatchMesh -> PC slot 79) was silently dropped as unforwarded, skipping all direct mesh-shader 3D-to-UV ped/decoration texture bakes and leaving 9/10 BC3_UNORM_SRGB (and BC7/BC1) composited textures 100% all-zero on the GPU.
Forward list slot 129 -> PC 79 (DispatchMesh) with bundle deferral and z==0 draw guard, forward live query slots 28..30 -> PC 52..54 (BeginQuery/EndQuery/ResolveQueryData, updating kConsoleBeginQuery/kConsoleEndQuery), implement CopyMemoryToMemoryX (slot 62, older layout slot 60) via VA-based CopyMemory replay with split-chunk and overlap-staged copies, and add replay + mock unit tests.
- U1b: track depth_writes/stencil_writes on GraphicsPipeline so writable DSVs bound with DepthWriteMask=ZERO PSOs stay in GENERAL and decompress RADV HTILE
- T3: reject WORD4 reserved bits (0x6000C000) and fmt==0 as not_tsharp, gate 3D UAV slice check after owner lookup, and cap tsharp-refuse per reason (<8)
- Stage linking: add runtime/src/spirv_stage_link.h + unit tests and wire into create_graphics / lazy stage_words to remap PS Input Locations via FSSM + DXBC OSG1/PSG1/ISG1