Commit Graph

18350 Commits

Author SHA1 Message Date
ce08fea0af Merge pull request #3000 from enlight3d/cold-start-skips
d3d12: the threads of a frame share its pipeline wait budget and none is left with nothing (D3D12-COLD-START-SKIPS)
2026-12-02 00:03:59 +00:00
7adb42f7a8 Merge pull request #2991 from MoonEyes/carry/495
tests: cover probe collision retries and fallback in file_mode (carry of #495)
2026-12-01 23:50:23 +00:00
c18437b32c exe_checklist: a bold marker run without a colon keeps its words; reject class_id 0
Independent verdict on the carry PR: '**VERIFY the stride on a real exe**' became an
empty entry and '**Unverified fixed quota** on hardware' lost its words. With no colon
to say where a label ends, the bold words may be the note, so they stay. The
class_id string check also gets a payload (0) that kills its mutation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 00:50:01 +01:00
3a38a050d8 d3d12 hwrt: review addendum (one capability gate, AABB strides, TLAS layout, copy modes)
- One gate for both halves: supported() also asks for shader model 6.6, and the translator is
  told inline ray tracing runs (set_host_inline_rt) only once the DXR manager is made.
- AABB geometries take stride 0 (packed 24-byte boxes) and multiples of 8 of 24 or more, as
  DXR does; others are refused.
- A TLAS of instances by pointer (ARRAY_OF_POINTERS) is not built: the remap reads 64-byte
  instances in a row.
- Structure copies other than clone and compact are not done (said once).
- A TLAS clone points the heap slots that view the destination at the shared structure.
- The points not fixed here are listed in fork-ray-tracing.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 00:40:30 +01:00
277703d441 README: the NVIDIA launcher, and naming the card on a PC with more than one
Two things the front page did not say, and both cost a user a report:

- **`d3d12\scripts\play-nvidia.ps1` was not named anywhere in it.** "Starting it" points at
  `Launcher.bat` and `scripts\play-d3d12.ps1`, which are the generic paths; the NVIDIA launcher
  - the one whose settings `findings.md` measures with - was only mentioned inside the DLSS
  fetcher's own output (#2885 reads it as "play-nvidia.ps1 missing").

- **Nothing said that Windows' default card is not always the NVIDIA one.** On a 7800X3D with an
  RTX 4090 there are two adapters, and `D3D12CreateDevice(None, ..)` - what the layer uses when no
  card is named - makes its device on the Radeon iGPU (measured: vendor 0x1002). DLSS cannot
  start there (`NVSDK_NGX_Result_FAIL_FeatureNotSupported`), so the picture is the stretch and
  every frame is drawn by the chip, without a line saying so. `-Adapter 4090` is the fix.

Written with an AI assistant.
2026-12-02 00:21:45 +01:00
9360f46726 tests: drop version-dependent llvm-mc exact-byte check from partial_swizzle 2026-12-01 17:15:08 -06:00
2705632c56 Merge pull request #2852 from Kal0s-design/fix/page-writes-per-heap
d3d12-gpu: physical-page writes reach every view heap's texture pass (D3D12-GPU-PAGE-WRITES-PER-HEAP)
2026-12-01 23:12:32 +00:00
d6baf3528d Merge pull request #2857 from djrolfes/djrolfes/gpu-pool-small-unlock-grow
gpu/pool/small: release pool mutex during CreateHeap block growth (D3D12-POOL-SMALL-GROW-UNLOCKED)
2026-12-01 23:12:28 +00:00
ef4100f545 tests: verify cs_w64x_partial_swizzle encoding lengths and branch displacement 2026-12-01 17:07:07 -06:00
facd4fb122 tests: the retry test needs a real collision and a fresh probe name
The mocked open succeeded on its third call whatever the path, so generating the
probe name once before the loop still passed. The test now pre-creates the first
probe, patches secrets.token_hex with two names and keeps the real os.open.
Reported by andrew-ai on the carry PR.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 00:05:41 +01:00
97868b9ce8 exe_checklist: keep the note when a bold marker run closes after it
**VERIFY: check the stride** before release lost its whole note (the bold branch
of without_marker() dropped everything up to the closing **). A bold run that is
only the label still goes whole; a bold run that holds the note keeps it.
Reported by andrew-ai on the carry PR.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 00:05:00 +01:00
9cedb84c93 d3d12 hwrt: review fixes (transform opcodes, no hardware path without DXR 1.1, cleanup)
- rq_op: 187 is CandidateWorldToObject3x4 and 188 CommittedObjectToWorld3x4 (they were
  swapped; checked against dxc 10.0.26100). the_ray_query_opcodes_are_dxils pins all 35.
- Hardware ray tracing runs only where it can: hwrt::active() (asked for, and a DXR 1.1
  manager made) gates the HLE module, the left-out passes, the copy-back rule and the counters;
  the translator lifts loops only when the host says it runs inline ray tracing
  (set_host_inline_rt, in host_settings and so in the shader cache's key). Elsewhere the title
  keeps its own XboxBvhBuilder.dll and the software walk.
- No env write: builder_allowed() is LEONIDA_BVH_BUILDER=1 and not hwrt::active().
- dxr.rs removed (nothing bound its wrappers); TLAS views are kept out of the list views only
  with the path on; the off16 diagnostics and the xmem log lines are gone.
- as_sizes split out of alloc_or_reuse_as, with a test; the known gaps are in
  fork-ray-tracing.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 00:01:01 +01:00
4058dc8970 tests: include gfx1013 encodings in cs_w64x_partial_swizzle disasm fixture 2026-12-01 16:54:10 -06:00
f483189624 game_run_summary: the caller-cgroup peak is a lifetime peak
Without a systemd scope the saved value is the caller cgroup's lifetime
peak, not the run's; the summary line says so now.

AI-assisted.
2026-12-01 23:52:29 +01:00
8642cbe542 game_run_summary: pair each skipped int3 with its own breakpoint
A trace can skip an assert and later stop on a real breakpoint. The global
`int3_skipped` veto hid the later one; each skip now consumes one preceding
`0x80000003` exception at the same recorded address, so only a breakpoint
the trace actually skipped stops naming the end. The test covers a later
breakpoint at another address and a repeat at the same one.

AI-assisted.
2026-12-01 23:41:19 +01:00
56e112a060 Merge main into #632: keep main's doc_notes list handling, the PR's other fixes apply
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 23:37:05 +01:00
913b88b905 Merge pull request #2884 from lixonik/fix/timeline-stall-test-parallel-flake
d3d12-gpu: stabilize global stall routing test under parallel diagnostics runs
2026-12-01 22:35:46 +00:00
002bd88f86 Merge pull request #2876 from kirigayakazima/fix/rpf9dump-util-safe-names
rpf9dump: harden Util.Safe for cross-platform and Windows filenames
2026-12-01 22:35:42 +00:00
f4c312a1b6 Merge pull request #2788 from bobcatchris/perf/d3d12-bdd-unique-compact
D3D12-SHADER-BDD-UNIQUE-COMPACT: open-addressing unique table for the BDD nodes (-3 % wall, DXIL identical)
2026-12-01 22:35:37 +00:00
b511bfec36 Merge pull request #2882 from lixonik/fix/shader-build-runtime-manifest-dir
d3d12-shader: read CARGO_MANIFEST_DIR at runtime in build.rs
2026-12-01 22:35:34 +00:00
9196ad1146 Merge pull request #2858 from Kal0s-design/fix/console-insn-checked-ranges
d3d12-loader: console_insn range checks don't overflow at the top of memory (D3D12-LOADER-CONSOLE-INSN-CHECKED-RANGES)
2026-12-01 22:35:30 +00:00
7d05a02dea tests: make the published_mode fallback test check what it claims
The old assertion (S_IMODE(mode) == mode) passes for any 9-bit integer, even 0.
The test now mocks new_file_mode, checks the target's own directory is probed and
the sentinel is returned, and a second test checks an existing file keeps its mode.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 23:35:10 +01:00
4671c9aee1 Merge #495 head into main 2026-12-01 23:34:40 +01:00
06e0c16433 Merge pull request #2973 from MoonEyes/carry/278
rdna2spirv: decode gfx1013 VOP3 0x16b opcode (BUILD-1529, carry of #278)
2026-12-01 22:34:11 +00:00
afe0b798f4 Launcher tests and docs for -PrecompileAll
- tests: -PrecompileAll is among the switches checked against play-d3d12.ps1,
  and it is passed only with the precompile on.
- README.md, docs/launcher.md, d3d12/README.md: the switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:30:37 -05:00
32f0fe3ad9 leonida warm: only pipelines drawn with go into the pipeline library
With -PrecompileAll every known pipeline is made (some 88,000 against 4,000
drawn with). Those never drawn with now stay in the driver's cache alone and
are kept out of the pipeline library: the driver checks an entry of its own
cache against the pipeline asked for and compiles again where they differ,
while a library entry is taken as it was stored.

With them in the library (1.5 GB, 91,525 entries) the device was removed
twice during a burst of first loads in a new place (RTX 3060, driver 621.40):
no hang, no page fault, the library file whole. With them kept out, a run of
the same settings stayed up. The cause inside the driver is not known.

The rule is into_library(), with a unit test that fails without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:30:37 -05:00
c6f253705d Launcher: option to precompile every known pipeline (-PrecompileAll)
The precompile makes only the pipelines earlier runs drew with (warm --used).
-PrecompileAll (launcher: "Precompile every pipeline", off by default) makes
every pipeline the title has created, as foxhound's launcher does: fewer
stalls in places not drawn in yet, at the cost of an hour or more and
gigabytes the first time. Kept across the F1 menu's restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:30:37 -05:00
ddee96da7e game_run_summary: a skipped int3 is not the title breakpoint
`LEONIDA_SKIP_ASSERTS` records each stepped-over int3 as an exception and
`int3_skipped`, and `LEONIDA_UNIMPLEMENTED=stop` also exits 3, so the old
condition reported such a run as a title breakpoint. The trace's
`int3_skipped` event now vetoes the word, and the docstring says a device
loss and a skipped int3 both win over it.

AI-assisted.
2026-12-01 23:26:39 +01:00
60faf88cf2 deps: bump third_party/rpf9-explorer from 73e9400 to cab9bb6
Bumps [third_party/rpf9-explorer](https://github.com/breadbbbb/rpf9-explorer) from `73e9400` to `cab9bb6`.
- [Release notes](https://github.com/breadbbbb/rpf9-explorer/releases)
- [Commits](73e940075c...cab9bb6ebe)

---
updated-dependencies:
- dependency-name: third_party/rpf9-explorer
  dependency-version: cab9bb6ebe6d46fec6ac90ee5004bdd8cfd9e31a
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-12-01 22:16:37 +00:00
1abef08d09 Merge pull request #2902 from budanga/fix/boot-ps1-python-alias
boot.ps1: take a Python that starts and is 3.12+, not the Microsoft Store alias (BOOT-PS1-PYTHON-ALIAS)
2026-12-01 22:15:01 +00:00
2b32249727 game_run_summary: a 0X-prefixed exception code is the same code
The startup trace's exception-code filter accepted `0x` but not `0X`, so a
trace spelling the breakpoint `0X80000003` classified the exception as
`(other)` and the end fell back to the generic process exit. `_same_code`
already lowercased, so only the filter was strict. The test now covers all
three spellings; it fails on the old filter and passes with it.

AI-assisted.
2026-12-01 23:14:22 +01:00
c37e311384 Merge main into #278: keep both new decode tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 23:13:03 +01:00
7c69bc8b19 d3d12: the threads of a frame share its pipeline wait budget and none is left with nothing (D3D12-COLD-START-SKIPS)
The shared frame budget was a reservation: the first recording thread to
wait in a frame took all that was left of it, and every other thread of
that frame (and any thread still on an older frame) got nothing, so its
draw went out without a wait and was dropped as not made. On first starts
(no pipeline book) 400 to 3,600 draws, dispatches and indirect executions
a frame were dropped at the arrival in the world, and the character's
head, drawn by a pass the title runs once, stayed missing for the run.

- The frame's waits are counted once over the threads that wait at the
  same time: what passed while at least one thread waited. A thread that
  begins to wait while others do is left what is left at that count, so
  waits that overlap still cost the frame its budget once; the time a
  thread records between two waits is not counted; a thread on an older
  frame joins the current frame's waits and opens no budget of its own
  (#2601). On by default; LEONIDA_PIPELINE_WAIT_DEADLINE=0 reserves the
  frame's budget as before (no effect with LEONIDA_PIPELINE_WAIT_SHARED=0);
  LEONIDA_AB can turn it while the title runs.
- A pipeline's own budget (LEONIDA_PIPELINE_WAIT_ONCE) is charged the same
  way, the real time once, not the threads' times added up, whatever the
  sharing of the frame's budget (LEONIDA_PIPELINE_WAIT_ONCE=0 turns that
  budget off).
- The queue a wait moves its pipeline forward in and the budget a
  pipeline's waits count against are passed in, so that tests cover them;
  one line tells the rules in use at the first wait.

AI-assisted: Claude Code (Claude Opus 5.5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 23:10:50 +01:00
9fc7de03e3 game-gate: the DLSS preflight follows the switch PowerShell binds (D3D12-F1-DLSS-REBUILD)
The preflight added in 218b0328b read -NoDlss out of -PlayArgs with a pattern over
the text. Two reviews of the pull request showed where that goes wrong:

- `-NoDlss: $true`, a space after the colon, binds true, and the gate refused the
  run and asked for a DLSS rebuild (andrew-ai, PowerShell 7.6.9);
- `-Adapter 'Fixture -NoDlss Adapter'` binds no switch, and the gate let the run
  go on into a build inside the run (merzleckeier, PowerShell 7.4.21).

The gate now asks PowerShell itself: Test-NoDlssBound takes the param block of
scripts\play-d3d12.ps1 and lets it bind the arguments the launch line gives the
script (-Game, -Data, -More, then -PlayArgs); nothing of the play script runs.
The first thing the probe writes is the answer, so text behind a `;` in
-PlayArgs cannot stand in for it. Arguments PowerShell cannot bind (an ambiguous
-No, a switch that does not exist, a value outside a ValidateSet) count as
-NoDlss not said, as the start itself fails on them, and the refusal then says
that they did not bind and with which error. The probe is reached only when the
build's note, the SDK and cargo already say the play script would build.

tests/test_game_gate.py takes the function out of the script and puts 19 lines of
-PlayArgs to PowerShell 7 against the real play script's parameters: bare,
shortened, :$true, : $true, :$false, : $false, alone and among other switches,
the quoted adapter name alone, with -NoDlss:$false and with a real -NoDlss, an
argument that does not bind, and a `; $true` behind the arguments (skipped where
there is no pwsh). A second test holds that no pattern is matched against
-PlayArgs any more.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 00:05:03 +02:00
3fdfbaa46f d3d12: hardware ray tracing on DXR 1.1 (LEONIDA_HW_RT, off: a trial)
In place of -RayTracing (the title's structure builder and software traversal as translated
shaders): the title's XboxBvhBuilder calls become host DXR 1.1 bottom and top levels, and the
traversal loops of its trace programs become inline ray queries.

Ported from trustno1-coder/VIctory-NVIDIA (its #3706; from Leslie-d-a/VIctory-NVIDIA-HWRT 61e389e0
and 5f55bca8, original by dakisback2 ecc49d5b and 72f8316a), GPL-3.0, and fitted to this tree:

- leonida-shader: emit/rayquery.rs wired into lower.rs (the plan, the handles, TLAS root SRVs
  t230..t241, the analyses that leave the lifted loops out). A program in the paired form is not
  lifted. With LEONIDA_HW_RT=1 the node test of a loop left unlifted misses every node
  (emit/intersect.rs bvh_miss): the console structures are never written then.
- leonida-gpu: hwrt.rs (and dxr.rs for its records); list::external with a LEONIDA_THIN op for the
  structure work at its place in a title list; the TLAS views in the descriptor heaps;
  Deferred::held; the ray queries in the shader cache's entries; counters in the frame log.
- leonida-hle: modules/xboxbvh.rs replaces the exports of the title's XboxBvhBuilder.dll when on.
- With it on the light stand-in stands aside and the passes left out without structures run.
  Shader writes are not all copied back as VIctory-NVIDIA does (LEONIDA_HW_RT_COPY_BACK=1 asks for
  it): here that stretched and flickered textures and cost 30 to 45 ms a frame.
- F1: HARDWARE RAY TRACING (TRIAL); play scripts: -HardwareRT (frame generation left off with it,
  as with -RayTracing); launcher: a checkbox. Docs: fork-ray-tracing.md, README.md, switches.md.

One PC (RTX 4070 12 GB, driver 621.40, Series X profile, no frame generation): 22 to 25 frames a
second against 6 with -RayTracing; the run ended after six minutes with the card's memory full.

Co-authored-by: dakisback2 <90546900+dakisback2@users.noreply.github.com>
Co-authored-by: Leslie-d-a <70692092+Leslie-d-a@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 23:04:12 +01:00
1228aad135 scripts: the help tests cover -h too, and play-linux names LEONIDA_GAME_DIR
Dropping -h from run_wine_session.sh or check_no_game_data.py now fails the
test that covers it, and play-linux.sh's usage lists LEONIDA_GAME_DIR with
the other path variables (it already honours it).

AI-assisted.
2026-12-01 22:45:38 +01:00
c4ca576150 Merge pull request #2910 from c0pperlane/doc-d3d12-vulkan-stale-status
docs/d3d12_vulkan.md: drop stale "not implemented" status for buffer SRVs, streams, mesh PSOs and WriteBufferImmediate (DOC-D3D12-VULKAN-STALE-STATUS)
2026-12-01 22:45:03 +01:00
1a52f5b63f Merge pull request #2934 from bobcatchris/test/d3d12-switches-page-drift
D3D12-DOCS-SWITCHES-TEST: fail standalone tests when d3d12/docs/switches.md drifts
2026-12-01 22:35:04 +01:00
c9c5cc589f d3d12-hle: handle mirrored Sony pads in connected_pad, test Host::observe, and update docs 2026-12-02 00:01:18 +03:00
9867afb74e Merge remote-tracking branch 'origin/main' into HEAD 2026-12-01 23:55:12 +03:00
1fff691295 Merge pull request #2873 from kirigayakazima/fix/d3d12-clippy-workspace-clean
d3d12: fix remaining workspace clippy warnings
2026-12-01 21:54:04 +01:00
9b3b78b5d8 Merge pull request #2824 from Kal0s-design/fix/xasync-composite-terminate
d3d12-hle: terminating a composite task queue cancels only its own tasks (D3D12-HLE-XTASKQUEUE-COMPOSITE-TERMINATE)
2026-12-01 21:53:51 +01:00
bc332322eb Merge pull request #2862 from djrolfes/djrolfes/shader-sampler-handle-cache
shader/emit: cache immediate sampler handles in entry block (D3D12-SHADER-SAMPLER-HANDLE-CACHE)
2026-12-01 21:53:38 +01:00
218b0328b8 game-gate: no run with a build the play script would make again for DLSS (D3D12-F1-DLSS-REBUILD)
The gate refuses to run without a build, because the play script would make
it inside the run. Since the change before this one, play-nvidia.ps1 also
makes a build noted as made without DLSS again once NVIDIA's SDK is there,
whatever the start's switches ask for: on such a checkout that build too
would be made inside the run, after the gate wrote down the exe's hash and
what it was built with. The gate now refuses that run as well and names the
build script. Not with -NoDlss in -PlayArgs (shortened or with :$true too)
and not without cargo: the play script makes no build then.

That commit's message calls this guard a follow-up, for want of PowerShell 7
on the PC it was written on; it has been installed since, and this is it.

Checked with PowerShell 7.7.0: the guard's own lines against a synthetic
folder, eleven cases; and the whole script twice. With a build noted as made
without DLSS and the SDK there it refuses before anything starts (exit 1, no
run folder). With a build noted as made with DLSS it goes on as before:
run.json carries built_with, and the run ends at once with ERROR not_started,
there being no game in the folder.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 22:43:34 +02:00
1e3e316c5e Merge pull request #2861 from djrolfes/djrolfes/shader-bounded-extensions
shader/opt: extend Module::bounded() to zero-identity Add/Sub and budgeted acyclic Phi (D3D12-SHADER-BOUNDED-EXTENSIONS)
2026-12-01 21:34:22 +01:00
66c79286f6 Merge pull request #2860 from djrolfes/djrolfes/shader-wide-builder-bounds
shader/lower: preserve builder_bounds root header size guard when WIDE loads are enabled (D3D12-SHADER-WIDE-BUILDER-BOUNDS)
2026-12-01 21:22:22 +01:00
19d5f83cd5 Merge pull request #2935 from OreoFR/ci/merge-queue
ci: the workflows behind main's required checks also run on merge_group (CI-MERGE-QUEUE)
2026-12-01 21:13:32 +01:00
c4058242c9 ci: the workflows behind main's required checks also run on merge_group (CI-MERGE-QUEUE)
So a merge queue can be turned on for main. `ci.yml` (change-scope, check,
linux-python-and-viewer, semantic-tests) and `no-game-data.yml` (no-game-data)
gain a `merge_group:` trigger. In the queue `change-scope` is skipped (it reads
a pull request's diff), which counts as passed for a required check, and the
jobs after it run in full. Their concurrency groups fall back to run_id there,
so queued runs never cancel each other.

Agreed to by a second human maintainer (Aslan).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:57:13 +01:00
2190bf988f tests: verify tracked d3d12/docs/switches.md matches d3d12_switches.py --check 2026-12-01 13:56:28 -06:00
99a29d10ee Merge pull request #2932 from ProjectLeonida/readme-fix
fix discord link and remove redundant
2026-12-01 14:49:18 -05:00