Skip to content

Laptop GPU, Series S under 24 GB, faster copy-back and texture hashing, XG layouts from AnyXboxX - #4

Closed
spy0eye-beep wants to merge 23 commits into
realblastex:mainfrom
spy0eye-beep:lowspec
Closed

spy0eye-beep wants to merge 23 commits into
realblastex:mainfrom
spy0eye-beep:lowspec

Conversation

@spy0eye-beep

Copy link
Copy Markdown

Five changes for lower-end PCs, each its own commit, on main (7ca2674). Three of them change no output at all; one changes only the default profile; one corrects texture layouts.

The commits

  1. Use the discrete GPU on laptops (12b3f3a). The host device and the shader test host were made on the default adapter, which on a laptop with two GPUs is the integrated one. On an RTX 4060 Laptop + Intel UHD machine flamingo ran on the Intel UHD. Now the first hardware adapter in DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE order that creates a device is used (software adapters never), and logged. VICTORY_TEST_ADAPTER=n runs the tests on the n-th hardware adapter.
  2. Copy-back: changed runs found a word at a time (193711b). Same runs, 10-27 GB/s instead of 2-4 GB/s on masks of scattered writes (word_search_finds_the_byte_runs, mask_runs_speed). Merge and per-run writes unchanged.
  3. Big textures hashed on several threads (d988dca). The same BLAKE3 hash (the_wide_hash_is_the_hash); 0.58 ms instead of 3.7 ms for 16 MB here. Adds blake3's rayon feature.
  4. Series S by default under 24 GB (cf718bb). Without --console, a PC with less than 24 GB of physical memory runs as series-s; 24 GB or more (or unknown) stays series-x. --console is used as given. The choice is printed with its reason.
  5. XG layouts as Microsoft's library gives them (52d79dc), ported from LooperSalty/AnyXboxX (third_party/victory, Looper_Salty's xg: commits, GPL-3.0-or-later): tail mips in parent mode with their position, 64 KiB tilings by subresource. AnyXboxX found 84 texture descriptions that differed from xg_xs.dll. xg_oracle.rs compares with the real DLL only when given its path. This tree's only xg.rs change (not naming the title) is kept.

Considered and left out: freeing idle texture staging buffers (flamingo's pooled staging and late submissions make it unsafe without in-game testing), and the remap lock per 16 MB from JoshuuDev/victory-amd (its own runs found frame time unchanged by the finer locking).

Testing

cargo test --workspace --all-features, Windows 11, i7-13620H, 16 GB:

GPU Result
main as published Intel UHD (the default adapter) 736 passed, 12 failed, one test binary crashed
this branch RTX 4060 Laptop 750 passed, 6 failed, no crash
this branch, VICTORY_TEST_ADAPTER=1 Intel UHD 744 passed, the same 12 failed, no crash

The 6 failures on the RTX 4060 are main's own (barycentric_tests ×3, gs::tests::a_pair_is_a_vertex_shader_and_a_geometry_shader, rect::tests ×2); the 12 on the Intel UHD are those plus intersect_tests ×4 and two valu_tests, as on main.

  • cargo build --release -p victory: OK. rustfmt: no new differences in the touched files.
  • Not run with the title. Commits 2 and 3 are proven equal to the old code by tests; 1, 4 and 5 change what runs and should be tried in game.

AI-assisted (Claude).

🤖 Generated with Claude Code

Flamingo and others added 21 commits November 25, 2026 10:47
…box Series title

Snapshot of fxceless/victory-fork (main c96b4f2, itself VIctory with the fork's work) with
merged community pull requests and Flamingo's own changes. README.md credits the sources;
FLAMINGO.md logs every change and measured run. GPL-3.0-or-later, as VIctory.
…progress log through run 74

- DualSense over HID as the first pad while no Xbox controller is connected.
- victory-fork #768 (opt-in): a submission's texture checks several at a time.
- Opt-in experiments for the ray-traced lighting the host cannot run yet: stand-ins ported from
  ScarlettPort (GPL-3.0), every node test a miss, card-side reads of shader-written memory.
- README: status with the turned-around view, DualSense, credits; FLAMINGO.md: runs 64-74.
…obug's opt-ins; Clippy clean

- victory-fork main (f85101b): a submit thread, a copy queue for fetches,
  safer indirect windows, the first room's descriptors mirrored, and the
  shader cache keyed on the translator instead of the executable.
- The mesh primitive edge-flag fix: a corner's index is 9 bits, the 10th is
  its edge flag (pull request realblastex#1, a port of upstream VIctory #1718).
- victory-amd: smaller mips detile from the texture's start; DirectStorage
  page arrays read when a request runs.
- Opt-in, from Belobug's fork (GPL-3.0): VICTORY_AMBIENT, FLAMINGO_QUAD_HELPERS.
- Clippy clean on both CI runs; progress log through run 85.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the test and does not filter: the CI's runners)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iver of a machine with no GPU); the test names the adapter

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing builder; the builder still stops at a pointer it never wrote)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he pad's own are at rest (a run's scripted turn turns with a DualSense connected, and the player's stick wins)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, reader-writer heap list); victory-fork #916 (only a shader that can store by address declares its copies written); a real pad and the scripted keys together

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ads, threads on the fast cores

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ess log through run 94 (where the merged tree's time goes)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…CKED, on); progress log through run 101

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… #959), guard-page recovery (realblastex#2), two more programs in the wave-wide form, failed programs named; progress log through run 105

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… no pipeline refused, no program untranslated; progress log through run 108

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…amed but left out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…answers for a handle; the in-place test retries its decommit (CI)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ups that hold them and masks the lanes past them (after victory-fork #814): the ray-tracing structure builder no longer stores past its arrays; merge of victory-fork main 465b94f (frame meters, opt-in VICTORY_JOIN_PARTS, VICTORY_BACK_OWN_VIEW, VICTORY_INDIRECT_GATHER)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host device and the shader test host were made on the default adapter,
the integrated GPU on a laptop with two. Now the first hardware adapter in
DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE order that makes a D3D12 device is
used, its name logged; software adapters (WARP, the Basic Render Driver)
never. VICTORY_TEST_ADAPTER=n runs the tests on the n-th hardware adapter.
Same change as PastiiJay/klbf-lab#22 and Marvisak/VIctory#1483.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mask_runs passes over zero words 8 bytes at a time: 10-27 GB/s on masks of
scattered writes against 2-4 for the byte search, the same runs
(word_search_finds_the_byte_runs). Same change as PastiiJay/klbf-lab#26.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From 1 MiB on, blake3's update_rayon: 0.58 ms for 16 MB against 3.7 ms on
one thread, the same hash (the_wide_hash_is_the_hash). Adds blake3's rayon
feature. Same change as PastiiJay/klbf-lab#28.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without --console, a PC with less than 24 GB of physical memory runs as
Series S (it commits less); 24 GB or more, or unknown, stays Series X.
--console as given is used as is; the choice is printed with its reason.
Pure decision in apps/victory/src/lowspec.rs, with tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from LooperSalty/AnyXboxX's third_party/victory: the xg: commits of
LooperSalty/victory by Looper_Salty (1f0fe1d, taking up 4466d2e and
a16f040), GPL-3.0-or-later. Tail mips in parent mode with their position,
and 64 KiB tilings indexed by subresource, as xg_xs.dll answers them;
AnyXboxX found 84 texture descriptions where VIctory's answers differed.
xg_oracle.rs compares with the real library when its path is given (off
otherwise). The title is not named in the code, as in the rest of this tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rafaconvaitis

Copy link
Copy Markdown

In-title baseline on this PR's base commit 7ca2674, for the copy-back work. Hardware: RTX 4070 (616.64), Ryzen 9 5900X, 32 GB. Series S, D3D12, Relay 1, plain copies, async submit off. The only local source change is a test input hook.

After starting a fresh game and verifying camera input in the first playable room, I left the camera fixed and ran VICTORY_BACK_OWN_VIEW=alt in one process. Each mode had three complete alternating 20 s intervals. I excluded the first second and log windows that cross a switch. Both native views were created successfully and the own-view write counters increased during the sampled intervals.

Metric Own-view off Own-view on
Frame samples 283 278
Effective FPS 7.74 7.89
Frame time P50 / P95 127 / 169.8 ms 124 / 168.5 ms
Host copy-back median 45.1 ms 32.0 ms
Median draw calls/frame 4,213 4,127
Median draw calls skipped for missing pipelines 268 265

This is a measurement of the base commit, before the changed-run scanner and parallel texture hash in this PR. Own-view reduced the measured copy-back cost by roughly 13 ms while end-to-end frame time moved only slightly. Host preparation still measured 61–71 ms/frame in this sample. The fixed camera in this room is a useful repeatable target for testing the PR's copy-back change in-game.

realblastex pushed a commit that referenced this pull request Nov 25, 2026
…s, big textures hashed on several threads, Series S by default under 24 GB; the ray-tracing memory directory's size as a switch (VICTORY_MEMORY_COPIES, 1023 by default)

Co-Authored-By: rayane-creato1r <rayane-creato1r@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AlvBarros added a commit to AlvBarros/flamingo-fork that referenced this pull request Nov 25, 2026
…readed texture hashing, Series S below 24 GB, VICTORY_MEMORY_COPIES)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realblastex

Copy link
Copy Markdown
Owner

Thank you! The laptop discrete-GPU choice, the threaded texture hashing and the Series S default under 24 GB are in main (11ed9aa), with credit to the commits' author.

The copy-back word search and the XG layouts are on hold for now. Some test runs with them showed large flat polygons and an untextured character, but later runs without them showed the same artifacts: they come and go between runs of the same build, so a single run per setup can't tell what causes them. I'll retest each of the two over several runs before deciding, and keep this PR open until then.

@spy0eye-beep

Copy link
Copy Markdown
Author

Thanks for merging the three, and @rafaconvaitis for the baseline numbers and the fixed-camera room, which is a good repeatable target.

On the two on hold, in case it helps narrow the intermittent artifacts:

  • Copy-back word search (193711b) can't change what is written: it only changes how the runs of changed bytes are found, and word_search_finds_the_byte_runs checks it against the old byte-by-byte search (random masks of every length 0-40 plus 63/64/65/4095/4096/65536 bytes, five densities). The merge and the per-run writes are untouched. So artifacts that come and go with or without it should be from elsewhere.
  • XG layouts (52d79dc) do change what the title is told about texture layouts (mip tails, 64 KiB tilings), so that one could affect textures, and testing it over several runs is the right call. AnyXboxX reported its 84 differences against xg_xs.dll and, with the library serving layouts, no difference in game, but that was their tree, not this one.

Happy to split either into its own PR if that makes testing easier.

writes() is called many times a frame. Iterating the found pages
straight into the journal skips a Vec allocation per call; the map gets
the same inserts in the same order. Micro-benchmark (best of 7, 1M
calls): 1 page 30.2 -> 1.8 ns, 4 pages 36.8 -> 10.9 ns, 16 pages
107.8 -> 79.5 ns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realblastex

Copy link
Copy Markdown
Owner

Thanks @spy0eye-beep for the explanation, and @rafaconvaitis for the baseline numbers and the fixed-camera room.

You're right about the copy-back word search: since it only changes how the changed runs are found and the test checks it against the byte-by-byte search, it can't cause the artifacts. It's back in and goes out with the next push. The XG layouts stay on hold until I've compared several runs with and without them.

join_ranges runs on every submission; dedup_by merges the sorted ranges
without building a second list. Same result on 200k random inputs and
the existing test; best of 7: 2 ranges 64 -> 30 ns, 8: 72 -> 42 ns,
32: 135 -> 81 ns, 128: 395 -> 273 ns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
realblastex pushed a commit that referenced this pull request Nov 25, 2026
…s, big textures hashed on several threads, Series S by default under 24 GB; the ray-tracing memory directory's size as a switch (VICTORY_MEMORY_COPIES, 1023 by default)

Co-Authored-By: rayane-creato1r <rayane-creato1r@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
realblastex pushed a commit that referenced this pull request Nov 25, 2026
…nd temperature, VRAM, CPU load, RAM, graph), the full diagnostics and nothing; the copy-back word search from pull request #4 (by rayane-creato1r); flamingo-log.cmd says to close the game window, not Ctrl+C

Co-Authored-By: rayane-creato1r <rayane-creato1r@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
realblastex pushed a commit that referenced this pull request Nov 25, 2026
…atch pages go into the journal without a list first, written ranges merge in place; diagnostics: listed frames write their indirect commands' first records (frame-<n>-args.txt)

Co-Authored-By: rayane-creato1r <rayane-creato1r@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants