Skip to content

Two values of a switch compared in one launch (VICTORY_FLIP) - #254

Open
TG0000 wants to merge 1 commit into
fxceless:mainfrom
TG0000:tools/flip
Open

TG0000 wants to merge 1 commit into
fxceless:mainfrom
TG0000:tools/flip

Conversation

@TG0000

@TG0000 TG0000 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Launch-to-launch differences (scene timing, driver cache, what else the PC does) were as large as most gains we tried to measure. VICTORY_FLIP=3 compares two values of a switch inside one launch: every second of frames is one window, one log line each, and the value changes every three windows in the order ABBA, so a drift of the scene cancels. The first window after a change is marked to be left out.

A switch takes part when it is read through flip::Pair, for example VICTORY_HEAP_TEXTURES_MS="250|20" or VICTORY_TEXTURE_NO_WAIT="0|1"; VICTORY_HEAP_TEXTURES_MS is new here and sets the time a frame may spend on textures picked by index (it comes before main's VICTORY_TEXTURE_STAGE_MS; 250 ms without either, as before). Nothing changes without these variables.

Limits: not for shader translation switches, and a switch that leaves something behind for seconds (a queue, a cache) reaches into the other value's first windows. Medians per block work better than means: a single one-second stall decided our first table.

Example (RX 6800, one launch): the 20 ms budget took the heap pass from 275 to 36 ms and the frame from 402 to 316 ms, but far fewer textures were uploaded and faces went black, so we do not propose that value.

One unit test for the order. Tests on this head (b56a86f, on a253706, one thread, RX 6800 and WARP): victory-gpu 169 passed, 1 failed; victory-shader 215 passed. The failure is warp_budget_saturates_without_wraparound_and_preserves_draw_fields, which also failed 2 of 6 times on unchanged f85101b here (#847 and #849 are about it). Clippy with -D warnings for the Windows target (both feature sets), with #841's patch on top: one error, shadow.rs (is_multiple_of), the same on unchanged a253706. This head has not been run in a game; the same code on 7b0f736 has, five times, and adapted to f85101b in a combined build.

One warning from that: do not flip switches that change the card's queues. One launch here that flipped seven switches together every 4 s, an asynchronous present of ours among them, lost the device (0x887A0007); the cause is not isolated.

AI-assisted.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
triippywhale pushed a commit to triippywhale/victory-fork that referenced this pull request Nov 25, 2026
…ffset (_cl_o)

Hand port of PalmVIDev 7cd2b24b6 (in fxceless#254, from uiliannn/VItoriaBr 6dcd8cd by
mathcx) onto this tree's unsplit lower.rs: image_sample_cl_o, _b_cl_o,
_d_cl_o and (pixel) _c_cl_o were refused. They are the _cl forms with the
offset word first, which the lowering already reads for _o, and the clamp
after the coordinates, as for _cl. The GPU tests are not ported (they use
PalmVIDev's test harness in valu_tests.rs).

Not taken from fxceless#254: the LDS _rtn atomic out-of-bounds fix (5cac9c03b)
needs LDS bounds checks this tree does not have (dword() returns no
in-bounds flag); the console color format checks (667a4fd29) and the opt-in
vertex-first pipeline order (43c871830) conflict and are left out.

Co-authored-by: mathcx <matheusa2009@hotmail.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.

1 participant