Commit Graph

9534 Commits

Author SHA1 Message Date
589b2d28fa docs: how to measure the D3D12 runtime's frame rates, and its LEONIDA_* variables
d3d12/docs/findings.md was reachable from d3d12/README.md alone, so a night of
runs repeated measurements it already holds. Index it, point AGENTS.md at it,
say how to measure (a switch by turns inside one run), and list the variables
the runtime names from its own sources: 415 of 669 were in no Markdown file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:29:56 +01:00
c717967d0c test(semantic): align computed-I/J f16 interp oracle with toward-zero p2 narrow
Update `tests/semantic/test_interp_computed_ij_fallback.py` (#2239) to
narrow `v_interp_p2_f16` reference expectations toward zero (`f16_rtz` /
`f16_rtz_bits`), matching `SHADER-468` (#1181).

AI-assisted.
2026-11-30 04:22:16 -05:00
45df09b843 chore: remove 13 dead one-off scripts, fix /home/nolan test paths, drop unused imports (CHORE-TIER2A-PYTHON-CLEANUP) 2026-11-30 04:00:53 -05:00
dcba958e52 Merge pull request #2637 from breachato/bink-index-shared-report-path
bink_index: ask report_paths for the report-path guard
2026-11-30 09:33:54 +01:00
f7764579a3 Merge pull request #2668 from aslan2142/chore/tier1-main-hygiene
chore: remove dead Tier 1 files, wire 5 unwired C++ tests, and fix play.ps1 path
2026-11-30 09:33:39 +01:00
31083735aa tests: expand foreach in built_test_executables and registered_commands 2026-11-30 03:32:12 -05:00
b40e869e8c Merge pull request #908 from markankamaransheogarat-sys/ubiq/shader-disasm-failed-reset
SHADER-DISASM-PER-RUN-FAILED: shader_disasm: use a per-run failed list in main() and handle read OSError
2026-11-30 09:14:40 +01:00
206bb4b688 run_game_wine.sh: --cache fresh is cold: drops the drivers' cache variables and an old session/cache (WINE-RUN-SHADER-CACHE)
Review follow-up (timbot103):
- A driver's own variable wins over XDG_CACHE_HOME, so a warm MESA_SHADER_CACHE_DIR, MESA_GLSL_CACHE_DIR or
  __GL_SHADER_DISK_CACHE_PATH reached Wine under --cache fresh. A fresh run now unsets them; with a kept cache the
  caller's variables stay and win. --help and docs/linux_proton.md say so.
- A run folder whose earlier launch did not start is accepted again: a fresh run now empties its session/cache, and
  session.txt is written anew instead of getting a second "shader cache:" line.
- test_run_game_wine_safety's shared fixture passes --cache fresh, so an inherited XDG_CACHE_HOME stays out.

Two new tests in tests/test_run_game_wine.py fail with the old script and pass with this one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-30 08:14:20 +00:00
d762b13973 Merge pull request #950 from barkodr/fix/x64-recomp-qemu-path
x64_recomp: find qemu through QEMU_AARCH64 or PATH, not a contributor's home folder
2026-11-30 09:13:23 +01:00
d763033a9e Merge pull request #2679 from bobcatchris/fix/x64-recomp-qemu-runner
TEST-X64-RECOMP-QEMU-RUNNER: call xr.run_result in x64_recomp QEMU fallback runners
2026-11-30 08:12:20 +01:00
3c4c5a5cc9 Merge pull request #2666 from ItsYusei99/ps-glyphs-dualsense
PlayStation glyphs: --mono, a look close to the PS5's prompts; the DualSense d-pad; no black halo (PS-GLYPHS-MONO-DUALSENSE)
2026-11-30 08:12:10 +01:00
69454e705a Live prompts: call lnInit from each symbol class's constructor
In the second run in the title, Main's initialiser ran (the run-time
sentinels were found, four copies) but lnMade stayed 0: the hook in
mx.core.SpriteAsset never ran. The three movies that load the glyph movie
each define mx.core.SpriteAsset too, and theirs is the one used. The 38
Main_Button_N classes and platform_xbsx.input_icons.Main are defined only
in the glyph movie (the loaders' document classes are generic_movie.Main,
hud.Main and map_scripted_movie.Main), so each Main_Button_N constructor
now calls Main.lnInit(this) in a try block and SpriteAsset is left as it
is. 459 bytes to spare.
2026-11-29 23:20:51 -05:00
1fb8c4bfef Live prompts: sentinels made at run time, counters, PlayStation on top
The first run in the title found four copies of lnLo/lnFamily/lnHi eight
bytes apart, wrote them on every switch, and the prompts stayed keyboard.
The sentinels were the slots' defaults, so a template of defaults could
match, and the keyboard pieces were drawn over the PlayStation ones, so
code that never ran looked like writes that missed.

- Main's static initialiser now computes lnLo and lnHi (half of each
  sentinel times 2) before its own code: no copy of the movie or of a
  slot default holds them.
- lnMade (prompts made) and lnShown (pictures switched) follow lnHi; the
  runtime reads them through the found layout and logs them when found,
  on each write and every 30 s. A find needs whole numbers there and must
  not lie inside a copy of the movie; both rejects are counted.
- Sprites place the keyboard pieces first and the PlayStation pieces on
  top (the first named p): if the code does not run, prompts look
  PlayStation on every device.
2026-11-29 23:03:09 -05:00
54374cf53e Button prompts that follow a device switch during play
tools/live_prompt_glyphs.py builds ps_live_prompt_glyphs.gfx over the
title's glyph movie on the player's PC: each Main_Button_N sprite holds the
PlayStation and the keyboard picture (the first keyboard piece named k),
and the title's ActionScript block gets three static Number slots on Main
(lnLo, lnFamily, lnHi, the outer two sentinels), four static methods that
show the pad or the keyboard pieces when a prompt is made and on each frame
while it is on the stage, and a call from SpriteAsset's constructor, the
base of exactly the 38 symbol classes. Everything added is in try blocks.
tools/abc_file.py reads and writes ABC byte for byte. Both sets and the
code fit the 28,148 bytes with 1,057 to spare on the user's movie.

leonida-hle serves the live movie for a PlayStation pad or the keyboard
(unless LEONIDA_PROMPTS forces a family; LEONIDA_PROMPTS_LIVE=0 restores
one family's movie, LEONIDA_PROMPTS_PAD=xbox keeps a keyboard start on the
keyboard movie), with lnFamily's default set to the family in use, then a
below-normal thread finds the slots by their sentinels through
ReadProcessMemory and writes each change of the active family.

prompt_glyph_movies.py builds the live movie too (only over the title's).
Tested: the added code checked path by path and run in an interpreter over
fake display objects, the sentinel scan and writes on a fake heap. Not yet
run in the title.
2026-11-29 22:24:55 -05:00
95bc33f6e2 Built-in keyboard prompts, and both prompt movies built for every player
tools/pc_prompt_glyphs.py draws its own key caps, arrow keys and mouse in
code when --glyphs is not given (no pictures, Pillow or font), with the keys
of the runtime's on-foot table, each inside the outline of the Xbox glyph it
replaces and covering no more of the canvas (measured on the user's movie,
numbers only). tools/prompt_glyph_movies.py builds pc_ and ps_prompt_glyphs.gfx
over the title's movie (standalone if data.rpf cannot be read) into
d3d12/target, where leonida.exe looks; play-nvidia.ps1 runs it before a start
and make_game.py in its runtime stage. A movie the player made is never
touched or shadowed; its own are stamped and rebuilt only when inputs change.
2026-11-29 21:49:50 -05:00
7d76dee8af tests: call xr.run_result in x64_recomp QEMU fallback runners (TEST-X64-RECOMP-QEMU-RUNNER) 2026-11-29 19:47:41 -06:00
fb163d9a9c scripts: launch Windows compute workers with sys._base_executable (COMPUTE-WORKERS-WIN-VENV) 2026-11-29 19:46:20 -06:00
18936010df chore: remove dead Tier 1 files, wire 5 unwired C++ tests, and fix play.ps1 path 2026-11-29 20:00:40 -05:00
4ae05e76c0 PlayStation glyphs: --mono, a look close to the PS5's prompts; the DualSense d-pad; no box behind a glyph
- `--mono` draws white keys and discs with black symbols, as the PS5's own button prompts look.
- In that look the d-pad is the DualSense's: four separate arrow keys pointing at the middle,
  the pressed ones white and the rest grey (all white for the plain d-pad and for all four).
- Mono sprites have no see-through bounding box behind them: when a menu highlights an option,
  the title's colour change showed that box as a black halo around the glyph.
- tests: no box behind any glyph in the mono look, the d-pad's key colours, the mono movie builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-29 18:32:16 -06:00
129c840089 ci: fix runtime/windows timeout, remove redundant CI legs, and harden caches 2026-11-29 19:17:38 -05:00
f0703cdef4 rdna2spirv: check high 32 bits for buffer offset fit to avoid NVVM crash
In Gen.buffer_address (tools/rdna2spirv.py), emit
`OpShiftRightLogical %ulong wide %c64_32` followed by
`OpIEqual %bool hi_w %cl0` instead of
`OpULessThanEqual %bool wide %clffffffff`.

NVIDIA 580.82.07 NVVM aborts pipeline creation (`NVVM compilation failed: 3`,
VkResult -13) on the unsigned 64-bit compare when a literal V# folds `wide`
to `0 + idx * stride` (reported and A/B-tested on L4 by @kevincommits in
ubiquitarianism/leonida#1608#issuecomment-7208330785). Over uint64,
`(wide >> 32) == 0` is mathematically identical to `wide <= 0xFFFFFFFF`.

Since lower_addr64 (SHADER-423), the 64-bit compare still reaches the driver
with --int64-addresses, and by default in any module the lowering leaves in
its Int64 form (a 64-bit scalar op such as s_lshl_b64 elsewhere in the
shader). Where the lowering does apply, the new form lowers to a high-word
`== 0` test, without the pair compare's redundant low-word
`<= 0xFFFFFFFF` term.

tests/semantic/test_buffer_offset_wrap.py runs every access (including the
exact 32-bit boundary cases: `0xFFFFFFFC` dword, `0xFFFFFFFF` byte vs
`0x1_0000_0000`) three ways: lowered (default), --int64-addresses, and
default with Int64 kept. It checks that no compare with the 32-bit limit is
emitted in any of them (raw and after spirv_opt.optimize), that the Int64
forms test `(wide >> 32) == 0`, and that the modules pass spirv-val when it
is on PATH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 09:09:38 +10:00
fcc044cdc4 Merge current main after CI fixture fixes 2026-11-29 21:07:01 +01:00
720bd3b4e1 Merge pull request #2629 from MoonEyes/fix/ci-main-empty-spv-fakes
tests: bvh and exe shader-stage fakes write non-empty modules (CI-MAIN-EMPTY-SPV-FAKES)
2026-11-29 20:59:48 +01:00
40136ef79a tests: skip sandbox_scene's POSIX-only atomic-output tests on Windows (CI-MAIN-WINDOWS-TESTS)
#1669 added TestAtomicSceneOutput, which runs the tool through a shell, caps the file size with RLIMIT_FSIZE and checks POSIX file modes. On Windows two of its tests fail (`exec: : not found`, mode 438 != 416), so `check` stays red. Skip the class there; it still runs on Linux and macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:34:23 +01:00
dccc5627c4 Merge remote-tracking branch 'origin/main' into fix/ci-main-windows-tests 2026-11-29 20:34:10 +01:00
ae6c515ede test_rdna2spirv_spawn_quota: close the parent's pipes when the job test skips (COMPUTE-WORKER-SPAWN-QUOTA)
communicate() closes stdin, stdout and stderr, but the launcher precondition can skip before it runs, which left
the three pipes to finalization (ResourceWarning: unclosed file). They are now closed in the finally, after the
child is killed and waited for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 16:31:28 -03:00
dd60cba733 Merge remote-tracking branch 'origin/main' into x64-recomp-vzeroupper
# Conflicts:
#	tests/test_x64_recomp.py
2026-11-29 20:30:08 +01:00
8b6b4b2163 tests: bvh and exe shader-stage fakes write non-empty modules (CI-MAIN-EMPTY-SPV-FAKES)
Since #1235, make_game treats an empty cached .spv as a broken cache and rebuilds it. The fake translators in test_bvh_shaders_stage and test_exe_shaders_stage still wrote empty .spv files, so the second, cached run rebuilt fspx and failed on main. #1235 updated the fspx and library stage tests the same way; these two were missed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:27:07 +01:00
4ab5fdc5de tests: two Windows reds on main's check job (CI-MAIN-WINDOWS-TESTS)
test_gen_gdk_runtime_classes imported the POSIX-only resource module at the top, so the whole file failed to import on Windows. Import it guarded and skip the two failed-write tests that need RLIMIT_FSIZE.

test_make_game_plain_logs compared the child's getcwd() with the temp folder as strings; on the Windows runner the temp folder is an 8.3 short name (RUNNER~1) and getcwd() returns the long one. Compare with os.path.samefile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:17:28 +01:00
c0e16af856 Preserve motion blur when restarting from the settings menu
D3D12-MOTION-BLUR-RESTART. AI-assisted with OpenAI Codex (GPT-6).
2026-11-29 20:11:32 +01:00
e3ddc2e0a8 test_mesh_serial_waves: count the slot stores as OpBitcast too (red on main since #2506 met lower_addr64 from #850) 2026-11-29 11:07:57 -08:00
35390e7228 Merge pull request #1624 from xel1uz/fix/sad-arg-guards
sad_diff: reject a zero or negative --max-ops and --programs
2026-11-29 20:02:32 +01:00
79f89c4906 Merge pull request #1609 from lixonik/windows-boot-scratch-cwd
windows-boot: keep driver artifacts outside the checkout (RT-WINDOWS-BOOT-SCRATCH-CWD)
2026-11-29 20:01:20 +01:00
cf0557ffc3 Merge pull request #909 from markankamaransheogarat-sys/ubiq/spirv-tool-tree-cleanup
SPIRV-TOOL-TREE-CLEANUP: rdna2spirv, make_game: terminate spirv-as/val children on abort and sweep stale .spirv-*.tmp
2026-11-29 20:01:11 +01:00
2b5a6fd192 Merge pull request #2618 from Mby159/test/build-fallback-stack-option
tests: the stack reserve need not be the last link option (TEST-BUILD-FALLBACK-STACK-OPTION)
2026-11-29 20:01:02 +01:00
b8346588de Merge pull request #1621 from xel1uz/fix/valu-arg-guards
valu_int_diff: report a bad --max-ops/--programs as a usage error
2026-11-29 20:00:52 +01:00
545f610fae Merge pull request #1235 from titoreinaldo/contrib/r2-cache
make_game: rebuild empty compute shader modules on resume
2026-11-29 20:00:43 +01:00
cf6e559219 Merge pull request #825 from trigger337/fix/file-mode-probe-cleanup
file_mode: restore write permission before probe removal (FILE-MODE-PROBE-CLEANUP)
2026-11-29 20:00:35 +01:00
3be7be0110 Merge pull request #889 from trigger337/fix/world-index-stage-cleanup
world_index: restore write mode before unlink on replace failure and publish mode (WORLD-INDEX-STAGE-CLEANUP)
2026-11-29 19:59:38 +01:00
e5042dd503 Merge pull request #838 from trigger337/fix/world-lights-stage-cleanup
world_lights_paths: restore write mode before unlink on replace failure and publish mode (WORLD-LIGHTS-STAGE-CLEANUP)
2026-11-29 19:59:29 +01:00
16801256a7 Merge pull request #836 from trigger337/fix/world-census-stage-cleanup
world_census: restore write mode before temporary directory cleanup in _staged_json (WORLD-CENSUS-STAGE-CLEANUP)
2026-11-29 19:59:22 +01:00
423ccd7a95 Merge pull request #1669 from xel1uz/fix/sandbox-scene-atomic-out
sandbox_scene: write --out atomically
2026-11-29 19:59:14 +01:00
bcbbd9a9c7 Merge pull request #1601 from xel1uz/fix/amd-swizzle-argument-guards
amd_swizzle: reject impossible sizes, unusable offsets and empty results
2026-11-29 19:59:06 +01:00
2a4b878356 progress_dashboard: reject non-JUnit XML reports
AI-assisted with Codex.
2026-11-29 21:54:11 +03:00
7c330c76db Merge pull request #2236 from zmasi/fix/dstorage-multilevel-bcpack-fit
build_dstorage_history: fit missing BPTC history slots across multi-level sibling mips (DSTORAGE-MULTILEVEL-MIP-FIT)
2026-11-29 19:37:07 +01:00
377c45a336 Merge pull request #1530 from IlyassRS3/fix/sampler-source-census-dataflow-io
sampler_source_census: fix V#/pointer/SMEM/v_mov dataflow and harden JSON I/O (SAMPLER-SOURCE-CENSUS-DATAFLOW-AND-IO)
2026-11-29 19:37:01 +01:00
0cea8abaeb Merge pull request #899 from trigger337/fix/manifest-verifier-stage-cleanup
manifest_verifier: restore write mode before unlink on replace failure and publish mode (MANIFEST-VERIFIER-STAGE-CLEANUP)
2026-11-29 19:36:55 +01:00
4d531de078 Merge pull request #855 from trigger337/fix/bvh-slot-check-stage-cleanup
bvh_slot_check: restore write mode before unlink on replace failure and publish mode (BVH-SLOT-CHECK-STAGE-CLEANUP)
2026-11-29 19:36:48 +01:00
3e4b15ccd3 Merge pull request #834 from trigger337/fix/world-names-stage-cleanup
world_names: restore write mode before unlink on replace failure and publish mode (WORLD-NAMES-STAGE-CLEANUP)
2026-11-29 19:36:43 +01:00
4ccd9cbfbc Merge pull request #832 from trigger337/fix/dds-png-stage-cleanup
dds_png: restore write mode before unlink on replace failure in main (DDS-PNG-STAGE-CLEANUP)
2026-11-29 19:36:37 +01:00