Wave32 & VICTORY_BVH_BUILDER=1: 6 refused Wave64 compute PSOs (ID 622), 3 BVH prefix kernels disabling RT builder, and >32 KiB mesh-pixel linking #37
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX#37
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?
@owsware on GitHub · 2026-11-25 23:57 UTC · original
Summary
On an NVIDIA RTX 5080 (32-lane hardware, driver
576.80) running0a43566withVICTORY_SKIP_PIPELINES=none:fix/wave32-lds-flags,25025d2) passed hardware verification:both_host_waves_observe_the_lds_flag_after_the_joinreportedall 14 flag dispatches passed on a 32-lane hardware adapter.eeed82b877b44b5fran unskipped across all 7 live runs with zero faults on RTX 5080 (576.80; open PR #23 addresses its underlying raw/structured alignment issue).However, 6 compute PSOs are still refused (
0x80070057, D3D12ID 622:WaveSize 64 > 32) in normal-Safegameplay, andVICTORY_BVH_BUILDER=1self-disables completely (1,129.1/framedropped) due to 3 failed compute translations.1. Live Refused Compute Shaders (
ID 622,0x80070057) intestD_d3ddebug2da4beb386509b77(group=256x1x1): Failsresource::track("a descriptor neither loaded nor built") after early-out (s_cbranch_execz) removal acrosss_barrier, keepingWaveSize(64).lanes.guards) into known descriptor/live tracking insidevictory-shaderallowswithout early-outs: wave Some(32)to validate and compile on RTX 5080.5dc3b25986622949and6f225b641c5b0708(group=8x8x1): Write 3D textures inside bounded loops;blocks_in_loopsrejects wave-widening around loop exits.execz/vcczlatches excluded) validates both cleanly on RTX 5080 withoutVICTORY_WAVE_WIDE=1side effects.6b82bc7d22016cb5(group=1024x1x1— observed in offline corpus) and02384a60fda6f2d0(group=128x1x1): Multi-wave workgroups using cross-lane ballot/prefix ops combined withds_add_rtn_u32and read/write LDS inside divergent control flow (6b82bc7d22016cb5also approaches/exceeds the32,768-byte DXIL shared-memory limit when emulated naively).2cc4c197ee29e291and369cbe906ea72764: Refused0x80070057(ID 622, dropped~1.0/framein live runs).2.
VICTORY_BVH_BUILDER=1Self-Disabled by 3 Prefix-Scan Stages (testE_rt)Running
-Safe + VICTORY_BVH_BUILDER=1(0a43566, RTX 5080) logs:In
crates/victory-gpu/src/pipeline.rs:328-358,builder_runs()turns off all 53 builder pipelines because those 3 prefix-scan kernels fail the first-lane read check inside a post-barrier accumulation loop where each half-wave reads the same LDS subtotal and the first-lane read of the accumulated total can safely remain local. Resolving those 3 stages brings53/53BVH builder stages online on RTX 5080.3. Standalone Mesh Output Limit (>32 KiB)
On Wave32/strict DXIL targets, mesh shader
72da0ba1efaec1e0paired with pixel shader52f3df4aa5649b6aemits34,816bytes of standalone vertex+primitive outputs (68scalar vertex outputs at128vertices/128primitives), exceeding DXIL's32,768-byte limit. Intersecting the meshOSG1output mask with the paired pixel shader'sISG1read mask and pruning only unread arbitrary semantics (while preserving system values, channel indices, and packed addressing) reduces linked output size to31,232bytes and passes DXIL validation + RTX 5080 pipeline creation cleanly. (Useful for both native mesh pipelines and open PR #20's mesh fallback.)@Pavl3000 on GitHub · 2026-11-26 01:22 UTC · original
Second host (RTX 3080 Ti, 32-lane), same nine programs — two data points that may save someone a run
Windows 10.0.26200, Ryzen 9 9950X3D, tree
0a43566, D3D12 reportshost wave lanes min=32 max=32. All nine programs named above are refused here too. Two things I can add.1.
VICTORY_WAVE_WIDE=1makes six of them create — including two this issue lists as refused. Verified by making the pipelines, not by reading logs.victory translate <archive> --warm <file of hashes> --pipelines(a local branch; happy to send it) builds the compute PSO for each named hash in 8 seconds instead of sweeping 26k of them:with
WAVE64-WIDE 29 branches taken wave-widethenWAVE64-RETRY wave-wide branches: wave Some(32)underVICTORY_WAVE_WHY=1. The three that stay at 64 are the ones this issue already describes for 128/256/1024 groups;WAVE64-WIDE not tried: thread groups of [256, 1, 1]says so directly.2. But running those six loses the card, and the bisect says the six, not the rest. With
VICTORY_WAVE_WIDE=1: 3 refusals instead of 9, thenafter 253, 21 and 21 lines of frames across three runs, always in the first cutscene or the first seconds of the world. The switch changes the form of 57 programs (measured by diffing two
translate --listruns at identical host settings). Skipping the other 51 and keeping only the six still loses the card, so the deadlock is in the passes the world needs.The placement argument as it reads in
0a43566:exchange_halvesemits two group barriers in the current block;wave_widechecks only that the branch block is all-lane;branches_aroundselects work bylane_regions, which knows per-lane branch regions but nothing about loop membership (there is noblocks_in_loopsin this tree — this issue names one in a branch that has it). A barrier in an all-lane block inside a loop whose trip count differs between the two halves is unreachable for one of them, which is the hazard the comment abovewidenrecords. It lines up with the “staged loop-safe wave widening” direction in this issue: that has to land beforeVICTORY_WAVE_WIDE=1can be used for these programs at all.3. For anyone else seeing “the image never updates / smeared world” on NVIDIA, the ablation in #35 is exact here too:
THIN=1, JOIN_PARTS=8→ frozen and smeared;THIN=0, JOIN_PARTS=1, LATE_WAIT_LISTS=32→ image updates normally at 1080p. That is separate from the nine, and worth doing first because it makes the rest observable.I can test any branch that touches
widenon this card: 8 seconds for the nine pipelines, and one run to see whether it hangs.@Mumogg on GitHub · 2026-11-26 01:23 UTC · original
On the
VICTORY_BVH_BUILDER=1part: on an RTX 5070 Ti (Linux, Wine + vkd3d-proton) the builder gets to 53/53 host pipelines and stays on in game ("the ray-tracing structure builder runs") with two changes on top of0a43566:v_readfirstlaneunder divergence ones): fxceless/victory-fork#497's first-lane fix, commits54f3815and3e36c41;The 6 refused
WaveSize 64PSOs outside the builder are a separate matter; I have not looked at them. In-game testing with RT on NVIDIA is still in progress (#67).AI-assisted (Claude Code).
@Pavl3000 on GitHub · 2026-11-26 02:25 UTC · original
Follow-up from the same 32-lane host: two changes in
widentake the refusals here from nine to one.1.
all_lanesansweredfalsefor a block index outside the all-lane map.all.get(b).copied().unwrap_or(false)said "not every lane runs it" about blocks the analysis never saw; that put a spuriousneed(block)in front of the widening, which then looked for branches around a block no lane region holds and gave up (WAVE64-WIDE stopped with 1 branches wave-wide: a branch around it cannot be). Unknown is not "some lanes leave it out" — withunwrap_or(true),water_shading:CS_TransmissionVolumetrics_VolumePortalsOnlystarted creating like the rest.2. The wave-wide decision now covers the whole group, which is what lets
widentake a group holding several console waves at all. Each console wave already writes its own pair of exchange dwords (exchange_pair:slot + 2 * (thread >> 6)) and the barrier at the end ofexchange_halveshas them all in place, sowave_wideORs every pair ofthreads.div_ceil(64)into its answer instead of only its own half's. No new primitive, only2nLDS loads per thread at a widened branch.Measured with
--warm <hashes> --pipelines(nine pipelines in ~2 s), then by a game run:(the counts are group barriers emitted by
VICTORY_WAVE_WHY=1and how many of them stand in a block not every lane runs; a barrier there is one a group can never satisfy, sogroup_syncnow recordsneed(block)andwidenrefuses the program when nothing is left to widen — otherwise such a program is a guaranteed0x887A0006.)The five passes that ran, including both world passes, had no illegal barrier at all. The card was still lost after 74 s of frames.
So barrier legality and a group-wide decision are necessary and are now in place, but not sufficient: what is left is what this issue names beyond them —
v_mbcntand lane masks read as data inside divergent regions, and the 32 KiB shared-memory budget of the 1024-thread group. I have the patch on a local branch and can cut it into a PR, or test any branch of yours that moves those two; the nine-pipeline check answers in two seconds.@gomeaw on GitHub · 2026-11-26 07:18 UTC · original
#142 covers the three first-lane prefix scans. Windows reproduced the refusal on current main and accepted the patched DXIL while continuing to reject a variant whose two halves could read different subtotals. It keeps
VICTORY_BVH_BUILDERopt-in.For an RTX comparison with the original
0a43566runs,test/nvidia-bvhat2165511also includes #66's counted partial dispatches. Its Windows run verified both new synthetic programs with the SDK validator. The existing hardware results in #66 and #67 used other builds.A run on this exact branch with
VICTORY_BVH_BUILDER=1can check the three hashes, the builder's stage count, and whether the same scene remains stable once the builder starts. The two wave32 dispatch tests can also check the shader outputs independently of gameplay.