Commit Graph

12974 Commits

Author SHA1 Message Date
435d7541fe dstorage: harden staging_bytes overflow and StagingPool::Lease reuse 2026-11-25 19:11:10 +01:00
b9320a118d Merge pull request #1812 from kirigayakazima/fix/bcpack-bptc-safety
tools: harden bcpack_tables_bptc.py section validation, bounds and file cache
2026-11-25 18:36:10 +01:00
360c728bde Merge pull request #1793 from kirigayakazima/fix/ps-helper-probe-safety
tools: guard ps_helper_probe.py empty coverage and atomic --json writes
2026-11-25 18:35:17 +01:00
fd33a31a22 Merge pull request #1815 from kirigayakazima/fix/script-qtable-atomic-json
tools: make script_qtable.py --json writes atomic and validate paths and hex stems
2026-11-25 18:34:28 +01:00
1f62a9c368 Merge pull request #1817 from kirigayakazima/fix/gamedata-sps1-atomic-json
tools: make gamedata_sps1.py --json writes atomic, validate paths and avoid duplicate index read
2026-11-25 18:33:39 +01:00
da4ce8c273 Merge pull request #1849 from DadaCap/console-fix-no-null
d3d12: changed console heap slots are fixed without a time limit by default, not given to shaders as null (RT-CONSOLE-FIX-BUDGET-NULL)
2026-11-25 18:33:19 +01:00
a8266e3f8a Merge pull request #1852 from kirigayakazima/fix/int-hw-probe-safety
tools/int_hw_probe: write --json atomically and reject trailing-separator paths
2026-11-25 18:32:42 +01:00
082ebe4406 Merge pull request #1853 from kirigayakazima/fix/ab-control-flow-safety
tools/ab_control_flow: handle UTF-8-SIG/CRLF inputs, subprocess encoding and atomic outcomes.tsv
2026-11-25 18:31:39 +01:00
863c1616ac Merge pull request #1791 from Ch1mpleo/carry/old-9862
tests: reject identical fenced blocks that are back to back in docs/ (OLD-9862)
2026-11-25 18:30:39 +01:00
b0e11f234a Merge pull request #1807 from kirigayakazima/fix/pal-stages-safety
tools: handle corrupt XBCH zlib, case-insensitive extensions and index errors in pal_stages.py
2026-11-25 18:29:48 +01:00
aeec1ddc6f Merge pull request #1850 from cheltyi/fix/gamedata-empty-typed-objects
gamedata_reader: preserve empty polymorphic objects (GAMEDATA-EMPTY-TYPED-OBJECTS)
2026-11-25 18:28:59 +01:00
6ade9f225b Merge pull request #1857 from thiefyzheng/fix/build-stages-exception-diag
make_game: report a stage that raises instead of failing silently (BUILD-STAGES-EXCEPTION-DIAG)
2026-11-25 18:28:06 +01:00
fe1553456f Merge pull request #808 from whoalin1/shader-structured-pc-unwrap
cfg_structure / rdna2spirv: unwrap tautological %pc guards in structured CFGs (ms_wave_info_s3 AMD crash, SHADER-STRUCTURED-PC-UNWRAP)
2026-11-25 17:46:31 +01:00
9e7720c9e7 Merge pull request #1893 from OreoFR/rt-depth-format-copy-staged
replay: copies between depth formats that differ go through transfer scratch (RT-DEPTH-FORMAT-COPY-STAGED)
2026-11-25 17:19:44 +01:00
b0f3d3998f Merge pull request #1631 from Tyrannys/title-window-overflow
d3d12: test that a view past the title-window cap is never the raw VA (RT-TITLE-WINDOW-OVERFLOW)
2026-11-25 15:52:34 +01:00
3d4f661238 Merge pull request #1192 from GGandCo/fix/host-import-prefix
d3d12: preserve offsets in sub-page host buffer imports (RT-HOST-IMPORT-PREFIX)
2026-11-25 15:49:35 +01:00
daf31b820b replay: copies between depth formats that differ go through transfer scratch (RT-DEPTH-FORMAT-COPY-STAGED)
A CopyTextureRegion of the depth plane from a D32_SFLOAT_S8_UINT image into a
D32_SFLOAT one was replayed as vkCmdCopyImage. Vulkan requires depth/stencil
formats to match exactly (VUID-vkCmdCopyImage-srcImage-01548), and the NVIDIA
driver (RTX 4070 Laptop, 621.40) wrote past the end of the D32 image: the
world-start WRITE_INVALID device loss, with the fault at the first byte after a
2560x1440 D32_SFLOAT image (VK_EXT_device_address_binding_report) and this VUID
reported by the validation layer just before the loss.

depth_format_pair: two depth formats with the same depth encoding but not the
same VkFormat (D32 / D32S8, D16 / D16S8, X8_D24 / D24S8) take the image ->
scratch -> image path depth <-> colour and A8 copies already use; the depth
aspect has the same texel layout in a buffer on both sides.

replay_copy_offset_test: the D32S8 -> D32 and D32 -> D32S8 depth-plane copies
are staged (no vkCmdCopyImage, depth aspect, 4 bytes a texel), and D32 -> D32
keeps vkCmdCopyImage. Fails without the change (6 checks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:48:26 +01:00
45219a6400 d3d12 test: skip the write-back check when a refused import is a shadow
On a driver that refuses importing a section view (RADV: amdgpu userptr takes
anonymous memory only), the layer answers with a shadow at the same title VA,
so the `may_refuse` early return never fires. The forward readback still
passes through the shadow, but a shadow is never written back, so the new
reverse-copy check failed on an AMD iGPU under Wine. Check the caller's pages
only when the buffer is a real import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 09:44:19 -05:00
769634dd61 Merge main into fix/host-import-prefix 2026-11-25 09:40:21 -05:00
446574e761 Merge pull request #1785 from IlyassRS3/fix/rt-title-window-and-arena-bounds
runtime: harden title_window_plan and ArenaBlocks bounds/overflow checks (RT-TITLE-WINDOW-AND-ARENA-BOUNDS)
2026-11-25 15:40:05 +01:00
c3b58ef03d Merge pull request #1732 from kawaii-shakal/arena-rebar-cap
d3d12: keep a Resizable BAR arena in VRAM when the driver excludes it from a very large buffer (RT-ARENA-REBAR-FIT)
2026-11-25 15:38:52 +01:00
24a29f8b4e Merge pull request #1827 from DadaCap/title-staged-no-host-copy
d3d12: title images use the staged upload on a device without host image copies (RT-TITLE-STAGED-NO-HOST-COPY)
2026-11-25 15:37:56 +01:00
71a769d7d8 Merge pull request #1691 from OreoFR/rt-slot57-depth-raster
d3d12_xs: depth, stencil and raster state for slot 57 native pipelines from state blob A (RT-SLOT57-DEPTH-RASTER)
2026-11-25 14:55:52 +01:00
77baf90627 Merge pull request #1703 from OreoFR/rt-dual-source-blend
d3d12: dual-source blending reads SV_Target1 at Location 0, Index 1 (RT-DUAL-SOURCE-BLEND)
2026-11-25 14:46:46 +01:00
02d719cdac Merge main into title-window-overflow; keep only the window-cap test
Main's ba626820e already handles a title address past
LEONIDA_TITLE_WINDOWS_MB: the persistent geometry copy backs it, or
else every view writer emits a zero-size V# (loads 0, stores dropped),
so the raw VA never reaches the GPU (#1537). That replaces this branch's
zeroed scratch window, so the runtime and docs side take main's version.

The d3d12_title_window_cap test stays, rewritten for main's behaviour:
with a cap of 0, two CBVs of private title memory are written zero-size
(no base, no records, never the raw VA), no window is made, and a
dispatch through one reads zeros. Main had no test that dispatches
through an over-cap title address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 07:41:35 -06:00
5e95fa2f46 Merge pull request #1671 from OreoFR/rt-slot57-blend-state
d3d12_xs: blend state for slot 57 native pipelines from state blob A (RT-SLOT57-BLEND-STATE)
2026-11-25 14:28:49 +01:00
93a0f21f49 BUILD-STAGES: report a stage that raises instead of failing silently
A stage that raises outright (not through fail()) was swallowed by the
run_build_stages exception handlers: the build stopped with exit 1 and an
empty stderr, so a permission or copy failure gave no visible cause
(board #1608 comment 7163281819). Report the stage name and the exception
once per stage on stderr from the series loop, the wait handler and the
final drain; fail()'s own diagnostics are unchanged and RuntimeError from
its sys.exit is not re-reported.

Tested: tests/test_leonida_tui.py UnexpectedStageExceptionTest (both
overlap modes, fails without the fix); test_make_game_* and stage suites
pass.
2026-11-25 13:16:50 +00:00
384abe5b06 Merge pull request #1843 from aslan2142/rt-input-script-no-sdl3
RT-INPUT-SCRIPT-NO-SDL3: scripted input in builds without SDL3
2026-11-25 14:15:49 +01:00
3a84ae7aa8 tools/ab_control_flow: handle UTF-8-SIG/CRLF inputs, subprocess encoding and atomic outcomes.tsv 2026-11-25 21:10:56 +08:00
71c86830f5 tools/int_hw_probe: write --json atomically and reject trailing-separator paths 2026-11-25 21:08:25 +08:00
6e85823da4 gamedata_reader: preserve empty polymorphic objects 2026-11-25 16:05:38 +03:00
c90092b284 d3d12: changed console heap slots are fixed without a time limit by default, not given to shaders as null (RT-CONSOLE-FIX-BUDGET-NULL)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:05:05 +01:00
002c720f29 docs: preserve original statistics comment encoding 2026-11-25 14:01:35 +01:00
ca68cb7859 fix: stage texel-misaligned imported host texture copies 2026-11-25 14:01:35 +01:00
56846f650d tests: isolate host-prefix coherence and preserve full heap coverage 2026-11-25 14:01:35 +01:00
9de93fedd3 d3d12: retain fallback for byte-unaligned host buffers 2026-11-25 14:01:35 +01:00
3f81c4015b d3d12: preserve logical offsets in sub-page host imports 2026-11-25 14:01:35 +01:00
ea6d535ff5 d3d12: title images use the staged upload on a device without host image copies (RT-TITLE-STAGED-NO-HOST-COPY)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 13:40:50 +01:00
c68f494160 RT-INPUT-SCRIPT-NO-SDL3: serve LEONIDA_INPUT_SCRIPT without SDL3
A build without SDL3 answered GameInputCreate with no devices and E_NOTIMPL
for every other slot, so the title waited at its first "press A" prompt
forever: no CI artifact or offline build could get past it.

With LEONIDA_INPUT_SCRIPT set, gameinput_no_sdl.cpp now serves one scripted
pad (an Xbox One gamepad) driven by the script alone: device enumeration
through RegisterDeviceCallback (blocking, async, dispatcher), FindDeviceFromId,
and GetCurrentReading/GetNextReading/GetPreviousReading whose gamepad and UI
navigation state follow the script. Readings are taken when the title asks,
so no thread polls. Without the variable it behaves as before.

The parser, the 300 ms timeline, the button names, the press log lines and
the UI navigation mapping move from gameinput.cpp into gameinput_script.h,
which both shims use; nothing in it needs SDL. gameinput.cpp checks the
shared SDL button numbers against SDL_GamepadButton at compile time.

gameinput_no_sdl_test --input-script (CTest gameinput_no_sdl_script) checks
the scripted pad on a fake clock. Docs: runtime/README.md, docs/gameinput.md,
docs/linux_proton.md, docs/README.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 07:39:13 -05:00
98c2f77772 Merge pull request #1819 from aslan2142/tools-wine-game-run
TOOLS-WINE-GAME-RUN: scripts/run_game_wine.sh, one bounded retail run under Wine with a counts-only summary
2026-11-25 13:37:17 +01:00
597cf76623 TOOLS-WINE-GAME-RUN: scripts/run_game_wine.sh, one bounded game run under Wine
The launcher runs gta6rt.exe --run once under Wine on Linux, headless on a
private kwin_wayland --virtual --xwayland session (Xvfb has no DRI3, so RADV
cannot present there) or on the current display with --visible. Sound is off
(Wine's audio drivers disabled, Pulse/PipeWire/ALSA pointed at nothing,
LEONIDA_AUDIO=silent for the runtime's silent output endpoint), --device pins
the Vulkan device through MESA_VK_DEVICE_SELECT, and a hard time limit, a lock
and full teardown bound the run. Every path comes from arguments or the
environment.

tools/game_run_summary.py prints counts only: run time, end, exceptions by
code, D3D12 calls by outcome, presents, the top failing calls and the [rt]
lines by category with numbers masked. It never prints a log line.

Tests need no game, Wine or GPU: the script against stubs, the summary on
synthetic run folders. docs/linux_proton.md describes the script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 07:30:48 -05:00
def89c3aa5 tools: make gamedata_sps1.py --json writes atomic, validate paths and avoid duplicate index read 2026-11-25 20:29:24 +08:00
59eadb0be5 tools: make script_qtable.py --json writes atomic and validate paths and hex stems 2026-11-25 20:27:21 +08:00
81e34a5695 tools: harden bcpack_tables_bptc.py section validation, bounds and file cache 2026-11-25 20:25:15 +08:00
abe47df11e tools: handle corrupt XBCH zlib, case-insensitive extensions and index errors in pal_stages.py 2026-11-25 20:21:02 +08:00
a759e1ebc6 tools: guard ps_helper_probe.py empty coverage and atomic --json writes 2026-11-25 20:14:04 +08:00
34739cff3e tests: compare the fence's info string too, so two languages are not one duplicate 2026-11-25 19:13:01 +07:00
93d540e3be docs: drop the repeated manifest block in character_models, and test for it 2026-11-25 19:13:01 +07:00
eb4c4204e8 runtime: harden title_window_plan and ArenaBlocks boundary and overflow checks
Fix edge-case arithmetic and boundary bugs in the title-memory window
planner and GPU address arena allocator:

1. runtime/src/title_window_plan.h:
   - title_window_range(): reject va < lo (previously returned a range
     starting at lo > va that excluded va, causing va - range.start to
     underflow in resolve_title_memory), reject most == 0 (avoiding
     std::clamp(want, 1, 0) UB), require power-of-two align, and avoid
     UINT64_MAX - want - align unsigned underflow when computing end.
   - title_pool_extent(): reject non-power-of-two align and unreadable
     requests (readable_end <= va) before rounding end up to align, and
     enforce the most cap after alignment rounding so out.size <= most
     always holds and out contains va.
2. runtime/src/arena_blocks.h:
   - Make align_up() overflow-checked so high alignments or keep_out_end
     near UINT64_MAX cannot wrap to 0 and trigger an infinite loop in
     ArenaBlocks::allocate().
   - Guard against non-advancing keep_out_end <= start in allocate().
   - Make consistent() safe against reserved_ > size_ underflow and
     free_bytes_ + live_bytes overflow.

Extend runtime/test/arena_blocks_test.cpp and add portable
runtime/test/title_window_plan_bounds_test.cpp.

Item: RT-TITLE-WINDOW-AND-ARENA-BOUNDS
2026-11-25 13:09:51 +01:00
b19b00e88a Merge branch 'rt-slot57-blend-state' into rt-dual-source-blend
# Conflicts:
#	docs/fspx.md
2026-11-25 13:01:26 +01:00