[GH #55] RTX 5060 / Win10: world reached and lit at 4-5 fps; keyboard-pad map gaps, 12 refused programs, copy-back dominates the frame #55
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Zettrox/ztrx. Originally posted by bailu12300 on 2026-11-25T06:27:45Z.
RTX 5060 8 GB, Windows 10 19045 (Agility SDK 1.614 in
target\release\D3D12),90b529f+ #49 + #36,VICTORY_BVH_BUILDER=1.State: the opening and the first playable stretch are reached and lit. Prison yard, HUD tutorial, subtitles, camera responds. 12 minutes of play after that, no crash, no device loss. What follows is what still keeps it from being playable.
1. Keyboard-as-pad does not cover everything, and there is no way to remap
FALLBACK_BUTTONSincrates/victory-hle/src/modules/gameinput.rs:66maps 14 keys:In practice, in the yard:
--helplets a user change any of it; the table is compiled in.Ask: is there a reason LB/RB cannot be delivered as a plain button bit, and would a
VICTORY_PAD_MAP=key=button,...style override be acceptable? That alone would unblock playing with keyboard and mouse instead of needing a pad.2. 12 refused programs left, and the ones that hurt are pixel-side
Plus, every frame:
the title sets depth bounds, which the host is not given min=0.0 max=1.0(that is #35, unmerged), and textures that arrive late show as flat/blocky for a moment. Visual result at this point: geometry and sun are right, but anything lit only by bounce is still too dark, some materials come out flat, and text/decals pop in.3. The frame cost is the copy-back, not the GPU
4-5 fps at 1280x720-ish present, GPU 60-90% busy. Per frame from the log:
VICTORY_RELAY=2,VICTORY_LATE_WAIT=3,VICTORY_WIDE_BACK=1are already on. The log itself points at three unused knobs:VICTORY_JOIN_COPIES=1(26 copies/frame, 0 continue the one before),VICTORY_CARD_BUFFERS_MIN_MB=1(396 MB/frame of copies are 1 MiB or more),VICTORY_CARD_REHASH_RUNS=1(178 hash passes over 711 pieces). Before I turn them on blind: which of those three is expected to be safe with a title that writes its own buffers from shaders, and is there a recommended order?What would help most
Imported from Zettrox/ztrx. Originally posted by bailu12300 on 2026-11-25T06:51:35Z.
Tried the three knobs this issue names, one group at a time, same save and cache, same yard. Result: none of them helps, two make it clearly worse.
RELAY=2 LATE_WAIT=3 WIDE_BACK=1)JOIN_COPIES=1 CARD_REHASH_RUNS=1 CARD_BUFFERS_MIN_MB=1UNWATCHED_FRAMES=8So: CARD_BUFFERS_MIN_MB=1 moved more work to the card and raised both copies and hash passes; JOIN_COPIES did not merge anything (
0 continue the one beforestayed 0 in both runs); UNWATCHED_FRAMES=8 changed nothing measurable.The line that never moves is
waited ... for fetches of card copies' piecesat 187-189 ms of a ~400 ms frame, with48-55 msalso spent waiting for the card with nothing to land. That is about 60% of the frame, on a card that is 60-90% busy with our own work.Questions I could not answer from the comments in the source:
VICTORY_COPY_MODE,VICTORY_DIRECT_WRITES,VICTORY_INPLACE/VICTORY_INPLACE_MB,VICTORY_READ_BACKall look related but none of them says in its own words that it is for this.26-49 copies/frame,408 ranges,396 MB in copies of 1 MiB or more) or to their total bytes? If the latter, isVICTORY_KEEP_SNAPSHOTS_MB/VICTORY_KEEP_SNAPSHOTSthe intended lever?VICTORY_WRITE_SKIP=0(declare every range) ever faster than the default on NVIDIA? The default already skips, so I assume not, but it is worth a line.Separate, and probably the bigger loss on 1080p-class hardware: the present is 2-3 fps even though the yard draws about 5000 draws/frame and GPU is 60-90%. If the copy-back is a fixed ~350 ms it will never be playable here, so knowing whether that is expected (a known cost of the shadow model) or a bug would settle a lot.
Imported from Zettrox/ztrx. Originally posted by bailu12300 on 2026-11-25T10:14:55Z.
Built fxceless/victory-fork HEAD a26859f on Win10 19045 / RTX 5060 8GB, following the same Win10 Agility route we used on ztrx main (D3D12SDKVersion 614 +
.\D3D12\+ the two /EXPORT link args). It compiles (~40 s) and it is the best picture we have had so far on this box: both opening key arts render fully (Luz "GET CASH NOW", Jason porch) at 30 fps with correct colour, and the first in-world tutorial frame ("使用 L 四处移动 / 使用 R 移动镜头") now appears. No crash in ~40 min.But the world frame is still flat blue-grey. Frame log at that point (VICTORY_BVH_BUILDER=1, RELAY=2, LATE_WAIT=3, WIDE_BACK=1):
So the grey walls look like: pipeline backlog (1324 draws with no host pipeline this frame) + 31828 texture slots not yet uploaded + 107 null buffer views + shadow reading zeros for off-element views. The GPU is idle-ish (21.7 ms of 716), the frame is CPU/copy bound: 266.7 ms heap passes + 126.4 ms copy-back + 113.6 ms copies.
Two questions:
We also carry the #49 (v_permlane16/v_permlanex16) and #36 (32-lane LDS / integer-target blend) changes locally on ztrx; the fork tree already has both, so we are keeping the fork as the main tree and only porting the Win10 Agility shim.
Imported from Zettrox/ztrx. Originally posted by bailu12300 on 2026-11-25T10:48:34Z.
Found the reason the world is black on a cold cache, and it is a one-line design problem rather than a shader gap.
crates/victory-gpu/src/pipeline.rs::builder_runs(): the first time it is asked, it counts the builder's programs that have no host pipeline yet; if any are missing it setsb.off = trueand returns false.b.offis sticky for the life of the process, so on a cold compile (no shader cache) the answer is always "not ready" and the ray-tracing structure builder never runs again - the world stays black for the whole session. With a warm cache the same build lights up, which is why this looked like a cache-dependent flake.I changed it to return false without setting
off, logging the wait once viaOnce, so the builder starts as soon as the last program compiles. Same tree (main90b529f+ #49 + #36 + the Win10 Agility shim), cold cache, RTX 5060 8GB:WARN ... builder stays offthe ray-tracing structure builder runsnever needed a restartSo on a cold cache the fix is
b.offmust not be set by the "missing pipelines" path. Worth landing upstream - anyone without a warm cache sees a black world otherwise.Also still seen here:
textures picked by index: the card has no room for more; they waitat 8 GB, so texture residency is the next ceiling after this.Imported from Zettrox/ztrx. Originally posted by bailu12300 on 2026-11-25T11:53:20Z.
Two more data points from the same box (Win10 19045, RTX 5060 8GB, i5-14490F, 32 GB), ztrx main
90b529f+ #36/#47/#48/#49/#51/#52/#54 + the builder fix from my earlier comment, 1440p, same save and cache.1. The recipe from #37 does not hold here. Exact settings
VICTORY_LATE_WAIT=1 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024 VICTORY_TEXTURE_BUDGET_MB=5600gave 1.4–1.7 fps / 574–693 ms per frame (copies 110–123 ms 156–158 MB, GPU 207–241 ms, copy-back 109 ms 73 MB, heap passes 270–318 ms), against 2.0–2.6 fps / 387–512 ms for the configuration that works here (RELAY=2 LATE_WAIT=3 WIDE_BACK=1 BVH_BUILDER=1).VICTORY_LATE_WAIT=1on its own looks like the loss: at level 3 the copies and the heap passes are roughly halved.2.
VICTORY_PIPELINE_WAIT_MS=2000(#73) is strongly negative on 8 GB here: 0.4–0.7 fps / 1398–2541 ms, dropped 1224–1742 with 1721–1728 being made and heap passes 308.8 → 609.8 ms. On a 4 GB card it apparently clears the "being made" drops; on this box it just makes every frame wait the full budget while the queue still cannot drain. Suggest the issue notes the VRAM dependence, since the knob reads like a universal win.3. Input: the stand-in pad had no mouse at all.
crates/victory-hle/src/modules/gameinput.rsonly ever built the fallback pad fromkeys(), andHost::keys()deliberately starts at0x08("no mouse buttons"), so a keyboard-and-mouse player could not look around or fire;FALLBACK_BUTTONS(14 entries, Q/E shoulders, F/H stick clicks, Z/C triggers) already covers the pad buttons. I added a smallMouse { buttons, dx, dy }toSourceand, in the fallback pad: mouse 1 → right trigger, mouse 2 → left trigger, and the cursor delta added to the right stick. The title does not capture the cursor, solook()pins it to the middle of the foreground window (GetWindowRectcentre,SetCursorPos) on every 8 ms poll and takes the offset as the delta, scaled byLOOK_SCALE / LOOK_PIN(12 px per full deflection). Keyboard I/J/K/L still adds on top, so nothing that worked before regresses.Two questions: (a) is pinning the cursor the approach you want, or would you rather accumulate raw input in the window procedure /
WM_INPUTand keep the pointer free? (b)FALLBACK_BUTTONSis aconst, so there is no rebinding — is aVICTORY_BIND_<button>=<vk>environment table acceptable upstream, or do you want it in a config file?Not yet verified in gameplay: both runs I could drive ended in the opening cutscene (2 fps, 5414 and 7554 draws, correct picture: porch sun, volumetric light, hair rim light, burned-in Chinese subtitles), and a cinematic camera cannot show whether the right stick is being read. The build is
7da6144on top offffff92locally.