Commit Graph

5744 Commits

Author SHA1 Message Date
2a491668a5 dstorage history: fit packed tails against decoded BCPack siblings
The predictor profile fits a history field only from a stream with a raw or
zlib sibling mip. A BC7 texture whose mip 1 and packed tail share one BCPack
stream has none for the tail, so history fields that only such tails use
stayed unknown and the runtime refused the stream with missing-endpoint
(E_DSTORAGE_DECOMPRESSION_ERROR) on every game run.

fit_decoded_neighbors decodes the nearest BCPack sibling with the profile so
far, also inside a stream the decoder refuses (blocks whose chains start at an
unknown field are left out of the reference), and fits the streams that still
reference missing fields. Only empty fields are filled, never as confirmed.

On the local package the BC7 endpoint fields go from 4228 to 4406 of 6144 and
the runtime decoder refuses 8 of 5167 BC7 streams instead of 60; both request
shapes that failed in game runs decode. BC6H is unchanged (10 of 268).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:07:52 -05:00
36771ec53d d3d12: geometry copies in system memory, and retired when the title remaps their pages
Geometry copies held 4.4-6 GB of VRAM in world runs and were never evicted: a view retired only when its range was
freed, decommitted or unmapped, and the title streams by remapping the frames of its pools.

- LEONIDA_GEOMETRY_HOST (unset by default): 1 puts the copies in system memory outside VRAM, write-back where the
  device offers a cached host type; 2 write-combined. The memory type is picked among the host-visible types that are
  not device-local (memory_type_order alone would give the BAR first); a device with none keeps its types. Logged once
  and in the geometry buffers line.
- LEONIDA_GEOMETRY_REMAP_RELEASE (on by default, 0 off): XMemMapPhysicalPages with pages, the scatter call and
  CopyPageMappingsBatchX report the pages whose frame changed (or went) as released (xmem's RemapReleases, collected
  under the fault lock, reported after it), so GeometryViews retires the copies over them through #2094's
  drain_released and kAfterExecutes reaping. A page mapped again to its own frame is no change.
- A retired view is copied once more from its pages when they are readable: a list recorded before a remap that took
  the view's address reads the new bytes, as the refresh this replaces would have given it.
- A stream-pool extent backed by a retired copy leaves pool_spans (it was kept for the device's life).
- A full release queue joins touching ranges before it collapses into one covering range.

Tests: geometry_views_test cases 14-16, xmem_test test_remap_releases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:07:51 -05:00
a02a5ef7a9 rdna2spirv: no round-loop fallback for single-wave emulated programs
translate() re-translated every emulated wave64 program whose inline
structured form has an OpControlBarrier under a selection or loop as the
round loop (barriers_under_control_flow), for NVIDIA, which hangs on a
barrier only part of the workgroup reaches. A single-wave workgroup
(plan mode inline_all) is one wave: its barriers sit at the top level or
under %pc-only guards, which every invocation takes alike, so the
fallback only applies to multi-wave plans now.

The round form keeps nearly the whole register file live across the
loop and drove RADV/ACO's spiller past 12 GiB (53 GB uncapped) on large
single-wave programs, and made programs with long loops 10-100 times
slower. 666 main-set compute shaders return to the structured form;
translated and spirv-val counts are unchanged.

Restores the single-wave expectations in test_wave64_emulate_opt.py,
test_loop_ballot_barrier.py and test_loop_iteration_guard.py (its round
scheduler check now uses --dispatch-loop), adds
test_wave64_single_wave_barrier.py with a hand-written fixture, and a
docs/design.md contract row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:07:28 -05:00
ad1c662716 viewer: an overview map of the world's chunks, with click to fly there (VIEWER-OVERVIEW-MAP)
The map viewer loads only what is near the camera, and nothing in it shows
where the rest of a world is: a placed world is kilometres across, and a
chunk that fails to load is only a number in the HUD.

M opens a map of the whole world from above, drawn from world.json alone:
one rectangle per chunk (its cell when it names a tier, otherwise the X/Z
extent of its bounds), coloured by its streaming state (not loaded,
loading, loaded, failed). It shows the camera and its view direction, the
spawn point and, without LOD sets, the loading radius. The line under it
names the point under the cursor, in a placed world also as RAGE X and Y,
and the chunk there with its state. A click moves the camera there, 10 m
above the full-detail geometry at that point unless it is already higher;
the wheel over the map zooms it about the cursor.

Nothing touches the page until the map is first opened, and an open map is
redrawn at most every 100 ms. tests/test_viewer_map.cjs runs the map's
code from the page together with the streaming code, in a new file so the
open pull requests on tests/test_viewer_streaming.cjs are not touched.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-26 15:04:06 +01:00
5c702e2a70 design.md: the M5 (macOS 26.6.2) probe answers false and ps_ssharp passes without the flag
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:02:25 +01:00
a906cf947c rdna2spirv: vcc_hi as a wave32 compare and mask destination
In wave32 code vcc_hi is an ordinary SGPR, and the console compiler writes VOP3 compare masks there: 5,907 such
compares in the title's captured compute programs, 606 of which were refused with "v_cmp destination". The mask
goes to %vcc_hi, and a lane-mask read of vcc_hi takes it back (mask_src read %vcc, the low half). Wave64 still
refuses a lone vcc_hi as a mask destination. Contract row in docs/design.md.

Tested: tests/semantic/test_vcmp_vcc_hi.py; the mask, compare and wave64 semantic suites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 08:40:16 -05:00
31e8b01a60 gpu-test-results: Apple M3 again at a73a57e13, with KosmicKrisp, llvmpipe, validation and ctest
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:39:04 +01:00
f324b94a72 indirect clamp: a draw record of 2^23 vertices or more runs empty and free (RT-INDIRECT-DRAW-UNFILLED-COUNT)
The clamp cut a garbage draw count to 2^24 vertices and charged it against the
list's 2^27-unit budget. Only records whose words are all 0xFFFFFFFF were
treated as unfilled. A slot with a garbage count but other words set therefore
cost 2^24 units, so eight such records used up the budget and every real draw
after them in the list ran empty.

A census in codec-d/cool_fox's fork of VIctory found 90 records of 2^24
vertices in one list, and that fork treats 2^23 vertices an instance or more as
unfilled. Here such a record now runs empty, keeps its locations and charges
nothing. Draws under 2^23 are unchanged.

indirect_clamp_test: the old garbage cases now expect an empty record. New
cases check the 2^23 edge and 16 garbage counts ahead of a real draw, which ran
empty with the old shader and runs with this one. The list-budget case uses a
real 2^22 x 16 draw. indirect_clamp_spv.h was regenerated with glslangValidator
15.1.0 (-V --target-env vulkan1.2 -Os).

Tested: full ctest (108 tests) on Linux with Mesa lavapipe (llvmpipe, LLVM 19.1.7).

Changes made by Claude Code (AI-assisted).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-26 13:29:11 +00:00
73516a2902 Merge pull request #1886 from DadaCap/session-cache-limit
Tested on main a73a57e13: Wine suite (clang-cl + xwin, RDNA2 iGPU, RADV) 412 pass / 22 fail / 39 skip on main and on main + #1886, 0 changes; Linux portable ctest 108/108; the new over_save_limit cases fail on main and pass here. Review points addressed in 66e96ccea. Windows CI cancelled; linux-gpu-tools CI failed at Build (log not available yet; the same job also fails on #1914, and it builds locally). AI-assisted (Claude Code, Claude Opus 5.5 review, Claude Fable 5.2).
2026-11-26 13:52:02 +01:00
4263427b46 Record the library entry of each compute pipeline in the order log
Add an E line after the P line of a compute pipeline.
It holds the FNV-1a 64 hash of the library entry name, not the name.
A reader from before E lines skips them, counted as lines not read.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-26 13:13:04 +01:00
6f2b52e563 d3d12: prewarm console streams kept for their first bind (on-demand)
With LEONIDA_PIPELINE_COMPILE=on-demand a console stream (device slot 86) is
only parsed when it is first bound, and create_graphics queued the prewarm
from there, so a planned pipeline got no lead at all. ecox982745 measured 0
of 8 planned builds before the first bind in that mode, 8 of 8 otherwise.

When the plan has the stream's pipeline, the parse is now queued as its first
prewarm job (at the rank of its first recorded variant, on a compile worker);
create_graphics then queues the variants as for any other PSO. A bind that
comes first waits for the parse through resolve_type's call_once, as it would
have parsed it itself.

d3d12_pipeline_workers_test gets a device case: a first device records the
order, then console-stream PSOs with an eight-entry plan must build those
eight before any command is recorded, with the ordinary stream and with
on-demand, and nothing without a plan. Without the fix the on-demand case
fails with 0 of 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 06:00:01 -06:00
c621105e6f rdna2spirv: lower_addr64 takes the swizzled offset's 64-bit multiply and variable left shift
After the second merge of main (RT-POST-LOAD-GPU-MEMORY, 9f98dcc61), the
buffer address idiom also holds the full index * stride product in 64 bits,
a left shift by the element-size log read from the V# (a 32-bit value, not
a constant), and a 64-bit compare against 0xFFFFFFFF for the range check.
The pass refused every such module and kept Int64.

A 64-bit multiply becomes the low words' product, its high word from the
four 16-bit half products (plain 32-bit multiplies, which the three test
interpreters run), plus each low word times the other's high word. A left
shift by a 32-bit value becomes the shift by k & 31 on both words with the
crossing bits, the words moved up once k >= 32. The contract row and the
code comment say so.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-26 13:37:35 +02:00
3677e3217a Merge remote-tracking branch 'lc/main' into lc/addr-no-int64
# Conflicts:
#	docs/design.md
2026-11-26 13:30:48 +02:00
1052bee0f7 Merge main into gpu-results-m3 2026-11-26 12:19:18 +01:00
1df0a2f92b Merge main into fix/mods-gui-tkinter-hint-macos 2026-11-26 12:19:05 +01:00
48b95f40cd docs: console mesh pipelines, the driver user SGPRs, decoding fallback; port status
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 06:09:42 -05:00
d864cab47e runtime: prewarm graphics pipelines in the order an earlier run asked for them (RT-PIPELINE-PREWARM-ORDER phase 2)
LEONIDA_PIPELINE_PREWARM_ORDER=<file> (or 1 for pipeline_order.log beside the
session cache) reads the order log #2220 records. Of the runs recorded on this
GPU, the one with the most records is used. When the title creates a PSO whose
description key is in it, each recorded graphics or mesh variant is queued on
the compile workers (#2233) as a warm-up at priority 1 + rank: after every
demanded build, one warm-up at a time, none while a demanded build runs.

Records are taken in order up to LEONIDA_PIPELINE_PREWARM_BUDGET_MS of recorded
build time (default 300000) and LEONIDA_PIPELINE_PREWARM_MAX_ENTRIES (4096).
Compute records are left to the compute warm-up and the offline precompiler.
A missing, garbled or other-GPU log is ignored with one message; damaged lines
and the E lines a v1 reader does not know are skipped.

New CPU test pipeline_prewarm: order kept, budget and entry limit, run
choice, a missing or garbled log, E lines, and on the compile workers the
recorded order and a demanded build overtaking the prewarms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 05:00:01 -06:00
6e9c33e079 Merge remote-tracking branch 'upstream/pr2220' into claude/pipeline-prewarm-order 2026-11-26 04:53:46 -06:00
a6ec8f38a1 chain_check: pin an unknown interface, a non-builtin exception and the slot-57 line
The trace test now feeds PS_Secret::Slot12 and expects one more "(other)";
the reasons test feeds "translator error SecretError" and expects
"translator error #"; the runtime pins add the slot-57 failure fprintf
of d3d12_xs_device.cpp. dev-tools.md says which trace names and digest
endings are printed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:40:26 +01:00
7bdb9caeb9 docs: add Vietnamese community quickstart 2026-11-26 19:35:51 +09:00
1cc492589d Merge branch 'refs/heads/port/ui-text' into port/victory-merge 2026-11-26 05:29:23 -05:00
828541806e Merge main into bary-raphael-old-amd
tools/vk_subgroup_info.py: main now confirms the per-vertex feature by its extension after a device is chosen; this branch adds the chosen driver version to the same tuple. Both kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:27:14 +01:00
9ad7277af2 d3d12: constant-buffer views are V#s of 16-byte records (batched UI shapes and text, the diagonal line)
The start screen drew a 1-pixel white line from the bottom left to the top right and no batched text. The title's
console-compiled Scaleform batch shaders read their constant buffer's float4 rows with buffer_load_dwordx4 ... idxen
and the row number (rows 4b..4b+3: colour transform, then the position matrix), and MUBUF addressing is
base + index * STRIDE. CreateConstantBufferView wrote a raw V# (STRIDE 0), so every row read the first one: x and y
came from the same row, so every batched shape and glyph landed on clip-space y = x, coloured white.

A constant-buffer view is now STRIDE 16, NUM_RECORDS the size in rows, format 32_32_32_32_FLOAT, OOB_SELECT 1
(gfx10::constant_buffer_descriptor). s_buffer_load keeps its bound (NUM_RECORDS * STRIDE bytes) and offen loads reach
the whole buffer. With it the line is gone and the batched text (titles, button prompts) draws.

Tests: gfx10_descriptors_test checks the fields; d3d12_compute_test's CBV pass reads through them (its GLSL stand-in
now bounds a CBV read as s_buffer_load does).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 05:26:02 -05:00
bc372f72c0 docs/gpu_test_results: refresh the AMD Radeon 780M record on main bcaa13dad 2026-11-26 18:12:30 +08:00
cd8d9aa7a8 rdna2spirv: lower computed I/J barycentrics under --f16-interp-fallback
Lower computed v_interp_p1/p2 (I, J) pairs under --f16-interp-fallback (without --bary-fallback) without PerVertexKHR or a geometry shader by hoisting OpDPdxFine/OpDPdyFine screen-quad barycentric and attribute derivatives into uniform %entry (OpCapability DerivativeControl, guarded by an integer IEEE-754 normal determinant check) and evaluating P_0 + I*P_10 + J*P_20 per site.
2026-11-26 01:57:43 -08:00
16a95502a2 tools/dstorage: fit missing BPTC history slots across multi-level sibling mips
When a BC6H or BC7 stream still references an unfitted built-in predictor slot after adjacent-mip fitting, pair its mips with the closest raw or zlib mip on the same layer across multi-level mip distances before running the full-stream constraint pass. Existing adjacent-mip, array, and cubemap fits keep precedence.
2026-11-26 01:49:30 -08:00
ffe22b1815 d3d12: console graphics pipelines (device slot 57), drawn with formats from their targets
The title deserializes every graphics pipeline it draws past the start screen through console device slot 57,
which was refused (16k+ calls a boot, the world never drew). Its description is the graphics side of slot 67:
the root signature, kind 0 (gfx10 register state), kind 1 (semantic table), and kind-6/kind-7 pairs for the pixel
and vertex stages (docs/fspx.md, "Graphics pipelines", from a census of 400 descriptions).

- Proxy: decodes CB_BLENDn_CONTROL, DB_DEPTH_CONTROL, DB_STENCIL_CONTROL and DB_STENCILREFMASK from kind 0 into a
  D3D12 description, each stage an FSPX payload; culling stays off unless LEONIDA_CONSOLE_CULL=1 until the
  PA_SU_SC_MODE_CNTL reading is confirmed. LEONIDA_CAPTURE_SLOT57 saves descriptions for study.
- Device: a graphics stage may be such a payload, found by its kind-6 SHA-256 and stage, captured as
  <sha>-<stage>.fspx when untranslated. A private flag makes a pipeline take its attachment formats and sample
  count from the targets each draw binds (formats_from_targets / format_variant), as the hardware does.
- Build: fspx_unpack.py unpacks captured stages as vs/ps with a container holding the signatures the translator
  reads; make_game.py translates them into spirv/console-captured, which the shader library loads.
  1301 of 1340 captured stages translate and pass spirv-val.

Also:
- Placed-texture refresh runs on a worker with a word-wise hash instead of the present thread.
- A zlib stream longer than its DirectStorage destination gives its first bytes (8192 of a 16384-byte chunk).

Tested: tests/test_fspx_unpack.py (38), dstorage_xs_test (62 checks), gta6rt builds; RTX 4060 Ti.
AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 04:40:16 -05:00
a83f38508f d3d12: a pool of compile workers for the pipeline compiler (RT-ASYNC-COMPILE-POOL)
With LEONIDA_ASYNC_PIPELINES=1 every demanded build, the compute warm-up and
the cache checkpoint ran on one general worker (plus a graphics-only one), so
one long driver compile held every pipeline a submission asked for behind it,
and their draws and dispatches were skipped meanwhile.

PipelineCompiler now runs LEONIDA_COMPILE_THREADS workers (half the logical
processors, 2 to 8). A worker takes the most urgent job it may:
- demanded builds first, in the order they came, then warm-ups by size, then
  the checkpoint, which waits until no worker compiles;
- large builds (compute over 128 KiB, graphics of 1 MiB or more) and warm-ups
  together take at most threads-1 workers, so one stays free for a small
  demanded build; at most LEONIDA_COMPILE_HEAVY_MAX large builds at once
  (default threads-1, 1 with LEONIDA_SERIAL_BIG_COMPILES=1), compute and
  graphics alike, each still within the memory gate;
- warm-ups run one at a time, and none starts while a demanded build runs:
  each holds the compile gate for its whole create, and a submission waits
  for every create in flight;
- one build of a PSO at a time, so after_running and the teardown rules hold.

LEONIDA_COMPILE_THREADS=1 keeps the layout before the pool. The design is
MoonEyes' (#2077), ported onto #2098's scheduler.

Tests: d3d12_compile_pool (CPU, jobs held at gates: settings, a long build
does not hold up a small demanded one, heavy count, free worker, warm-ups one
at a time and after demanded builds, order, one job per PSO, release/cancel/
stop_for_exit with jobs in flight), and d3d12_compile_teardown also with one
worker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 03:10:28 -06:00
3b9f47a283 docs/gpu_test_results.md: record NVIDIA GeForce RTX 5060 Ti (Windows 11, 610.88) results 2026-11-26 15:45:33 +07:00
d41e38ad87 docs/gpu_test_results: record Intel Iris Xe (8086:46a6) and RTX 3070 Ti Laptop (Windows 11) results 2026-11-26 15:44:58 +07:00
bffc6465d1 docs: port status, first visible frames
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 03:43:03 -05:00
2c8949a353 docs/testing.md: ps_cndmask_sign_mods, ps_valu16_mad_sel and cs_fmt_all on KosmicKrisp are its (NAN) constant printing
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:27:31 +01:00
d41d6a16bb tools: chain_check.py, one page of counts for the whole shader chain (TOOL-CHAIN-CHECK)
The links between the game files and the GPU fail quietly: an llvm-mc whose
gfx1013 decoder rejects words leaves pipeline library programs untranslated,
a translation from older translator sources keeps loading after the module
contract changed, and the runtime's slot-67 refusals sit in a large log.

tools/chain_check.py reads a make_game.py work folder (and optionally one
run's log) and prints one block per link with OK/WARN/FAIL and the most
likely cause: llvm-mc and spirv-val versions and the translator digest
against this checkout; unpacked, listed and translated programs per family
with up to 5 refusal reasons; tagged/plain modules and runtime folders;
loaded modules, failed slot and D3D12 calls, builds, gate waits, faults and
the exit code. The last line names the weakest link.

Counts and fixed words only: refusal reasons are matched against the
messages rdna2spirv.py raises, anything else counts as "other", and paths
appear only with --show-paths. Exit 0 by default, 1 with --strict on FAIL.
Standard library only; documented in docs/dev-tools.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:05:37 +01:00
abcccefd7d rdna2spirv: restore a text-cut v_fma_mix literal with no blob too; pin the low-half guard
Review of #2142: the repair needs only the printed encoding, so it now runs before
check_printed_encodings' early returns (no blob next to the listing, header-only blob).
New tests: a listing with no blob gives the full literal, and a text immediate that is
not the encoded literal's low half is left as the text says. design.md: the third shape
now follows the second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gt9hwRYcpySx4P4ncQ3wD5
2026-11-26 08:50:03 +01:00
39bfda96ce Merge port/gap-system: XPackage, module identity, offline Winsock, CPU instruction emulation, XUser/XStore/XGameUi, console paths, suspend, title debug output
# Conflicts:
#	runtime/shims/registry.cpp
2026-11-26 02:38:21 -05:00
068128216c docs: the system-side VIctory gap table
docs/victory_gap_system.md lists what VIctory serves in the system
modules and the loader against what Leonida did, and marks each gap
ported on this branch or left with the reason. runtime_imports.md no
longer says ws2_32.dll is bound to the host, and host_cpu.h points at
the new console instruction emulation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 02:30:06 -05:00
2357144278 gpu-test-results: Apple M5 on MoltenVK 1.4.2 (macOS 27.2.1) at 47c651174 (GPU-M5)
A record for the base Apple M5 (8-core GPU), the second Apple chip after
the M5 Pro, with its row in docs/gpu_test_results.md.

build.py 281/281, check.py 175/220 (39 skipped, 6 failed),
run_gpu_tests.py 185/249 native (61 skipped, 3 failed) and 215/249 with
LEONIDA_W64_EMULATE=1 (30 skipped, 4 failed), ctest 72/72. Two full
passes gave the same counts. The failures are the ones the M5 Pro record
has: cs_fma_fused, cs_imgload_tfe, cs_imgload_d16_tfe and the
intermittent ps_imgatomic.

Synthetic fixtures only, no game files.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-26 15:25:48 +08:00
cd99fc1c5b Merge port/gap-gpu: console object headers, console CheckFeatureSupport, D3D12ConfigureVirtualMemoryX, IID_ID3D12Device data, display deferrals 2026-11-26 02:22:44 -05:00
eedc960363 docs: the GPU-side gap table against VIctory (victory_gap_gpu.md)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 02:20:42 -05:00
d8641ed83d docs: the media and input gap table against VIctory
Every export and method of VIctory's apu, audio, dsp, media, speech and
gameinput modules against Leonida, marked same, ported or left with the
reason, plus what to install for the SDL3 GameInput shim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 02:17:30 -05:00
c8e826a3d8 gameinput: XInput, DualSense and keyboard shim for builds without SDL3
Port VIctory's GameInput module (gameinput.rs, gameinput/dualsense.rs,
GPL-3.0-or-later) as shims/gameinput_xinput.cpp: XInput pads 0-3, a
wired DualSense over HID, the keyboard as its own device, and a keyboard
pad that stands in while no other pad is connected. Readings per change
with a 32-deep history, blocking and async device enumeration,
UnregisterCallback waiting for a running callback, FindDeviceFromId and
XInput rumble, all as VIctory runs the title.

It is built into gta6rt when the SDL3 shim is not (the main build has no
SDL3), instead of binding the import to the host's GameInput.dll, which
has no keyboard pad; LEONIDA_GAMEINPUT=host keeps that path and
LEONIDA_KEYBOARD_PAD=off drops the keyboard pad. Registered by name and
ordinal #1. gameinput_xinput_test runs it over a fake host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 02:12:27 -05:00
77275065bc xdxr: check an update's source before refitting it; bound vertex reads by VertexCount
An update whose source is not a structure of this layout (one the title never
built, which D3D12 leaves undefined) made the refit follow its parent table
anywhere. MODE_CHECK now compares the copied header with the layout, and the
update records both tails: the refit runs when the check passes, a full build
when it fails. The refit walk follows only pointers to the layout's nodes.

A vertex index at or past the geometry's VertexCount is no longer read: its
triangle is inactive. XdxrTriangles carries vertex_count from the desc.

vk_xdxr_build_test: blas_vertex_count and eight update-source cases (zero,
random, another element count, garbage tree; large and small-sort).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gt9hwRYcpySx4P4ncQ3wD5
2026-11-26 07:50:38 +01:00
51174c6cd9 Merge upstream main into fault-address-owner
Keep address binding diagnostics alongside AMD markers and submit-lock tests.

Conflict resolution assisted by Codex.
2026-11-26 06:36:39 +00:00
99f913a288 Merge upstream main into input-out-of-the-box
Keep the PR keyboard-pad default and document the retry behavior from main.

Conflict resolution assisted by Codex.
2026-11-26 06:36:39 +00:00
5fa864e539 d3d12: bound the write-back queue and say when a batch goes back unfenced (RT-TITLE-WINDOW-WRITE-BACK)
A fenced batch waits for its submission's retire ticket. On a queue the layer
holds back (console ordering) the ticket is not ours, and in the worst case
nothing retires soon: the pending list would grow for the rest of the run.

Past 64 pending batches the oldest is now copied back without waiting, once
each, and the fact is logged once. Docs say so.
2026-11-26 06:07:50 +00:00
0babd17b8a Merge remote-tracking branch 'origin/main' into feat/pipeline-order-recorder
Conflicts: docs/d3d12_vulkan.md (main's shorter async paragraph, then the
order-log paragraph), runtime/CMakeLists.txt (both test blocks kept),
runtime/shims/d3d12_vulkan_device.cpp (both includes; build_compute now
reports ComputeBuild::ms to the recorder).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-26 06:53:15 +01:00
bcf1997366 design.md: the 27.0 M3 reran the compute probe and ps_ssharp at 743eda012
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 06:47:31 +01:00
61f1fb6309 Capture untranslated graphics shaders too, and translate them in the build
A vertex shader outside the package's shader archives (sha256 01ac7810..., used by 20 pipelines in the first 20 s) had no translation, so its pipelines were refused. The runtime now saves such a container as <fssm sha256>-<stage>.dxbc in the capture folder, beside the FSPX programs. make_game.py's shaders stage translates them as it does XboxBvhBuilder.dll's containers, into spirv/fssm-captured, which the shader library loads by fssm_sha256. The captured vertex shader translates and passes spirv-val.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:42:33 -05:00
fc1593e008 d3d12: the same write back covers a slot-133 shadow (RT-TITLE-WINDOW-WRITE-BACK)
A slot-133 buffer the driver will not import is a shadow of the title's pages,
and the write through it landed in the copy exactly as a window's did. The
mechanism is already the same one - the pages are title memory, the alias of
the buffer resolves through the noter, and the tracker carries the range - but
nothing said so and nothing tested it.

d3d12_placed_write_back: a root UAV over a placed buffer. The pages keep the
title's words until the next submission, then hold the shader's; a write by the
title over the result survives the copy forward.
2026-11-26 05:28:06 +00:00
97eabd0d67 Merge port/sparse-title-memory: title memory as sparse buffers bound to imported page pools (LEONIDA_TITLE_MEMORY=sparse) 2026-11-26 00:24:44 -05:00