Commit Graph
1401 Commits
Author SHA1 Message Date
trustno1-coder 06dce657a4 Merge pull request #32 from wike1701/fix/suppress-mouse-in-f1-menu
fix(hle): suppress mouse motion and buttons while the F1 settings menu is open
2026-11-27 03:00:23 -08:00
wike1701 86a3976007 fix(hle): suppress mouse motion and buttons while the F1 settings menu is open
Host::keys already suppresses keyboard input when victory_gpu::SETTINGS_MENU_OPEN is set, but Host::mouse did not. With VICTORY_MOUSE_CAPTURE=1, moving or clicking the mouse while the F1 menu was open still rotated the in-game camera and sent clicks to the game.

Keep calling captured_mouse_delta() so the cursor reference stays current, discard the delta and clear button bits while SETTINGS_MENU_OPEN is true, and keep the virtual mouse connected at its preserved position so closing F1 produces no camera jump or disconnect/reconnect churn.

Tested with cargo test -p victory-hle --lib modules::gameinput (17 passed, 0 failed) and cargo xtask policy (280 files ok).
2026-11-27 11:53:18 +01:00
trustno1-coderandClaude Opus 5.5 9341f4316f PLAY_FRAMEGEN.bat is PLAY_FRAMEGEN.cmd: the repository's file policy allows .cmd, not .bat
#20's menu launcher failed xtask's policy (policy::tests::repository_passes_policy).
The same file under the extension the policy allows; cmd.exe runs it the same way.
Its own usage lines and the script's header name it anew.

Checked: xtask policy tests pass (6).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:52:13 -08:00
trustno1-coder 3f60eeee0b Merge pull request #29 from Ahyildiz/fix/ambient-probe-garbage
Ambient: drop violet probe garbage before the raise (purple blotch on lit paper)
2026-11-27 01:45:58 -08:00
trustno1-coder dc6dc87098 Merge pull request #28 from wike1701/fix/dynamic-slot-heap-identity
GPU: release dynamic descriptor slots only to the host heap that allocated them
2026-11-27 01:45:53 -08:00
trustno1-coder 7c04c61735 Merge pull request #24 from CuteBooty/fix/raw-view-clamp
fix(gpu): raw buffer views stay inside their buffer (VICTORY_RAW_VIEW_CLAMP)
2026-11-27 01:32:00 -08:00
trustno1-coder b98279b65e Merge pull request #22 from Indy2l/perf/helper-priority
perf(cores): run the submitting thread's helpers at its priority
2026-11-27 01:31:55 -08:00
trustno1-coder 1a94d3ad55 Merge pull request #26 from CuteBooty/feat/skip-bink
feat(hle): skip the title's Bink movies on request (VICTORY_SKIP_BINK, off by default)
2026-11-27 01:31:50 -08:00
trustno1-coder 40219cee70 Merge pull request #23 from CuteBooty/fix/bc7-rotation
fix(formats): BC7 rotation only in modes 4 and 5 (BCPack)
2026-11-27 01:31:46 -08:00
AhyildizandClaude Opus 5.5 826ba150c8 Ambient: drop violet probe garbage before the raise (purple blotch on lit paper)
The probes' resolve can leave magenta/violet leftovers from other memory in
the light image. The raise pass caps what it keeps by luminance only, which
weights blue at 0.07, so a blue-heavy leftover passes the cap and shows as a
saturated purple-blue glow on bright surfaces (a sheet of music on the wall
in the prison cell cutscene, Series S, DLSS off, RTX 5080).

VIctory-Belobug-AMD drops magenta leftovers here (ambient.rs, "Filter
magenta garbage probes"); that line is ported, plus one for the bluer kind
(blue over 2.5x green and over red) that the first leaves as a faint violet.
Sky light (green above 0.4x blue) and sunsets (low blue) are not touched.

Checked with VICTORY_CAPTURE frames of the same cutscene: the glow is gone
in two runs; frame time unchanged (~35 ms median, 25-27 fps). Turning off
VICTORY_AMBIENT_SPECULAR, VICTORY_AMBIENT_AIR or all VICTORY_AMBIENT*
does not remove it (it is the title's leftover, unbounded with the raise off).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 12:28:57 +03:00
wike1701 47747d6236 GPU: release dynamic descriptor slots only to the host heap that allocated them
Port of fxceless/victory-fork#1324 (commit 52ac4ec, GPL-3.0).

HostHeap::release previously matched only the title heap's pointer address. When a title releases a shader-visible heap before lists referencing it are reset, and a new heap is allocated at the same address, resetting the older list freed dynamic slots belonging to the new heap. On NVIDIA (where VICTORY_DYNAMIC_SLOTS=524288 is active), two live command lists could then overwrite each other's descriptors.

Each HostHeap now gets a monotonic identity (NEXT_ID) recorded alongside dynamic slot ranges in draw::State::dynamic and checked in HostHeap::release.

Tested with VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --lib --features diagnostics descriptor:: (50 passed, 0 failed), including dynamic_slots_are_given_back_only_to_the_heap_that_took_them.
2026-11-27 10:04:21 +01:00
Indy2landClaude Opus 5.5 80c70b719f perf(cores): run the submitting thread's helpers at its priority
The submitting thread runs above normal, but the threads it waits for
(the wide pool, the landing pools, heap records, the heap pass beside
the lists) ran at normal priority, level with the title's threads and
the list translators. On a six-core CPU they were often not running
while it waited. VICTORY_HELPER_PRIORITY (on unless 0, VICTORY_AB can
flip it) raises them to above normal.

A/B in one run on an i5-12400F with an RTX 3060 (run10, Series S at
540p, off / on): 8.6 / 9.6 fps, refreshes 23.1 / 17.6 ms a frame,
waiting for heap records 6.2 / 2.5 ms, card idle behind the submitting
thread 24.7 / 13.2 ms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 09:44:12 +01:00
trustno1-coder 18a8dc2640 Merge pull request #21 from yualk/fix/embedded-dxbc-extent
fix(cli): hash only the embedded DXBC container
2026-11-27 00:25:18 -08:00
Yusuf Al-Khawaldeh b1369afb40 fix(cli): hash only the embedded DXBC container
Validate and use the declared DXBC byte extent when scanning an embedded shader. Keep the borrowed slice and offset, and leave packed inputs unchanged.

Tested on Windows with the focused embedded-container regression and a synthetic CLI run.
2026-11-27 03:15:56 -05:00
CuteBootyandClaude Fable 5.2 e31f474068 feat(hle): skip the title's Bink movies on request (VICTORY_SKIP_BINK, off by default)
VICTORY_SKIP_BINK=1 skips the movies that play once (logos, the intro);
=all skips the looping ones too. Unset, nothing changes: no import is
rebound. The title's own Bink DLL still opens each movie; the exports a
player loop calls on an open movie (BinkWait, BinkDoFrame*, BinkNextFrame,
BinkGoto, BinkShouldSkip, BinkClose) are bound to wrappers that put a
skipped movie on its last frame, so the title's own end-of-movie check ends
it at once.

Wiring for this tree (run.rs): SkipMovies wraps WithTitleDlls at startup,
so the executable's and its DLLs' imports go through it, with the
FidelityFX Interpose on top (it only looks at its own DLL and is unchanged);
and it wraps the resolver LateDlls binds DLLs the title loads later with.

Original author: C-GDev (fxceless/victory-fork pull request 613, 75fe122c;
the idea is from XCL pull request #1053, the code was written anew for
VIctory's loader). Ported by hand from CuteBooty/victory-8gb.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-27 00:56:49 -07:00
CuteBootyandClaude Fable 5.2 aec85efb10 fix(gpu): raw buffer views stay inside their buffer (VICTORY_RAW_VIEW_CLAMP, on; =0 restores)
raw_at / raw_uav_at: a range past the buffer's end is shortened to the
whole dwords that fit; an unaligned start, or one with no whole dword left,
becomes a null view. The meter line counts the cuts (past end, shortened,
sub-dword, unaligned) for SRVs and UAVs. On by default;
VICTORY_RAW_VIEW_CLAMP=0 gives the old descriptors.

Original author: lichenlang89 (fxceless/victory-fork pull request 1266,
dd5e8c9e). Ported by hand from CuteBooty/victory-8gb, same code and tests;
the counters go into this tree's meter line in host.rs.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-27 00:56:48 -07:00
fxcelessandClaude Fable 5.2 6726920a80 fix(formats): BC7 rotation only in modes 4 and 5 (BCPack)
BCPack blocks of modes 0-3, 6 and 7 with nonzero control bits 4:3 swapped
channel precisions and dropped the p-bit; only modes 4 and 5 have a BC7
rotation field. Always on (no switch), with a test.

Original author: fxceless (fxceless/victory-fork main 06702fe8, after
upstream VIctory pull request #3111). Carried in CuteBooty/victory-8gb;
applied here without conflicts.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-27 00:49:16 -07:00
trustno1-coder c437b0594b Merge pull request #20 from Blitzball996/feat/dualsense
Feat/dualsense
2026-11-26 23:00:31 -08:00
Blitzball996 ad76e50520 Local: extreme Series X mode (6), frame generation 4x on RTX 50 (GTA6_FRAMEGEN_X overrides) 2026-11-27 14:47:16 +08:00
Blitzball996 9018b2c383 Local: one-click launcher (save backup, DLSS fetch, frame generation, tuned worker pools, extreme mode) 2026-11-27 14:43:53 +08:00
Blitzball996 025abd3dc8 Input: PS5 pads (DualSense, DualSense Edge) read from HID, over USB or Bluetooth
XInput is read first; HID pads take the slots XInput leaves free (VICTORY_DUALSENSE: 0 off, 1 both, unset auto). dualsense.rs is taken unchanged; Host reads XInput in xinput() and keeps the HID owner of each slot; victory-hle gets Win32_Devices_DeviceAndDriverInstallation and Win32_Devices_HumanInterfaceDevice. The mouse capture (#17) and F1 menu paths are unchanged.

Source: LooperSalty/AnyXboxX third_party/victory crates/victory-hle/src/modules/gameinput/dualsense.rs
2026-11-27 14:43:53 +08:00
trustno1-coderandClaude Opus 5.5 06afe633e6 Window and input from #17: asked for, off by default, in the F1 menu
Fullscreen, the English keyboard and the mouse capture now run only when
asked for (VICTORY_FULLSCREEN=1, VICTORY_MOUSE_CAPTURE=1,
VICTORY_IME_ENGLISH=1), so a start that sets nothing keeps the window and
input as before. The F1 menu has the three of them (FULLSCREEN (NO BORDER),
MOUSE CAPTURE, ENGLISH KEYBOARD); a change applies at the next start.

Checked: victory-hle, victory and the menu tests, with the three unset and
with all three set to 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 21:53:38 -08:00
trustno1-coder c8212dfe92 Merge pull request #17 from superboynick: window and input (fullscreen, English IME, mouse capture) 2026-11-26 21:49:45 -08:00
trustno1-coderandClaude Fable 5.2 48ad7859fb victory play: the program alone, beside the title, is all there is to start
Started with no command (a double click) or as `victory play [exe]`, the
program finds game_scarlett_master.exe beside itself and starts it with the
settings scripts\play-foxhound.ps1 gives it, built in (apps/victory/src/play.rs):
the same switch table, what the F1 menu saved over it, DLSS and frame
generation made ready where NVIDIA's files are, the frame rate cap, and
`--set NAME=VALUE` for anything else. Nothing is written beside the program
or into the title's folder: the menu's settings file, a log for every start
(play-<utc>-<pid>.log, the newest ten kept) and NVIDIA's files are under
%LOCALAPPDATA%\victory, where the caches and saves already are.

NVIDIA's DLSS and frame generation files stay NVIDIA's and are not part of
the program: a first start without them asks once whether to fetch them from
NVIDIA's GitHub, and `victory get-dlss` does it later (the fetcher script,
embedded, with a new -To).

victory-core logging: VICTORY_LOG_FILE adds a plain-text log file.

README: the quick start is the release's exe (download, put beside the
title, double click); building it yourself is kept below.

Checked on an RTX 5070: no title beside it (a clear error), a file of that
name (found, Streamline loaded), get-dlss (66.6 MB in 38 s, files identical
to the SDK's), two muted runs of the title from a folder of the program's own
(25-28 fps in the opening rooms, right picture, nothing written beside it),
and a start from the title's folder by the user.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 21:28:35 -08:00
trustno1-coderandClaude Fable 5.2 1010e02314 README: how to run it, at the top (what you need, four commands, F1 and F3)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 21:02:15 -08:00
trustno1-coder a0fb040c96 Update README.md 2026-11-26 20:51:35 -08:00
trustno1-coderandClaude Fable 5.2 35c156087e Open water without dark blocks; the F3 stats panel in every build
Water: on hosts of 32-lane waves the water's two tiled light programs
(water_shading:CS_TransmissionVolumetrics_Tiled 5dc3b25986622949 and
_Tiled_LocalLights 6f225b641c5b0708) translate in the wave-wide form only,
and in that form leave whole tiles of open water dark (around boats, along
shores, under bridges) at about 15 ms of the card a frame. They are left out
there (pipeline/make.rs); VICTORY_WATER_LIGHT=1, or WATER LIGHT in the F1
menu, runs them as before. Runs on a copy of a save on the first boat ride,
RTX 5070, Series X 1440p DLSS Quality: 25 fps with the blocks before, 30 fps
without them after; the water is darker and bluer without that light.
fxceless/victory-fork's README of 2026-11-27 names the same two programs and
form.

Stats panel: host/panel.rs is built without the diagnostics feature too (the
recording time is counted in diagnostics builds only), has a frame generation
line, and is switched by F3 or by STATS PANEL (F3) in the menu, live. The FPS
line at the top is hidden while the panel shows.

README: both, and where the panel is.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 20:39:26 -08:00
superboynick 4a0c8ea373 Window and input: fullscreen, English input method, and a mouse capture that leaves the pointer alone
Three switches, each on by default, each 0 restoring the behaviour before it: VICTORY_FULLSCREEN (borderless, VICTORY_FULLSCREEN_RES for another size), VICTORY_IME_ENGLISH (the window's input context to en-US), and VICTORY_MOUSE_CAPTURE (clip to the client area and hide the pointer, release on focus loss).

Capture also fixes a mistake in the mouse device merged as #9: it warped the pointer back to the centre after every sample, which pins the absolute position the title reads and makes the camera look frozen. Warping is now VICTORY_MOUSE_WARP, off by default; with it on the delta is taken from the centre.

Measured on an RTX 5070 Ti Laptop (12 GB): window 0,0-1920,1080 with a client area of the same size and GetClipCursor returning it. cargo build --release and --profile diag pass, cargo test -p victory-hle: 162 passed, 2 ignored.

Written with an AI assistant.
2026-11-27 12:12:12 +08:00
trustno1-coderandClaude Fable 5.2 9d6300fa2d README: what this fork brings, said in full (rendering fixes, speed, picture, playing it, testing)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 19:50:05 -08:00
trustno1-coderandClaude Fable 5.2 caab8b4e2c README: this fork's own work across the projects it was built from, with foxhound as today's base
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 19:46:48 -08:00
trustno1-coderandClaude Fable 5.2 4db427792f Merge the fork's main until 2026-11-26 into the foxhound base (its tree is kept in history, not in the files)
This fork's files are now foxhound's with this fork's additions on top. What main held before (CGBJ's renderer with DLSS through the DLSS SDK, the first F1 menu) stays reachable as this merge's second parent.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 19:41:59 -08:00
trustno1-coderandClaude Fable 5.2 22c6be2e76 F1 settings menu, frame generation 2x-6x live, no frame rate cap, FPS line
On readmet3xt-lab/foxhound 02fc18a, which becomes this fork's base.

- host/menu.rs: the F1 settings menu, in every build (it was in the
  diagnostics build only): DLSS mode and model, frame generation, frame
  rate cap, console profile, picture size, the light estimates and the
  main speed switches. Saved to victory-settings.txt, applied by the
  launcher at the next start; "save and restart" from the menu. The title
  gets no keyboard while it is shown (gameinput.rs).
- host/font.rs: the dot letters, moved out of the diagnostics panel so
  that the menu has them in every build.
- streamline.rs: VICTORY_FRAMEGEN_X=2..6, the frames shown for each one
  rendered (no more than the state says this card generates); 0: ready
  but off. The amount and off/on change while the title runs
  (set_framegen, from the menu). Result 39, "warning: out of VRAM", is
  taken as set: asked again at every present it showed no generated
  frame at all (1,828 times in one run on a full 12 GB card).
- The frame rate at the top left of the picture while the menu is closed:
  frames rendered a second, and with frame generation those shown
  (VICTORY_FPS_LINE=0: not). The window's caption says both too.
- scripts/play-foxhound.ps1: applies what the menu saved; -FrameGenX;
  -Fps defaults to 1000 (no cap: VICTORY_FRAME_INTERVAL_US=1000); frame
  generation is made ready at every start with Streamline so that the
  menu can switch it (-NoFrameGenReady: not), with a share of the card's
  memory held back for it (VICTORY_TEXTURE_ROOM_PERCENT 80 on, 86 ready);
  NVIDIA's files are looked for in nvidia-sdk\ here; builds the layer when
  it is not built. scripts/play-nvidia.ps1 is the same launcher under
  this fork's old name.
- Get-NVIDIA-DLSS.cmd / scripts/get-nvidia-sdks.ps1: fetch the eight
  NVIDIA files that are loaded (about 70 MB) out of NVIDIA's Streamline
  release into nvidia-sdk\ (git-ignored). They are NVIDIA's, under
  NVIDIA's licences, and are not part of this repository.
- README for this fork; foxhound's own is kept as docs/README-foxhound.md.

Measured on an RTX 5070 (Series X, native 2560x1440, DLSS Quality,
opening rooms): mostly 26-30 frames a second rendered; in Streamline's
own check 2x, 4x and 6x show exactly 2, 4 and 6 frames for each one
rendered.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 19:41:59 -08:00
trustno1-coderandClaude Fable 5.2 b190242f81 README: say first that DLSS is installed with Get-NVIDIA-DLSS.cmd and that F1 opens the menu
Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 18:11:06 -08:00
trustno1-coderandClaude Fable 5.2 63957271cd CGBJ's renderer, DLSS, an F1 settings menu, frame generation, ray tracing switch
The default of scripts\play-nvidia.ps1 changes: the game renders its own
720p and DLSS takes it to 1080p (Series S), in place of the half render
scale and the title's upscaler. -Resolution still reaches the older path.

- Renderer: codec-d/cool_fox f4b48ad (GPL-3.0) with this fork's NVIDIA
  fixes on top (residency.rs, stretch.rs, the ffx upscale dispatch).
- DLSS for the title's upscale, from avatarmanz/VIctory-7900XTX pull
  request 203 (feature `dlss`, VICTORY_UPSCALE=dlss), with
  VICTORY_DLSS_PRESET and a live sharpness setting.
- F1 settings menu in the game (host/menu.rs): saved to
  victory-settings.txt, applied by the launcher at the next start,
  "save and restart" from the menu. F3: the panel, now with the
  generated frame rate beside the real one.
- DLSS frame generation through NVIDIA Streamline (streamline.rs, fg.rs),
  2x to 6x, the amount changed while playing. Constants and the depth and
  motion vector tags are handed over at each present.
- VICTORY_FPS_CAP: the title's own 30 frames a second can be lifted
  (60, 120, none), live from the menu.
- Real ray tracing as an option (-RayTracing, VICTORY_BVH_BUILDER=1): on
  this renderer the structure builder runs on NVIDIA. Frame generation is
  left off with it: the two together run at about 0.1 fps, cause not found.
- VICTORY_HEAP_RECHECK_EVERY: textures picked by index looked at again
  for the whole run (a test against the posterized look).
- Get-NVIDIA-DLSS.cmd / scripts\get-nvidia-sdks.ps1: fetch the few NVIDIA
  files DLSS and frame generation need (about 70 MB) from NVIDIA's GitHub
  into nvidia-sdk\ (git-ignored). They are NVIDIA's, under NVIDIA's
  licences, and are not part of this repository. Without them the picture
  is stretched and there is no frame generation.
- scripts\build-nvidia.ps1; the launcher builds the layer when it is not
  built, and again with DLSS once those files are there.

Measured on an RTX 5070 (Series S, DLSS, opening rooms): about 15-17 fps
without ray tracing, 13-15 with it, before generated frames. What is known
to be wrong is in the README's new section.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 17:56:14 -08:00
trustno1-coder 9e7ab9d9a2 Merge pull request #13 from LucaruluDev/perf/diagnostics-only-filler
perf(resource): gate filler-twins statistics behind diagnostics
2026-11-26 17:10:06 -08:00
Local TestandClaude Sonnet 5 5b36758982 perf(resource): gate filler-twins statistics behind diagnostics
texture_at's filler-twins tracking (PLACED_RAW, PLACED_TWINS, and the
per-call block in texture_at that takes PLACED_RAW's own mutex and scans
previously-seen raw descriptions at the same address) exists solely to
feed placed_filler_twins(), whose only caller is copystat::log_memory --
itself compiled only with feature = "diagnostics". A build without that
feature paid for the second mutex, the BTreeSet, and an O(seen-so-far)
scan on every placed-texture lookup (hit or miss) with no consumer for
the result.

Gates PLACED_RAW, PLACED_TWINS, placed_filler_twins(), the `raw` binding,
and the tracking block itself behind feature = "diagnostics". The
functional cache (PLACED_TEXTURES) and its key (`key`, built from
VICTORY_PLACED_FILLER the same way as before) are untouched -- this
candidate never reads or writes PLACED_TEXTURES.

Independently reviewed before implementing (see
research/reviews/OPTIMIZATION_CANDIDATE_B_REVIEW.md): re-ran the
existing experiments/optimization-validation/filler.rs equivalence
tests myself (6/6 pass, both configs), confirmed the eliminated block
has no path into the functional cache, confirmed no equivalent change
exists upstream (checked ZJOU 477c395a directly -- it gates only the
getter, not the producer -- and did a fresh PR search).

Verified after implementing: cargo test --workspace --locked (27 result
lines) and cargo test -p victory-gpu --features diagnostics --lib (381
tests) are byte-for-byte identical in pass/fail/ignored counts between
this branch and an unpatched origin/main worktree. cargo clippy, both
CI invocations (with and without --all-features), produce an identical
error set to the same unpatched worktree (a pre-existing, unrelated
victory-formats issue blocks the workspace-wide command in both).

Does not implement candidate A (incremental VIEWS census) or the shapes
segmentation candidate, per instruction. No game files used, no push,
no PR.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-11-27 01:18:17 +01:00
readmet3xt-labandClaude Opus 5.5 02fc18a20a foxhound: README for the project page, launcher and full-screen script
README: what foxhound is (an NVIDIA RTX-tuned VIctory fork: DLSS Super Resolution and Frame Generation, Series X at
a native 2560x1440, no freezes at scene cuts), where it stands on the test PC, what is known to be wrong, what you
need, how to build it, set it up with your own copy of the title (victory.toml, NVIDIA Streamline, translating
shaders ahead), run it and warm its pipelines, the switches foxhound added, the docs, credits and license.

scripts/play-foxhound.ps1: the launcher with the tested settings; your executable is a parameter, DLSS is used
only when Streamline is found. scripts/fullscreen.ps1: makes the game's window borderless full screen.
The asset policy allows Python scripts (scripts/faultbook.py, our own fault-book reader).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 02:56:28 +05:30
readmet3xt-labandClaude Opus 5.5 9f6fb7790d Reflections stand-in: opaque surfaces only; the alpha layer with VICTORY_AMBIENT_SPECULAR_ALPHA=1
Play session 2026-11-27 (open water, the stand-in running every frame once its tables were found): dark ragged
patches lay on the water around a boat, following it. The alpha layer's rays are of transparent surfaces
(glass, foam, wakes), but the depth the stand-in reads is the opaque one behind them: on water, the bottom. The
normal and the reflected direction made of it are wrong and the estimate dark. The alpha layer is now left as
the title has it (sky light), as water already was; VICTORY_AMBIENT_SPECULAR_ALPHA=1 puts it back for interiors.
Counted with water on the 10-s line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 02:45:11 +05:30
readmet3xt-labandClaude Opus 5.5 9b91d2782c Reflections stand-in: the depth is the picture's, twice the rays' image each way
Run final-4 (2026-11-27 02:11): with placed views resolved the miss program's tables were found, but the stand-in
was still left out ("another image", format 26): the depth taken failed the size check. The depth must now be
twice the rays' image each way (1706x960 for 853x480) and 32-bit, at the usual place or found among the tables.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 02:15:51 +05:30
local 376f9832d6 Renderer port 1: know the 32-bit heap by the kind the title really asks with
Run port1-2: nothing was arranged and the heap was still scattered. The
title reserves it with kind 0x42000 (reserve, 0x40000), without the
64 KiB page bits, so it was not taken for a placeholder and was never
recorded. Any 32-bit reservation without commit is recorded now; the
test reserves the way the title does. A warning says once why pages
mapped there are left where they are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 9c23e8dd40cac6fb4a2aa8c804587e7c2e2a5853)
2026-11-27 02:08:02 +05:30
local 35c57d666e Renderer port 1: the 32-bit heap's pages get their section's slices in address order
Run port1-1: the title maps the five pieces of its 185 MB heap in another
order than their addresses, so the heap was views of one section in a
scattered order ("not one stretch of a section: Scattered") and nothing
was placed. With VICTORY_PORT_CONSTANTS=1 xmem now gives the page numbers
mapped into a 32-bit graphics reservation the slices at their offset in
it, when the reservation is all one section and both slices are fresh
(never mapped or written: no commit bit), which the title cannot observe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 4b82f6c259d7a693e0e30eaaafc4c5a54b77d9e8)
2026-11-27 02:07:51 +05:30
localandClaude Opus 5.5 9075710d14 Renderer port 1: the title's 32-bit graphics heap used in place (VICTORY_PORT_CONSTANTS=1, off by default)
The title's routine at image+0x1e86440 reserves 185 MB of graphics memory
below 4 GiB, splits it into five pieces, takes all their physical pages
in one XMemAllocatePhysicalPages and maps them in order: one stretch of
one section. Its 174 MB buffer at 0x34e10000 (the ring of constants, and
what the skinning passes write through one view of all of it) had a host
copy in the card's memory, ~17 MB a frame sent up in ~600 pieces, shader
writes fetched back and compared, and ~6,000 constant fills a frame.

With the switch the stretch is mapped once more at an address of ours and
opened as a host heap there (OpenExistingHeapFromAddress1); title buffers
and windows in it are buffers placed in that heap, the existing in-place
form of a host copy: nothing tracked, sent up, fetched back or compared.
The title's own views stay free to change; when it maps other pages
there the region is forgotten. A line on the frame-rate report counts
the CPU fills and buffer copies of ours that still read or write it.

Replay (play-1125-0127, heap in the PC's memory): the title's own work
+~3 ms on the card; the 30 ms added there are our compare passes, which
do not run over memory in place.

Ported from Belobug/VIctory-Belobug-AMD 86dc109 (author: local); conflict with heap_marks in host.rs kept both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 02:07:40 +05:30
readmet3xt-labandClaude Opus 5.5 bda6e597da Light stand-ins: placed texture views resolved; the stencil check reads the view's plane, not its levels
Run final-3 (2026-11-27 02:03): the reflections stand-in still never ran; the new line named the miss program
06bb6e728c7c99bf with its depth (0,1000) and most textures unresolved ("-"): those are views of textures the
title placed in its memory (View::Placed), which the lookup took for nothing. They are resolved through
placed_texture now, as the draw path does. The stencil check of 296ae68 read word 5 of the view description as
the plane; the union of D3D12_SHADER_RESOURCE_VIEW_DESC starts at word 4, so word 5 is the levels and the plane is
word 6: every one-level 2D view counted as a stencil plane (final-3 logged the diffuse stand-in's depth place
(0,464) as one, and the reflections' cube maps). Fixed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 02:06:55 +05:30
readmet3xt-labandClaude Opus 5.5 d226814d91 Light stand-ins: never a stencil plane as the depth; a miss program's tables logged when its image or depth is not found
The helper that read capture haze2 found the diffuse stand-in's depth place (0,464), after the
_ReflectiveCaustics variant 34fb51b8a0312e82, naming the stencil plane of the scene depth #6481: the estimate then
put every point far away with its normal to the camera (a likely part of the flat floors). A view of a stencil
plane (formats X32_TYPELESS_G8X24_UINT, X24_TYPELESS_G8_UINT, or a 2D view of plane 1) is not taken as depth any
more: another depth view of the program's tables of the image's size is (logged once).

For the reflections stand-in, which runs final-1 and final-2 show running in one 10-s window only ("other
tables" ~50 times a second): once per miss program whose rays' image or depth is not found, an info line lists
what its tables hold (kind, place, size, format, stencil), so the next run names them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 02:00:11 +05:30
readmet3xt-labandClaude Opus 5.5 f89b79db0c Reflections stand-in: the rays' image and depth found by kind where a miss variant binds them elsewhere
Run final-1 (2026-11-27 01:44, VICTORY_AMBIENT_SPECULAR=1): the stand-in ran in one 10-second window only (27
frames, 56 dispatches); 416 dispatches of CS_RayMiss were left as the title had them, the log saying "other
tables": variants of the miss program bind the rays' image and the depth at other places of their tables than
06bb6e728c7c99bf's (1,104) and (0,1000). Where the usual place has nothing, the first table entry of that kind
that fits is taken: a 2D R11G11B10 image; a 2D 32-bit depth (typeless or D32, with or without stencil) at least
the image's size and at most four times its width.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:51:40 +05:30
readmet3xt-labandClaude Opus 5.5 f1edd66379 Merge agent/submit: submitting thread's work (time split in release, host lists reused, a submission's batch kept, spread work wakes only the threads it needs; on) and heap-record switches VICTORY_HEAP_SYNC_FIRST, VICTORY_SYNC_IN_PLACE, VICTORY_SPANS_QUICK, VICTORY_SYNC_FINE, VICTORY_HEAP_SYNC_AT_SUBMIT (off; the last three ported from Belobug/VIctory-Belobug-AMD 15ab94e, a284ca7, 673be0e+a609a2f)
The helper was stopped before its final report (user asked for all work in the main branch); its branch was
clean and on a906dcc. Built and tested at this merge; not yet measured in the game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:28:17 +05:30
readmet3xt-labandClaude Opus 5.5 ff18de231c Merge agent/reflect: A stand-in for reflections without rays (VICTORY_AMBIENT_SPECULAR=<share>[,<sky>], off by default)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:26:46 +05:30
readmet3xt-labandClaude Opus 5.5 ac7a591601 Merge agent/haze2: Pixel programs keep the console's early depth test (VICTORY_EARLY_DEPTH=1, off by default)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:26:46 +05:30
readmet3xt-labandClaude Opus 5.5 2db59d4813 A stand-in for reflections without rays (VICTORY_AMBIENT_SPECULAR=<share>[,<sky>], off by default)
Without the structure builder every reflection ray the screen-space march leaves misses, and CS_RayMiss
(06bb6e728c7c99bf) writes the sky's light into the rays' texture (#38965, 853x480 R11G11B10, capture
C:\dev\captures\haze2): mean RGB (6.7, 10.9, 18.9) against (0.72, 0.44, 0.50) for the lit scene in the same
units, 100-1000x the room it should show and blue (the user's "reflections show a bright colour"; eyes glowing
blue-white, blue blotches on floors). Not a cleared or stale texture, and the cube maps are the sky's.

With the switch, right after each CS_RayMiss of opaque surfaces and of the alpha layer (not water: its first
root constant is 2), a pass of ours reflects the view direction about the normal made from the depth CS_RayMiss
itself reads (table (0,1000): #46202, a 1706x960 D32 target drawn in list 167 of the frame, before the trace)
and writes share x the light stand-in's directional estimate along it (ambient.rs, from
CS_CacheScreenSpaceRadiance), mixed with <sky> of the title's colour and never brighter than the estimate;
sky pixels (depth at the far plane) keep the title's value. CS_ResolveScreenSpace then writes its own hits
over it, so screen-space reflections stay. Expected cost under 0.15 ms a frame at 1706x960 (three dispatches).
A line every 10 s says it ran.

Written by a helper; built and tested at the merge into local/drive. A side finding to check: the diffuse
stand-in's depth slot (ambient::DEPTH, (0,464)) may name the stencil plane of #6481 after the
_ReflectiveCaustics variant 34fb51b8a0312e82.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:26:46 +05:30
readmet3xt-labandClaude Opus 5.5 41b4a056d6 Pixel programs keep the console's early depth test (VICTORY_EARLY_DEPTH=1, off by default)
A console pixel program whose DB_SHADER_CONTROL has DEPTH_BEFORE_SHADER
(bit 12, HLSL's [earlydepthstencil]) is translated with DXIL's
ForceEarlyDepthStencil flag when VICTORY_EARLY_DEPTH=1. The translator read
DB_SHADER_CONTROL but never used it, so every such program ran with the late
test on the host wherever it writes unordered views or discards, and its
writes to unordered views landed for pixels the depth test then rejected.

What that broke (capture C:\dev\captures\haze2, a character's head in front
of a window): the transparent pass (list 247; pixel programs
629743ca412296d4, 8ba01719b71d1d35, 5436c45060d74ebe and others,
DB_SHADER_CONTROL 0x1450) keeps the nearest transparent depth and its
velocity with 64-bit atomics in texture 46225 (R32G32, 1706x960); draw
271:34 (pixel 00ae3e9b98a0ae26, depth test ALWAYS, depth write on) writes
that depth into the scene depth 6481 and that velocity into the motion
vectors 38269 wherever it holds one. The glass, behind the head, wrote
there too: at the head's pixels in front of it the scene depth that the
heat-haze and in-scattering pass 731a39171b568298 (279:303) reads holds the
glass's (0.176, 0.85 m, for the head's 0.39, 0.38 m) and the motion vectors
hold the glass's velocity (-24, +31 where the head's own is +43, +35).
13.7% of that frame's transparent texels lie behind the opaque depth. The
haze pass picks heat haze (beyond 20 m) and in-scattering (beyond 137 m
there) by each pixel's distance, in 16x16 tiles: where the false depth is
far, it works on character outlines (expected cause of the blocks on hair,
not yet confirmed in a run).

The switch joins the shader cache's key only while it is on, so the default
translation and its cache entries stay as they were. Counted at the shader
cache's log line: programs given the early test, left late (switch off),
left late as they write depth or stencil. Tests: the decision, and a pixel
program translated with and without the switch (dxil.dll validates it).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:25:28 +05:30