Structure builder: the last three programs translate on 32-lane hosts; steadier intro #294
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!294
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-294"
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?
@ALFREDOHDEZ on GitHub · 2026-11-24 23:20 UTC · original
ALFREDOHDEZ:fix/builder-prefix-sums-and-intro→main· +91 −5 · 5 files · 3 commits · openThree independent changes, one commit each. Tested on an RTX 4070 (621.24), Ryzen 7 5800X3D, 32 GB, Windows 11.
1. First-lane reads of values alike in every running lane
On a 32-lane host the structure builder stayed off because 3 of 53 programs (39321a95223001ed, 77360df21e12ea43, 9fc111d3be79364f) stopped with "a first-lane read where not every lane runs". They are prefix sums: the value read is a scalar plus
ds_read_b32at a uniform address, so every running lane holds the same. The new rule follows only unguardedv_mov_b32,v_add_nc_u32andds_read_b32.All three now translate, validate and get a pipeline on the RTX 4070, and the builder reports that all 53 pipelines run.
2. Only the structure builder names memory by constants and writes by address
VICTORY_BVH_QUARANTINE=1leaked into title memory. In one run before this change the title crashed about 13 s after the builder started; after it, one run lasted 400 s.3. Two pipeline workers until the title draws a world
With over 1,000 pipelines queued, eight workers made the intro vary between 14 and 32 fps. With two workers it stayed at 30 (29 to 30.2). I also stopped writing captures during the intro, so part of the gain may come from that. The world's first frames may wait longer for pipelines on a cold cache.
Not fixed
Measurements that may help (same save and spot, no input, 2 min into the world)
VICTORY_LATE_WAIT=3VICTORY_INDIRECT_WINDOW=1The input was not fully controlled in the last two runs, so take those as approximate. Putting sampled textures in shared 64 MB heaps gave no gain and is not included.
Tests
victory-shader: 210 passed on this branch. Clippy (-D warnings,victory-shaderandvictory-gpu) is clean.victory-gpu: 110 passed on an earlier base with these changes; not re-run on this one. The game runs above were also on that earlier base. No unit test is added for the new rule.🤖 Generated with Claude Code
f85101b: the same four refusals, plus pipelines left "being made" for the whole run #904@Krashgamer on GitHub · 2026-11-25 03:05 UTC · original
Tested on an RTX 3080 10 GB (32-lane), i7-10700K, 32 GB, Windows 11 26200, driver 610.88. Tree: fork main
c96b4f2+ this PR (947d8b6), diag build, Series X profile, scripted Enter only (no pad input), 300 s runs. Switches:VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1, plus #176's set (VICTORY_DISPLAY_MODE=1920x1080 VICTORY_LATE_WAIT=3 VICTORY_SHADER_LOOP_LIMIT=4096, rest now default).c96b4f2alone:the ray-tracing structure builder stays off ... missing=3 of=53.the ray-tracing structure builder runs ... pipelines=53. 3 of 3 runs reached 300 s with no access violation and no device loss. Dispatches dropped without a host pipeline fell from ~340/frame (builder stages) to 4-23/frame (the refused02384a60fda6f2d0,2cc4c197ee29e291,2da4beb386509b77,369cbe906ea72764andf133e35efed2a48a). Median frame after 2 min: 1585 / 362 / 796 ms (builder off: about 280-420 ms; prologue, view not fixed). Deformed meshes, as you note.0xc0000005reading0x17in title code.-1/ an uncommitted page in title code). Neither has this PR's change 2 (numbered copies declared written only for the builder), which fits your note that quarantine leaked without it.Not tested: longer runs, lighting (nothing reads the structures yet).
AI-assisted: Claude Code (Claude Opus 5.5) built, ran and measured this and wrote the comment; numbers are from our run logs.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.