GPU: refuse wave64 mesh and compute programs on hosts without 64-lane waves #578
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!578
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-578"
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?
@wbkepler on GitHub · 2026-11-24 05:11 UTC · original
wbkepler:gpu/refuse-wave64-on-32-lane-hosts→main· +300 −5 · 3 files · 5 commits · openWhat
On hosts whose waves have fewer than 64 lanes (NVIDIA: D3D12
WaveLaneCountMin = Max = 32, in-box WARP:4), pipelines whose shaders require unsupported wave widths are refused early so their draws and dispatches are dropped instead of hanging the GPU or hitting driverE_INVALIDARG.Host::wave_lanes(): queries(WaveLaneCountMin, WaveLaneCountMax)fromD3D12_OPTIONS1once (defaults to(32, 64)if the query fails, so nothing is refused). Logs both bounds at startup and explicitly calls out narrow/software adapters (max < 32, e.g. 4-lane WARP).Shader::wave64(): whether the container's native program runs in 64-lane console waves (cached per container).HostPipeline::new:wave64mesh shaders before translation on< 64-lane hosts.PSV0runtime info (MinimumExpectedWaveLaneCount/MaximumExpectedWaveLaneCount) against the host's[min, max]range.PSV0range (such asWaveSize(32)split emulation in#233/#439) on 32-lane hosts, while refusing consolewave64compute shaders that declareWaveSize(64)or noPSV0wave-lane range on< 64-lane hosts (preventing unsized wave64 compute hangs while keeping per-lane wave32 compute and vertex/pixel shaders running).Why
On 32-lane NVIDIA hosts (RTX 3090 / 4060 Ti / 4070 SUPER / 4090 / 5070 Ti / 5090), world runs without this check hit
DXGI_ERROR_DEVICE_HUNG(TDR) in wave64 mesh or wave64 compute dispatches. Refusing wave64 mesh and unsized/64-lane wave64 compute shaders on< 64-lane hosts serves as a safe default until translator-side fixes (wave64 compute splitting, descriptor/loop fixes) make those programs safe on 32-lane waves.Tests
victory-gpu:emitted_wave_size_checked_against_host_rangeanddxil_wave_lanes_reads_psv0_bounds.cargo clippy -p victory-gpu --all-targets,cargo clippy -p victory --features diagnostics --all-targets,cargo test -p victory-gpu, andcargo xtask policypass.github-bot referenced this pull request2026-11-26 04:38:56 +00:00
@fromthemoonx on GitHub · 2026-11-24 05:39 UTC · original
Tested
07508ab(onmaind2a4bae) on another 32-lane NVIDIA host.Environment: Windows 11 Pro build 26300, AMD Ryzen 7 5700X, 16 GB, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1
x86_64-pc-windows-msvc, debug.What the adapters report. From a throwaway test (not pushed) calling
host().wave_lanes_max()andCheckFeatureSupport(D3D12_OPTIONS1)on each adapter:WaveLaneCountMinWaveLaneCountMaxhost().wave_lanes_max()returns 32 here, so the refusal applies to this GPU as intended.One question, about WARP. With
VICTORY_D3D12_WARP=1the host reports 4 lanes, so every wave64 mesh and compute program is refused there as well, on AMD hosts too. The README points to WARP as the way to look further in the world, and WARP is also the one device that can't hang the driver, which is this PR's reason for refusing. Should the refusal be limited to hardware adapters, or is it intended on WARP (if those programs are also wrong on 4-lane waves)? Either way, a note in the refusal message or the README would help, since a WARP run would otherwise lose those draws and dispatches without the reason being obvious.Tested
cargo test --locked -p victory-gpu --lib: 44 passed, 0 failed, 1 ignored, includingwave64_mesh_and_compute_need_64_lane_hostscargo test --locked --workspace: 265 passed, 0 failed, 4 ignoredcargo build -p victory --features diagnostics: buildscargo xtask policy: 151 files ok;git diff --check: cleancargo fmt --checkshow the same asmain(host.rs:267safety comment; the same per-file fmt counts), nothing newneeds_wave64compares against"mesh"/"compute", which are the namespipeline.rsgives these shaders.Not tested: the world, or any title pipeline (no game data); whether the refused programs hang this GPU too.
AI-assisted (Claude Code) ran the checks and drafted this comment.
@r4tedx on GitHub · 2026-11-24 05:47 UTC · original
From the side of the wave64 stack (#223 / #233 / #320 / #439, which I maintain), since this PR and that stack decide the same thing for compute on these hosts. Thank you for the runs: a hang at a console-flow dispatch is exactly the report that stack needs. Three points.
1. Which compute programs were running "as 32-lane waves". On
main, a wave64 compute program that needs the console's lanes (reads other lanes, reads a mask as a number, shares LDS inside one wave) declaresWaveSize(64), and NVIDIA refuses its pipeline withE_INVALIDARG(#468; reproduced on an RTX 4070 SUPER). So without #233 or a similar PR in the build, the wave64 compute programs that do run there are the ones translated per lane, whose results do not depend on the host's wave size. If your "without #233" build had none of #189 / #192 / #116 either, the compute dispatch that hung after about 2 min was such a program, and for it the wave size is probably not the cause. Which of those were in that build?2. A measurement on how a correct form can still hang. The stack's forms are lane-by-lane exact on hardware for hand-assembled programs (RTX 5070 here; others ran them on an RTX 4070 SUPER, an RTX 5080 and an RTX 5090). That is correctness on synthetic input. It does not say a title program meets its loop exits on the data it is given, and when earlier passes are dropped that data is not what the console had. Translated loops are cut after 2^20 iterations per entry. I timed a synthetic console-flow loop on an RTX 5070 (driver 621.24), 8 groups of 64 threads, an empty body and one exchange between the halves per iteration:
So an empty loop that runs to the limit costs about 6 ms per group. Alone that is far from 2 s, but the limit is per entry, so a loop nested in another, or one with buffer reads in its body, gets there. The runs in #71 that stayed in the world for 7 to 14 min with
VICTORY_SHADER_LOOP_LIMIT=32(RTX 5080, RTX 3080, RTX 3070) point the same way, though those builds differ in other PRs too. This is a hypothesis from one card and a trivial loop body, not a diagnosis.For the dispatch you have (8x1x1, wave64,
v_readfirstlane), these would settle it without any shader content: its container hash, its thread-group size, whether it has a loop inside a loop, and whether the same build still hangs there withVICTORY_SHADER_LOOP_LIMIT=32. If it hangs with no loop at all, that is a defect in the console flow and I will take it as one.3. How the two PRs fit. As written, the refusal goes by the console program's wave size, so with both merged every compute program the stack translates is refused before it runs. With the stack, no compute program reaches the driver in a form that needs 64 lanes: it is split (the module declares
WaveSize(32)), or translated per lane, or stopped at translation with a reason. A compute test on the emitted module's wave size against the host's range would keep your default for everything else. If you would rather refuse all of it until the hang is explained, that is a fair default too; an opt-out next to #579's switch would keep the stack measurable. I will do the rebase on my side whichever lands first. The mesh half of this PR is outside the stack and I have nothing against it.Synthetic programs only on my side; no title data. AI-assisted (Claude Code).
@Nixitov on GitHub · 2026-11-24 06:09 UTC · original
RTX 5070, native Windows D3D12 — confirms the wave64 part here, and there is a remaining wave32 compute hang.
Setup: Windows 11 Pro 26200.9974, NVIDIA RTX 5070, driver 617.14, in-box D3D12 10.0.26100.9818;
cargo build --release -p victoryatd2a4bae+ #581 + this PR (nothing else except #636's one-line policy change). Host reportshost wave lanes at most lanes=32, and the run logs the refusal:no host pipeline: a mesh or compute program written for 64-lane waves, on a host without them.d2a4bae+ #5810x887A0006after0x887A0004), before a numbered world frameSo the wave64 mesh/compute part holds on this card too.
Remaining hang with this PR: a 1-list submission of 12 compute pipelines takes 11.34 s and the device goes away, again
0x887A0006. Those programs are not refused by this PR, so on this run they are wave32:010a50ce68d02c16,1ea7e2dbf731c8dc,25c5ee5063e1a41f,5b6eed17c131f881,5da83868971acee9,8080af82aaac33df,9aa3629668b8e7ab,a68c4b8fc7bc4b5c,ae83305f523f4b1b,e35b7de6a9d2bfd4,ee26678cdf63cf32,f5f5e06abea6e83a.They were first bound at frames 1504-1518, and the hang is at ~06:08:18 after the last frame log at 06:08:04. Not breadcrumbed (release build, no DRED). If a wave32 run is expected to survive, these hashes are the next thing to look at; I can rerun with the diagnostics build and DRED if that helps.
No game files are included; only log lines and shader hashes.
AI-assisted (DeepSeek V4.1 Flash coding agent).
@r4tedx on GitHub · 2026-11-24 06:21 UTC · original
A data point for the compute half of this PR, from a tester's run posted on #439: #439
On an RTX 5080,
main+ #493 #483 #89 #205 #206 #469 #459 #454 with the wave64 stack (#439 atf653ea4) andVICTORY_SHADER_LOOP_LIMIT=32ran 7 minutes, about 6 in the world, with no device removal, 0 pipelines refused, and wave64 compute running in the split forms. The same set with #189 in the stack's place also stayed up. In the dumped frame the G-buffer is 67.9% covered with coherent geometry on the stack's build against 10.5% on the other.So on that card wave64 compute in those forms does not hang the device when the loop limit is 32, which fits the loop-limit reading above and is one run, not a proof. It suggests the compute refusal here would cost geometry on NVIDIA once those forms are in, and that a lower default loop limit may be the safer guard for compute. The default limit with the stack is still untested in the world, and your 8x1x1 dispatch is still the one concrete counter-example, so its hash and group size would still help.
AI-assisted (Claude Code).
@wbkepler on GitHub · 2026-11-24 06:58 UTC · original
Thanks @fromthemoonx, @r4tedx, and @Nixitov for the feedback and test data — pushed a follow-up commit addressing both design points:
PSV0wave-lane check (for @r4tedx):Host::wave_lanes()now queries the full(WaveLaneCountMin, WaveLaneCountMax)range fromD3D12_FEATURE_D3D12_OPTIONS1instead of onlyWaveLaneCountMax.HostPipeline::newnow inspects the emitted DXIL container'sPSV0runtime info (MinimumExpectedWaveLaneCount/MaximumExpectedWaveLaneCount) against the host's[min, max]range rather than unconditionally refusing every console-wave64compute program.WaveSize(64)on 32-lane hosts, while allowing per-lane translations (unconstrainedPSV0) and the wave64 compute stack (#223/#233/#320/#439, which emitsWaveSize(32)) to run cleanly on 32-lane hosts with zero conflict.wave64mesh shaders do not emitPSV0WaveSize(64)metadata and remain refused early on< 64-lane hosts.v_readfirstlanehang shader details you asked for: I don't have the local title shader dumps in this environment to pull its hash / loop structure, so I'll leave that follow-up to whoever has the capture.)WaveLaneCountMin = WaveLaneCountMax = 4) is intentional for shaders that require wider waves (both wave64 mesh and compute modules emittingWaveSize(32)/WaveSize(64)— note that per-lane unconstrained compute shaders still run on WARP!).Host::wave_lanes()now logs bothminandmaxand explicitly calls out narrow/software adapters (max < 32) at startup, and the refusal warning explicitly notes(e.g. 4-lane WARP)whenhost_lanes.1 < 32so WARP runs never silently lose draws/dispatches without an obvious reason.010a50ce...etc.). A diagnostics build run withVICTORY_D3D12_DRED=1(and optionally checkingVICTORY_SHADER_LOOP_LIMIT=32as @r4tedx noted) would definitely help narrow which of those 12 dispatches is timing out the driver — a separate issue from wave64 refusal.Verified:
cargo clippy -p victory-gpu --all-targets(0 new warnings),cargo test -p victory-gpu --lib(includingemitted_wave_size_checked_against_host_rangeanddxil_wave_lanes_reads_psv0_bounds), andcargo xtask policy(151 files ok).@fromthemoonx on GitHub · 2026-11-24 07:10 UTC · original
Thanks. Re-tested
d2d26d1on the same RTX 3060 machine, including what WARP does with the emitted wave sizes.What the emitter puts in PSV0, and what each adapter accepts. A throwaway test (not pushed) built two one-thread wave32 programs with
build_valu_cs, read PSV0's lane range at the offsetsdxil_wave_lanesuses, and calledcompute_pipelineon each adapter:v_mov_b32(per lane)0xffffffff(unconstrained)v_mbcnt_lo_u32_b32(cross-lane, soWaveSize(32))E_INVALIDARGSo a 4-lane WARP device already refuses
WaveSize(32)(andWaveSize(64)) pipelines itself. The new check doesn't take anything away on WARP that would have run; it refuses early and now names the reason, and unconstrained per-lane programs still run there. That answers my question; thanks for adding the log lines.Tested
cargo test --locked -p victory-gpu --lib: 45 passed, 0 failed, 1 ignored, includingemitted_wave_size_checked_against_host_rangeanddxil_wave_lanes_reads_psv0_boundscargo test --locked --workspace: 266 passed, 0 failed, 4 ignoredcargo build -p victory --features diagnostics: builds;cargo xtask policy: 151 files ok; clippy: onlymain'shost.rs:267warningcargo fmt --checkwants the firstassert_eq!indxil_wave_lanes_reads_psv0_boundssplit over lines. The other fmt output in these files is already onmain.Not tested: title pipelines or the world (no game data).
AI-assisted (Claude Code).
@wbkepler on GitHub · 2026-11-24 07:14 UTC · original
Thanks @fromthemoonx for re-testing on RTX 3060 + WARP and catching the
rustfmtnit indxil_wave_lanes_reads_psv0_bounds! Fixed and pushed.@iurysf on GitHub · 2026-11-24 07:26 UTC · original
Tested on an RTX 4070 (32-lane waves, driver 32.0.16.2101), on top of #493 + #483 (the pair that stops the device removal on this GPU, see #493). Default loop limit, 300 s,
VICTORY_D3D12_DRED=1.Overlap with #233: offline pipeline creation on the same GPU (
translate --pipelines, all 26,096 programs) shows 321WaveSize(64)compute programs that the driver refuses on main. This PR refuses all of them up front. #233 instead makes 98 of them run on 32-lane hosts and refuses the other 223 explicitly (numbers on #233). The two could combine: #233's halves where they apply, and this PR's up-front refusal for the rest.AI-assisted.
@r4tedx on GitHub · 2026-11-24 07:31 UTC · original
@wbkepler thank you, checking the emitted module's
PSV0wave range against the host's is the right key: it refuses what cannot run and leaves alone what was translated for the host, whichever PR did the translating. I have read your description of the follow-up, not built it with the stack; nothing in the stack should conflict with it.One thing to know for later, not for this PR: the next branch on top of the stack (
shader/wave-per-group, not a PR yet) emits console groups of several wave64 waves as host groups of 64 threads, stillWaveSize(32), so it passes the same check.Understood on the 8x1x1 dispatch; if whoever has that capture can post its hash and group size, I will look at the form it takes.
AI-assisted (Claude Code).
@slint6614-dev on GitHub · 2026-11-24 08:03 UTC · original
AMD hardware check, Windows 11, Adrenalin driver: RX 9070 (RDNA4, 32-64 lane waves) and Ryzen 9600X iGPU (RDNA2, gfx1036).
On a host with 64-lane waves nothing is refused, as intended:
victory translate --validate --pipelinesover the full retail shader pack on the RX 9070 gives the same counts as main1f858b0(VS/PS 12272 / 12172 / 12272 pipelines, CS 1693 / 1670 / 1693, MS 8191 / 8129 / 8191).cargo test -p victory-shaderpasses.@EduBertozzi on GitHub · 2026-11-24 10:52 UTC · original
Windows 10 + Pascal data point (no game run, tests only).
Setup: Windows 10 Education 22H2 (19045), GTX 1060 6 GB (driver 582.66), i7-10700K, Rust 1.98.1, debug. I tested
mainffe310e, with #486 and this PR merged locally. #486 is there because Windows 10's in-box runtime stops at SM 6.5; the Agility SDK 1.620.2 runtime sits beside the test binaries.Tests:
cargo test -p victory-gpu: 52 passed, 0 failed, includingdxil_wave_lanes_reads_psv0_boundsandemitted_wave_size_checked_against_host_range.cargo test -p victory-shader: 120 passed, 0 failed.cargo xtask policy: clean.What the adapters report (
OPTIONS1andOPTIONS7, from a throwaway test that isn't pushed):So on Pascal this PR changes nothing for mesh pipelines today, because they're refused for having no mesh shaders. It does matter for the compute-shader fallback I'm prototyping in #3. Since the mesh check here comes first, wave64 mesh programs would be refused on 32-lane hosts before reaching the fallback. Given the hangs above, that seems right: the compute form keeps the same lane layout. It means the fallback can only help wave32 mesh programs on NVIDIA until wave64 runs on 32-lane hosts (#233's direction).
AI-assisted (Claude Code); runs on my machine.
@justrealyme on GitHub · 2026-11-24 11:26 UTC · original
Tested on NVIDIA RTX 5070 Ti (Blackwell, 32-lane waves), driver 617.42, Windows 11 build 26300, diag build (
--profile diag --features diagnostics),VICTORY_D3D12_DRED=1, no debug layer, title 1.0.2.1 (blake3b99f876b…). Same scripted input in both runs (Enter every 4 s), fresh saves for the first: this PR removes the world hang on this card; the world then renders an empty grey letterboxed frame.mainffe310emain+ this PR (7292690, merged cleanly)DXGI_ERROR_DEVICE_HUNG) after a 5,184 ms submissioncompute 269b802f878c24e1(the shader in #468 / #653 / #97)host pipeline refused (0x80070057)With the PR the new log lines are
no host pipeline: a shader requiring 64-lane waves, on a host without themand the mesh equivalent (each logged once), as described.So on Blackwell too, the hang is the wave64 programs and refusing them keeps the device alive, matching the RTX 5090 and #778 results; what is left is the missing scene.
Logs stay local (no game data); I can run a narrower check if useful. AI-assisted (Claude Code).
@ChruutvoLuzi on GitHub · 2026-11-24 11:32 UTC · original
RTX 4090 (driver 621.01, Windows 11), diag build,
VICTORY_D3D12_DRED=1. Base:mainffe310ewith #646, #454, #439 (so #223, #233 and #320 too) and #160,VICTORY_SHADER_LOOP_LIMIT=256,VICTORY_NO_WATCHDOG=1. This PR at7292690; its only conflict was inhost.rs, where I kept bothtarget()from the #233 stack and this PR'swave_lanes().With this PR the world ran 19.5 minutes with no device removal, until I stopped it. Without it, the same base hung about 20 s into the world (
0x887A0006after a 4.9 s list), and three close variants (without #160, with #458, plainmain) hung after 20 to 53 s.On this card, though, what it refuses is every mesh program. In that run the title bound 922 mesh programs and the host created 0 mesh pipelines (511 in the 20 s run without it). Draws fell from about 1,900 to 2,200 per frame to about 300, vertex and pixel only, as in the 4070 run above. The reason is that all of the title's mesh programs are wave64: every one of the 9,282
Mscontainers inshaders.rpf(1.0.2.1) runs on 64-bit EXEC (s_mov_b64 exec, …,s_and_saveexec_b64). Compute is mixed, 836 of 2,688.So on NVIDIA, refusing wave64 mesh programs is the same as skipping every mesh draw, and the result can't separate wave64 from anything else about the mesh path. DRED narrows it down to a handful of programs (posted on #71). Skipping only
4adfa13bea1c556a(MSR_VS_CascadeShadows_drawskinned) took the world from about 27 s to 2.5 min before the next stop. Keeping mesh geometry on 32-lane hosts would need a narrower test than "the program is wave64", or a fix in the programs that stop.AI-assisted (Claude Code).
@supidooo on GitHub · 2026-11-24 11:42 UTC · original
Tested head
7292690merged cleanly ontomain(ffe310e) +#175(19aec59, Windows 10 Agility SDK1.620.2) on Windows 10 Pro 22H2 (Build 19045), NVIDIA GeForce RTX 4060 Ti 16 GB (driver32.0.16.2124/621.24), Intel Core i7-10700K, 32 GB RAM, Rust1.98.1.Unit tests
cargo test -p victory-gpu: 52 passed; 0 failed; 1 ignored (benchmark), includingpipeline::host::tests::emitted_wave_size_checked_against_host_rangeandpipeline::host::tests::dxil_wave_lanes_reads_psv0_bounds.Live title run (
diagbuild,VICTORY_D3D12_DRED=1, fresh cache, Series X mode)host wave lanes min=32 max=32,host mesh shader support mesh=true.mainffe310e+#175, two release runs): both hitDXGI_ERROR_DEVICE_HUNG(0x887A0006) on world entry (host GPU device removed after a submission of 30 listsand4 lists).7292690):frame=1326(~48 s in) and refused 77 unique Wave64 pipelines logged in the drop summaries (70 mesh, 7 compute).DXGI_ERROR_DEVICE_HUNG/ 0 DRED page faults / nocrashes.logcreated.frame=1326→frame=1524) at 0.4–1.4 fps, translating 933 shaders and saving 590 host pipelines (36.65 MB library) on a fresh cache.memory allocation of 71303184 bytes failedon 32 GB RAM while compiling world pipelines in parallel), not a GPU failure.@justrealyme on GitHub · 2026-11-24 12:03 UTC · original
Correction to my result above: on the RTX 5070 Ti this PR does not reliably remove the world hang. The 8-minute run without a device removal did not reproduce.
Nine more world runs with this PR (
7292690) merged onto the samemainffe310e, same machine, build, input script and saves: eight of them also had one other open PR merged (#568, #581, #694, #707, #539, #641, #588, #493), one had this PR alone.DXGI_ERROR_DEVICE_HUNG)mainalone (above)main+ this PR (above)main+ this PR, ± one other PRWhat this PR does change: the removal moves. On
mainit was a 1-list submission ending atcompute 269b802f878c24e1. With this PR it is a 28-list submission after a 3.5–5.3 s slow submission, withcompute aaf7da7a94dc72a9,ebe4e53f031f5249,eeed82b877b44b5fanda133bf0a24aff410most often among the commands in flight. Those are the programs in #71 (also an RTX 5070 Ti), so the wave64 refusal looks necessary on NVIDIA but not sufficient here.host pipeline refuseddrops from 120 to 0 in every run.None of the eight other PRs changed the outcome on this card; their draw counts and frame times were within the run-to-run spread.
Logs stay local (no game data). AI-assisted (Claude Code).
@sash2kk on GitHub · 2026-11-24 12:21 UTC · original
Clean A/B on an RTX 4090: current
main(8e79c80) alone vs.main+ this PR only, with nothing else stacked and default loop limit.Machine: Windows 11 Pro 23H2 (22631), RTX 4090 24 GB (driver 32.0.16.1088), i7-13700K. Title 1.0.2.1, Series X mode, an existing save, so it goes straight into the world load. Diagnostics build,
VICTORY_D3D12_DRED=1, the sameVICTORY_KEYSeach run.main(5 runs: release; diag with debug layer/DRED/GPU_TIMING;VICTORY_SKIP_PIPELINESof the first stuck mesh shaders;VICTORY_SHADER_LOOP_LIMIT=1024)DXGI_ERROR_DEVICE_HUNG/0x887A0006every time, 1.9–3.9 min in. DRED: stopped in one of the first mesh dispatches of the world (direct or indirect, a different mesh shader once the first ones are skipped). The debug layer reports no validation error before it (details in #653).main+ #578mesh d4111a6e6ea49d91andcompute 13dfdd3b1136e407.Played it by hand afterwards with the same build. It enters the world and stays there. On screen only text and fades are visible, as expected while most world shaders are not translated yet.
So on Ada too, the world-load hang is the wave64-on-32-lane class, and the loop limit is not the cause: 1024 still hangs. Merged on
main: clippy (-D warnings, default and--all-features) is clean andcargo test -p victory-gpupasses (52 / 1 ignored).AI-assisted (Claude Code).
@undeadhuman37 on GitHub · 2026-11-24 12:28 UTC · original
Tested on an RTX 4070 SUPER (driver 621.01, Windows 11,
wave lanes min=32 max=32). Base:mainffe310eplus 2^18 dynamic slots on the capped heap (#747).WaveSize): the world still hangs. 118 slow submissions (~250-300 ms), then 5.2 s and device removed (0x887A0006) about 8 min in.host_max < 64(what 07508ab did): 0 slow submissions and no device removal after 14+ min in the world (~3 fps, ~420 draws/frame).So on this card the compute half of the original version seems to matter. Wave64 compute translations that don't declare
WaveSizestill hang here as 32-lane waves. Full numbers in #747.(Tested with AI help. No game files or game-content logs attached.)
@JFIREonFIRE on GitHub · 2026-11-24 12:39 UTC · original
Tested on an RTX 3090 (Ampere, 32-lane waves only), driver 32.0.16.2101, Windows 11 26200. Title 1.0.2.1 (
b99f876b74d4a77f), diag build,VICTORY_D3D12_DRED=1. Same save and the sameVICTORY_KEYSscript for both runs.mainffe310e7292690) merged ontomainffe310eDXGI_ERROR_DEVICE_HUNGabout 3 min into the worldmesh c98d45f9c0757861alone between barriersWith this PR,
c98d45f9c0757861is bound but no host pipeline is built for it, because it is refused as a 64-lane program. So on this card, the hang onmainis the wave64 mesh case this PR describes. The world then runs at about 1–3 fps, with many draws dropped, as expected until wave64 mesh programs can run on 32-lane hosts.AI-assisted (Claude Code). Tested on my own machine.
@ChruutvoLuzi on GitHub · 2026-11-24 12:41 UTC · original · edited 2026-11-24 13:08 UTC
Follow-up on the same RTX 4090: #493 on its own removes the hang and keeps the mesh draws. Plain
mainffe310e+ #493, withVICTORY_SHADER_LOOP_LIMIT=1024(at the default limit a pixel loop still hangs), ran 19 minutes in the world with no device removal, 718 mesh pipelines and about 2,000 draws per frame (numbers on #493). So on this card wave64 mesh programs run on 32-lane waves without hanging once their root SRV reads are bounded, and refusing them avoided the hang by not running those reads.AI-assisted (Claude Code).
@Mumogg on GitHub · 2026-11-24 13:12 UTC · original
Test report under Wine on NVIDIA (32-lane waves): with this PR the world no longer hangs the GPU here.
Setup: RTX 5070 Ti, driver 615.78.08, Nobara 44 (kernel 7.3.4), Wine 11.21 Staging, vkd3d-proton and DXVK
dxgi.dllfrom GE-Proton11-14, diag build cross-compiled on Linux, Series X 1.0.2.1, network off.VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains,VICTORY_NO_WATCHDOG=1,VICTORY_GPU_TIMING=1,VICTORY_D3D12_DRED=1.Tree:
ffe310e+ #454 + #177 + #259 + #233 (d1fecaa) + #646 (12eba49) + the region-scan copy fallback from #783 (61474f6), then the same with this PR (7292690) on top. It conflicts with #233 inhost.rs(target()againstwave_lanes(), same place); keeping both functions resolves it.Without this PR (ten runs on that tree or its parents): every run ends in
Xid 109 … CTX SWITCH TIMEOUTfromtitle-main, 1.3 to 5.5 min after launch. To name the list, I made the per-list wait ofVICTORY_GPU_TIMINGprint a list's notes when it is still on the GPU after 3 s. Three runs:VICTORY_SKIP_PIPELINES)4adfa13bea1c556a4adfa13bea1c556a37f363f0a5dcd806,c962201cddbdd7dd,857b2e13c9cc107f(the three of #71),51ff151f75cd5759,89036e16fa081505,0d9d1c59733d6340ceac53a17bd33fec(after 5 min 28 s)So skipping by hash only moves the stop to the next mesh program.
With this PR, no skips: one run of 590 s, ended by my timeout while still presenting (frame 1999). No Xid in the kernel log, no device removal, and no list on the GPU for 3 s.
host wave lanes min=32 max=32is logged, and the mesh refusal reason once. World frame rate in that run: 1.4 fps on average (0.2 to 6.8), with timing on, so each list is submitted alone.Not tested: Windows, AMD,
cargo test, this PR without #233, more than one run with it.AI-assisted (Claude Code): it built the trees, ran the tests and wrote this report from the logs. No game data attached.
@sash2kk on GitHub · 2026-11-24 13:29 UTC · original
Follow-up to my A/B above: with this PR on the RTX 4090 there is a second, independent hang, and it is a single compute shader:
compute eeed82b877b44b5f.Same machine and setup as above. Diagnostics build,
VICTORY_D3D12_DRED=1, the sameVICTORY_KEYS.mainffe310e+ #578 unless noted.8e79c80+ #578, played by hand (release)eeed82b877b44b5fwas first boundffe310e+ #578ffe310e+ #439 stack + #578ffe310e+ #578,VICTORY_SKIP_PIPELINES=9146291b38ea9ce1,65e969746fffdb7d(its neighbours)ffe310e+ #578,VICTORY_SKIP_PIPELINES=eeed82b877b44b5f(My earlier 15-min run without a removal simply never reached this shader.)
DRED, every time: the list stopped at command 3 of 10. That command is
dispatch 12x1x1 [compute eeed82b877b44b5f], afterdispatch 1x1x1 [compute 37e19ccb4f889f63]. Its bindings include two null heap slots:u4=0xa4d300 [heap 337560: null]andu7=0x40 [heap 64: null]. The container is 6816 bytes,user_data=4. #578 lets it through, so its translation declares no 64-lane wave size. Whether it is a wave64 program running on 32 lanes or something else (the null slots), I can't tell from here. Happy to run a build that dumps it or logs more about it.AI-assisted (Claude Code).
@Machad3x on GitHub · 2026-11-24 13:46 UTC · original
Result on an NVIDIA RTX 3080 Ti (32-lane waves, Windows 11), fork github.com/Machad3x/VIctory branch claude/gta6-shader-translation-crashes-705550 (main + #302 #489 #294 #578 #650 #233 #709 #585 #309 #587 #452): wave64 mesh programs are NOT what hangs the GPU. With #578's mesh refusal switched off (a diagnostics-only switch on the fork, VICTORY_ALLOW_WAVE64_MESH=1): without #452 a world frame costs 4.3 s of GPU and the device is removed (even with #587); with VICTORY_SHADER_LOOP_LIMIT=64 the same run stays up (3731 draws per frame, about 90 ms of GPU per frame, no removal, no slow list); with #452 and its defaults (spin limit 4096, no manual limit) the run stays up for 5 minutes, 3900 draws per frame, 441 ms of GPU per frame. So the TDR was loops running to the 2^20 limit, as #452 measured on an RX 7600, and #578's mesh refusal looks unnecessary once #452 is in; only the frame CPU time (about 600 MB of copies per frame) remains very high. Not yet checked: whether the picture is right (the world was still mostly dark on the RX 7600 per #452).
@JFIREonFIRE on GitHub · 2026-11-24 13:58 UTC · original
Follow-up from the RTX 3090 (details in #71: #71).
With this PR, the next hang on this card is a wave64 compute program,
eeed82b877b44b5f.native_programs()reportswave64 = true. Its emitted DXIL declares no PSV0 wave range, sowave_lanes_unsupported()lets it through on a 32-lane host. It has a divergent loop whose exit tests a 64-bit mask of lanes still running.Refusing wave64 compute the way this PR refuses wave64 mesh (
(stage == "mesh" || stage == "compute") && console_wave64 && host_max < 64) gave a full 25-minute world run with no hang. The same build without it hung after about 3 minutes, and this PR alone after about 11 minutes (one run each).That's broader than the doc comment intends ("per-lane or split wave64 compute translations ... run on 32-lane hosts"), and it drops more passes. Perhaps a narrower rule fits better: keep wave64 compute only when the translator knows it doesn't depend on the other 32 lanes, rather than whenever it emits no WaveSize.
AI-assisted (Claude Code). Tested on my own machine.
@JFIREonFIRE on GitHub · 2026-11-24 14:14 UTC · original
I've put the change from my comment above on a branch, in case you want to take it into this PR:
https://github.com/JFIREonFIRE/VIctory/commits/fix/refuse-unsized-wave64-compute
7292690), merged withmainffe310e. The merge is clean.6ef8aac, inpipeline/host.rsonly.wave_lanes_unsupportednow refuses console wave64 compute that declares no wave size, like mesh, whenhost_max < 64. Programs declaringWaveSize(32)(split emulation) and everything on 64-lane hosts are kept as before.emitted_wave_size_checked_against_host_rangeasserts are updated. The old!wave_lanes_unsupported("compute", true, None, (32, 32))assert is now the opposite, and there are new asserts for 64-lane hosts and for wave32.cargo test --workspace --locked(344 passed) andcargo xtask policyall pass.Hardware result as before (RTX 3090): no
DEVICE_HUNGin a 25-minute world run, against 3 to 11 minutes without the change.This is a mitigation: those passes are dropped instead of hanging. The real fix is in the translator, which should detect that a program like
eeed82b877b44b5fdepends on the 64-lane mask and declareWaveSize(64), or emulate it.AI-assisted (Claude Code). Tested on my own machine.
@sash2kk on GitHub · 2026-11-24 14:26 UTC · original
More on
compute eeed82b877b44b5f, the second hang on the RTX 4090. What it is not, and one lead.The program. wave64, 1024 threads per group, dispatched 12x1x1, twice per list (
u6= 0, then 1). Each thread steps through a list of elements by 1024. It tracks a minimum distance (starts atFLT_MAX), then reduces through LDS (512 → 1,s_barriereach step), and lane 0 stores the result. It has two loops (0x2040 → 0x1d8,0x21a4 → 0x20b8) and no cross-group waits. Its translation:NumThreads=(1024,1,1), no wave-size constraint,--validatepasses.Ruled out:
VICTORY_SHADER_LOOP_LIMIT=1024and=64both still hang at this dispatch.emit::translateand dispatched it 12x1x1 on this GPU throughemit::host::Host::dispatch. It completed in 43–49 ms in every variant:0x220;The lead. Per element, the program loads two descriptors by index from data (
s_load_dwordx4 s[..], s[8:9], w << 5; the index pair is the first two words of each group's 20-byte record). In the hanging run every one of those indices wasnullin the host heap: 24 of 24, e.g. 58167, 67306, 98680, 34591. Never-made slots hold the nullTEXTURE2DSRV fromfill_null, and the program reads buffers through them. That fits #754 (views reached through the heap index are never made, refreshed or transitioned). But null or texture descriptors alone did not hang offline. So whatever the title's heap really holds at those indices, or how the host copies of those buffers behave, still has to be matched. I have not tested #413, because it conflicts withmain.My local diagnostics, if they help: dumping containers by hash, a probe that logs a dispatch's user data, record words and heap slots, and the offline dispatch test. I can share them or run variants.
AI-assisted (Claude Code).
@justrealyme on GitHub · 2026-11-24 14:41 UTC · original
Same hang on an RTX 5070 Ti (Blackwell, 32-lane waves), driver 617.42, Windows 11 build 26300, and some narrowing inside
compute eeed82b877b44b5fthat may help with the real translator fix @JFIREonFIRE mentions. Diag builds ofmainffe310e+ this PR (7292690),VICTORY_D3D12_DRED=1, title 1.0.2.1, Enter every 4 s.@JFIREonFIRE's
fix/refuse-unsized-wave64-compute(6ef8aac) on this card: no device removal in 18.7 minutes in the world (20-minute run stopped by my timeout).eeed82b877b44b5fwas reached (first bound at frame 2201) and refused as intended, at 0.7 s per frame and 350 draws per frame. Without the change, every run here was removed within 3 minutes. One run.Where it stops: 11 of 11 runs with this PR were removed (
DXGI_ERROR_DEVICE_HUNG) 104–178 s into the world. DRED always stops at the first ever dispatch ofeeed82b877b44b5f(12x1x1,u6=0thenu6=1, between the same barriers, after37e19ccb4f889f63). WithVICTORY_SKIP_PIPELINES=eeed82b877b44b5falone, 2 of 2 runs ran 8+ minutes in the world with no removal, until my timeout.VICTORY_GPU_TIMING=1shows its 4-command list taking 3.5 s against at most ~145 ms for every other list.What it is not. Each row is one world run, with only this program changed through local experiment switches. Each switch also used its own cache dir, and the pipeline library keys on the DXIL. The zeroing rows and the CBV row were built with the loop-limit patch from row 5 as well.
eeed82b877b44b5fonlyVICTORY_SHADER_LOOP_LIMIT=16s_barrierleft outrets (onmaina conditional back edge at the limit takes the loop's other edge, which here enters a duplicated copy of the loop)buffer_load*/buffer_store*reads zero / stores nothing0x100(the per-mesh constants read through the two descriptors fetched by data,s[20:23]ands[32:35]) read zero{13, 65536}) on what the title made an SRV slotMartinIndra02/fix/shader-heap-bounds-clamp(05c681c)So with every loop bounded and no barriers, the program still never finishes once its per-lane loop runs and reads through the two descriptors it fetches from the heap by data (
s_load_dwordx4 s[20:23], s[8:9], s1at0x118,s[32:35]at0x17c, indices froms_buffer_load_dwordx2 s[0:1]at0x9c). Those two descriptors are read four ways in the DXIL: raw{11,0}, structured{12,48}, typed{10,1033}(3 ×buffer_load_format_xthroughs[32:35]) and the CBV above. That doesn't fit "the loop never ends" alone. A descriptor read as a type other than the slot's is one candidate that remains. I haven't isolated the typed loads.Logs stay local (no game data). AI-assisted (Claude Code).
@sash2kk on GitHub · 2026-11-24 15:09 UTC · original
Follow-up on
compute eeed82b877b44b5f(RTX 4090): an offline replay and what it rules out.I dumped the buffers it reads at dispatch time from the running title: the raw "counts" buffer at s0+304 (174 MB), s0+16 (41 MB) and the 112-byte records at s1+0. I replayed both dispatches (
u6= 0 and 1, 12x1x1) on the same GPU throughemit::host::Host::dispatch, with the bindings the DXIL expects:annotateHandle11: records and counts as ByteAddressBuffer;annotateHandle12/48: s0+16 as StructuredBuffer;annotateHandle13/65536: the data-indexed descriptors, read as cbuffers.Results:
fill_nullleaves) and as null raw-buffer SRVs.s70(the record offset at records[u6*56+24]) read 0, so group 3's loop bound came from counts byte 68 =0xbe19999a, about 3.2e9. The per-lane loop then runs intoVICTORY_SHADER_LOOP_LIMIT; at the limit the loop is left throughret, before the two group barriers of the LDS reduction, and the GPU hangs. Bisecting the counts buffer down to that one dword confirmed it. So any wrong loop bound on the GPU hangs this program, whatever the limit (that is why the limit=64/1024 runs still hung). It may be worth making a limit exit skip to the loop's exit rather thanretin programs with barriers.Shadow) of the records and of the 12 group records are identical to title memory (0 of 28 and 0 of 60 dwords differ). The host heap slot behindu5names the same records buffer as the title's descriptor.u5/32was 1,127,287 / 1,141,475. That is beyond the NVIDIA host view heap cap of 1,000,000, while the title's heap has 1,245,184 descriptors. Those runs read the records through an out-of-heap index. It is not the cause in the other 6.VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_GBV=1the title itself crashes before the world (access violation atvictory-image…+0x23cf683←+0x2215c35, write to 0). It did so twice with the debug layer on; it looks timing-related.Still not in the replay: the other ~37 descriptors of the
u4table, the real UAV at s1+8 (structured, stride 20), and the resource states in the title's list. One of those must be the difference; I'm adding them next.AI-assisted (Claude Code).
@crissuper20 on GitHub · 2026-11-24 16:05 UTC · original
GTX 1650 (Turing, 4 GB, 32-lane waves, driver 32.0.16.2124), Windows 11 LTSC 24H2, diag build,
VICTORY_D3D12_DRED=1, same save andVICTORY_KEYSeach run, basemainffe310e, 12-14 min per run:Same as the 4090 and 4070 reports: with #578 the world geometry isn't drawn at all (
no host pipeline: a mesh program written for 64-lane waves). Without it, on this card, neither main nor #189 hung within the ~1-2 min each spent in the world, so I can't tell whether #578 is needed here. One run of +#578 also crashed ~30 s after launch (title wrote to address 0 at+0x2215c35); the retry didn't, so I can't reproduce it.Frame time in the world is dominated by copies of title memory (e.g. 13.1 s of a 15.8 s frame, 223 MB), which matches the copy cost noted above.
@justrealyme on GitHub · 2026-11-24 16:21 UTC · original
Follow-up on the RTX 5070 Ti (driver 617.42, Windows 11 build 26300): more runs of @JFIREonFIRE's
fix/refuse-unsized-wave64-compute(6ef8aac), diag build,VICTORY_D3D12_DRED=1, the same input script.11 of 11 world runs with no device removal. That's the 18.7-minute run above, plus 10 runs of about 7 minutes each in the world, stopped by my timeout. Nine of the 10 had one other open PR merged on top: #493, #704 (
1f3c184), #694, #539, #581, #641, #588 or #707. On this card, without the change, 11 of 11 runs were removed within 3 minutes.None of those PRs changed what is visible here: the world frame stays black, with 338–377 draws and about 3,460–3,820 dropped per frame (baseline 340 / 3,542). The one difference above noise is the number of distinct programs that don't translate in the world: #493 gives 427, #694 gives 437, and the baseline 447.
Logs stay local (no game data). AI-assisted (Claude Code).
@sash2kk on GitHub · 2026-11-24 16:47 UTC · original
Correction to my last comment on
eeed82b877b44b5f, plus two new findings. All of it is offline, with the replay on the same RTX 4090.Corrections:
VICTORY_SHADER_LOOP_LIMIT=64the same data completes in 65–82 ms. The replay that still hung at 64 had a second problem, a wild heap index (below).Two separate offline triggers:
1.0fbit pattern read as an index) hangs at limit 64 as well.In-game it also hung at limits 64 and 1024, so the in-game hang looks like (2), not (1).
In-game facts (title heap vs host heap). Every group's w0/w1 (the heap indices in its 20-byte record) points at a real buffer descriptor in the title's heap:
placed uav=false dim 1, w0 1.5k–2.8k elements, w1 19k–50k. The host heap hasnullat all 24 of those indices: they are placed descriptors written into title memory, so no API call mirrors them, as #754 describes. The program reads those slots as cbuffers (annotateHandle13/65536) and computes further heap indices from what it reads.Mirroring those 24 slots before the dispatch (
HostHeap::mirrorplus a refresh of their buffers) did not stop the hang. My guess, not shown: a host SRV read as a cbuffer gives NVIDIA undefined words, and those turn into wild derived indices, as in (2). On the console one buffer V# serves both.If that holds, two fixes come to mind:
s_buffer_loadfrom data-indexed descriptors as raw-buffer loads instead of cbuffer loads, so a mirrored buffer SRV works;Either way #754's mirroring is needed too. And separately: a limit exit that returns before group barriers turns a long loop into a hang. Exiting the loop instead would be safer.
AI-assisted (Claude Code).
@wbkepler on GitHub · 2026-11-24 16:54 UTC · original
Rebased cleanly onto
main(ffe310e) and updated the PR with the unsized consolewave64compute refusal. Thanks everyone for the thorough hardware testing and analysis!Summary of what is in the updated branch and how each point is addressed:
wave64compute refusal on< 64-lane hosts (matching6ef8aacand the 11/11 no-TDR world runs on RTX 5070 Ti and 25-minute run on RTX 3090). Consolewave64compute shaders with noPSV0wave-lane range (or an upper bound wider thanhost_max) are now refused on< 64-lane hosts, while 64-lane hosts and wave32 compute are unchanged.PSV0wave-lane bounds are still checked first, so compute shaders explicitly lowered toWaveSize(32)by the wave64 split stack (#233/#439and follow-ups) continue to pass on 32-lane hosts without conflict.wave64mesh on 32-lane hosts drops mesh geometry as a safe TDR mitigation until the underlying translator/loop/bounds fixes (#452,#493, wave64 lowering) land; also rebased cleanly ontomain(ffe310e) — note thehost.rstarget()conflict only occurs when stacking with#233locally, where keeping both methods resolves it cleanly.#754,s_buffer_loadraw-vs-cbuffer lowering for data-indexed descriptors, and loop-limit exits before group barriers). Keeping PR#578tightly scoped to the host-side wave-lane guard so those translator and heap-mirroring fixes can land cleanly in their own PRs.Verified after rebase onto
ffe310e:cargo clippy -p victory-gpu --all-targets,cargo clippy -p victory --features diagnostics --all-targets,cargo test -p victory-gpu, andcargo xtask policyall pass.@wbkepler on GitHub · 2026-11-24 17:41 UTC · original
@DoubleD17 Thank you for catching that!
Updated the wave-lane refusal diagnostic in
crates/victory-gpu/src/pipeline/host.rs:PSV0declares an emitted wave-lane range(req_min, req_max)incompatible with the host's(host_min, host_max), the refusal warning now reports the actualPSV0and host ranges (a <stage> shader declaring PSV0 wave lanes [req_min, req_max] on a host supporting [host_min, host_max]), while retaining the unsized console 64-lane message whenPSV0providesNone.wave_lanes_refusal_reports_emitted_and_host_rangescoveringWaveSize(32)on(64, 64),WaveSize(64)on(32, 32), and unsized consolewave64on(32, 32).Verified with
cargo clippy -p victory-gpu --all-targets,cargo clippy -p victory --features diagnostics --all-targets,cargo test -p victory-gpu(53 passed, 1 ignored), andcargo xtask policy.AI-assisted.
@sash2kk on GitHub · 2026-11-24 17:43 UTC · original
RTX 4090 data for @JFIREonFIRE's change (refuse console wave64 compute that declares no wave size when
host_max < 64). It confirms what the 3090 and the 5070 Ti showed.Same machine as my reports above (Windows 11 Pro 23H2, RTX 4090, driver 32.0.16.1088), diagnostics build,
VICTORY_D3D12_DRED=1, same save andVICTORY_KEYS. Base:mainffe310e+ this PR (7292690), with the one-line change from6ef8aac(matches!(stage, "mesh" | "compute")) applied by hand.ffe310e+ #578, 7 runscompute eeed82b877b44b5f's first bindffe310e+ #578 + compute refusaleeed82b877b44b5fwas bound once and refused. 2.1 fps and about 400 draws per frame on average.This also settles my open question about the program. The trigger is its divergent loop on the 64-bit lanes-left mask, not the data-indexed descriptors I was chasing.
AI-assisted (Claude Code).
@MrEjecutor on GitHub · 2026-11-24 17:58 UTC · original
RTX 5060 Ti on
d1eadf9(the head beforefb7facd, which I have not run): world frame rate up from ~1 to ~2 fps, but 2 of 4 runs still removed the device; addingMIN_DYNAMIC = 1 << 18(#747) removed it in 4 of 4RTX 5060 Ti 16 GB, driver 621.24, Intel Core Ultra 5 225F, Windows 11 26200, diag build, Series X, Enter every 10 s, 240 s runs alternated with
mainffe310e.main: 2 of 2 removed (96 s, 121 s), world 0.8–1.0 fps. This PR: removed at 105 s and 165 s in 2 of 4 runs (0x887A0006), each right after a ~505 ms submission of one list holding the same 12 compute pipelines (listed in #747); world 1.5–2.5 fps. With theMIN_DYNAMICchange on top: 0 of 2 removed, and 0 of 2 with #322 added as well. Details and the branch with each layer as a commit: #747Not tested: AMD, Series S, more runs. AI use: Claude Code (Claude Opus 5.5) ran and wrote this; checked by mrejecutor.
@bvtterbroot on GitHub · 2026-11-24 18:20 UTC · original
AMD check at
fb7facd(baseffe310e), on an RDNA3 and an RDNA2 GPU:run_caseswith a local adapter-selection patch that is not part of this PR. WARP runs in each pass as well.cargo test -p victory-shader -p victory-gpu --locked: 173 passed, 0 failed, 2 ignored, on both GPUs. That includes its 3 new tests (dxil_wave_lanes_reads_psv0_bounds,emitted_wave_size_checked_against_host_range,wave_lanes_refusal_reports_emitted_and_host_ranges).Synthetic tests only, no game files. Tested with AI assistance (Claude Code).
@Bladureau on GitHub · 2026-11-24 19:48 UTC · original
Tested on an RTX 4060 Laptop (8 GB, 32-lane waves). With this PR the world no longer hangs the GPU here, even with video memory full.
Setup: Windows 11 Pro 26300, NVIDIA GeForce RTX 4060 Laptop GPU 8 GB (driver 617.14 / 32.0.16.1714), i7-13650HX, 32 GB. Title exe BLAKE3
b99f876b74d4a77f…(1.0.2.1), Series X mode. This PR's headfb7facd, merged cleanly ontomainffe310ewith nothing else. Diag build (--profile diag --features diagnostics),VICTORY_D3D12_DRED=1, default loop limit, no skip. I played to the first mission's intro by hand in every run.mainffe310e(3 runs)main+ this PR (1 run)DXGI_ERROR_DEVICE_HUNG; in the two runs with DRED, it stopped in mesh draws)crashes.log)host pipeline refused, E_INVALIDARG)WaveSize(64)compute)no dynamic slotsdropsHost log:
host wave lanes min=32 max=32. Two of the threemainruns had the D3D12 debug layer on, which makes them slower than this one.Video memory. I sampled
\GPU Process Memory\Dedicated Usageonce per second. The title stayed at 7.0–7.2 GB dedicated, out of an 8 GB card, for 360 s of the run, as in an earlier run without this PR. So on this 8 GB laptop, full VRAM is not what hangs the GPU. The wave64 programs this PR refuses are.One run so far. I can repeat it, or run it with another PR on top (for example a 2^18 dynamic-slot change from #747), if that helps.
@wildheathen on GitHub · 2026-11-24 19:59 UTC · original
RTX 5080 at
fb7facd: no device removal in 393 s of world, against 68–91 s on main, #189 alone, or a loop cap. One run each, unattended.Setup
--profile diag --features diagnostics, each tree in its own target dir;VICTORY_D3D12_DRED=1.VICTORY_KEYS=45:Enter,70:Enter,95:Enter,120:Enter,150:Enter; 480 s cap.ffe310eDispatchMesh, list command 61/64; draws of mesh4adfa13bea1c556aVICTORY_SHADER_LOOP_LIMIT=65536DispatchMesh, command 3/80, mesh4adfa13bea1c556a54b333falone (Emulate, auto)DispatchMesh, command 670/862fb7facd4adfa13bea1c556a).DispatchMesh, a bit sooner.host wave lanes min=32 max=32. Another shows the PSV0 rule refusing a compute shader declaring[64, 64].#578 + #189 (#189 merged onto
fb7facdlocally, no conflicts), same method: also no removal in 369 s of world. Median 4.4 fps, 210 draws/frame against 197 with #578 alone, and ~1,600 dropped per line against ~1,740. No compute pipeline is refused any more, because #189 lowers the wave64 compute that #578's PSV0 rule refused. But "does not translate" lines go from 536 to 698. That's #189'sv_readfirstlane in divergent control flowregression (see my comment on #189): one of the most-dropped programs in this run,f1eff11f31566a6e, is in @dragoso's list of 36 there. Forcing #189'sWave32mode (VICTORY_WAVE64_EMULATE=wave32) on the same tree brings the device removal back after 41 s of world, on a compute dispatch ofd3e44e754b3eb6aa, one of those 36. Details on #189.So on the 5080 #578 does what it says: it turns the hang into dropped draws. Combined with wave64 lowering for mesh programs it would be the safety net rather than the fix. That's @VibePorter's run E tree, which reached the tutorial with a loop cap of 64.
No game data, frames or shader names; hashes and counts only.
AI-assisted (Claude Code).
@fiestorra on GitHub · 2026-11-24 20:26 UTC · original
How many programs this actually costs on a 32-lane host, measured over the archive
I ran the offline pipeline path over the whole
shaders.rpfon two adapters of one machine, choosing the adapter explicitly (on this machine DXGI's default is the integrated GPU, so without that every number below would have been the iGPU's):AMD Radeon(TM) Graphics, driver32.0.21045.29003— 64-lane waves.NVIDIA GeForce RTX 4090, driver32.0.16.2124(the 621.24 release) — 32-lane waves.Command:
victory translate shaders.rpf --validate --pipelines --list --jobs 10, withVICTORY_D3D12_ADAPTER=1for the NVIDIA run. Then the refused programs were joined by name to their container digest and to @cobrajet302gt's compute inventory (the table in #417) for the wave each native program runs in.The 320 compute refusals on the NVIDIA host:
E_INVALIDARGatCreatePipelineState("The parameter is incorrect"), no other reason; the e.g. row namescascadeshadows_rendering:CS_ShadowRenderTiledMiscPPPC_9945271c_Wrapped.8x8x1170,64x1x177,4x4x414) — one console wave — which is the casecrates/victory-shader/src/emit/lower.rs:404pinsWaveSize(wave)for (one_wave && s.lds_dwords > 0), and the rest also read console lanes. In other words the set that fails is the set whose emitted DXIL declaresWaveSize(64), not the set whose console program runs in 64-lane waves.That last point is what the proposal above already says it wants to do — inspect the emitted
PSV0wave-lane range instead of the console program's wave — and the numbers say it matters: a blanket "refuse wave64 compute on narrow hosts" would drop 831 programs that do work on this host, while the PSV0 check costs 320, and 320 of 1,441 compute programs is the size of the actual loss to weigh against the TDR risk.Not covered here: what the runtime does with those 320 (it creates its own pipelines, and this measurement is the offline path), and whether the 831 that get a pipeline also run correctly in a dispatch — the offline path only proves creation.
No game data is involved: counts, adapter descriptions and program names only.
Written with an AI assistant.
@cobrajet302gt on GitHub · 2026-11-24 20:44 UTC · original
@fiestorra joined from our side to refine the shape of that number — one histogram from the posted labels (gist
1c777c2510e44e343101f9a183ac119e):8x8x1): 416 (plus 29864x1x1and 324x4x4→ 746 one-wave-64 candidates over the whole corpus; your 261-of-320 concentration in that shape matches the intersection withlds_dwords > 0atlower.rs:404).wave64(our label, FSSM0xD4bit 5) and emittedWaveSize(64)(what actually refuses/hangs) are different predicates; 831 of 1,151 labeled-wave64 compute programs get pipelines on this host. Use our labels for corpus scope and PSV0 bounds for refusal scope.The adapter-explicit methodology is the right template; if a
--jobs 10run on the NVIDIA host withVICTORY_SKIP/PSV0 variants produces per-reason lists, we can fold each into the labels the same way. Written with an AI assistant.@Yorivel on GitHub · 2026-11-24 20:55 UTC · original
RTX 4090 (32-lane waves,
host wave lanes min=32 max=32), driver 32.0.16.2124, Windows 11 26300, title 1.0.2.1, diag build,VICTORY_D3D12_DRED=1,VICTORY_SHADER_LOOP_LIMIT=1024, input by hand. All trees onmainffe310e+ #32. On the question of whether the mesh half of this PR is needed once #493 is in: on this card, refusing only wave64 compute (this PR atfb7facd) together with #493 keeps the world's mesh draws, with no hang so far.mainDEVICE_HUNG~15 s in, depth-only pass of 12 wave64 mesh programsfb7facdc48b240DEVICE_HUNG18 s aftercompute d3e44e754b3eb6aafirst ran (details on #189)"Mesh refusal off" is a local switch, not a change I'm proposing as is: in
wave_lanes_unsupported,VICTORY_ALLOW_WAVE64_MESHlimitswave64_stageto"compute".d3e44e754b3eb6aais translated in that run but gets no host pipeline (refused as unsized wave64 compute), the hang from the #493-only row doesn't come back, and there are 0 slow submissions. That matches @ChruutvoLuzi's #493 result on another 4090, and @Machad3x's point that the wave64 mesh programs aren't what hangs once their reads are bounded.The picture is still black apart from the UI in every row. One run per row; I'll add the final duration of the last run.
AI-assisted test report.
@Yorivel on GitHub · 2026-11-24 21:09 UTC · original
Final duration for the last row of my table above (
mainffe310e+ #32 + #493 + this PRfb7facd, wave64 mesh refusal off, RTX 4090): 15 min 47 s in the world, no device removal, 0 slow submissions, stopped by hand.d3e44e754b3eb6aanever got a host pipeline.One run.
AI-assisted test report.
@cyudev on GitHub · 2026-11-24 21:57 UTC · original
RTX 3060 Ti (8 GB): #578 + #1296 + #1666 on
mainholds 16+ minutes in the world, under the video memory budgetMachine: RTX 3060 Ti 8 GB (driver 621.24, 32-lane waves), i5-12600KF, 16 GB RAM, Windows 11 26200, game files on SATA SSD. Series X profile.
Tree:
mainffe310e+ #578 (pr-578head) + #1296 (a6f3ccb) + #1666 (a672556). All three merge cleanly. Diagnostics build, fresh shader cache, onlyVICTORY_LOG=infoset.Result: world entered at ~21:42 UTC and still running at 21:58 with no device removal, no
ERROR, nono upload buffer, nocrashes.log. The 3D scene is black, as on every card, with sound and subtitles.integration/testersu10, ± #1666)E_OUTOFMEMORYand device removalMemory figures come from #1666's
host memory:line (QueryVideoMemoryInfo), every 5 s.What each did, by the log:
auto-enabling VICTORY_TEXTURE_MIP_DROP=1 for <= 8 GB GPU (vram_mb=8024). Video memory stayed ~3 GB lower than without it, which brings this card under budget.host wave lanes min=32 max=32, then one log line each for refused wave64 programs: compute (052a2316a03b9ba1), mesh, and compute with PSV0[64, 64]. No hang; that matches #1508's RTX 4060 Laptop run (579 s with #578).Still there: 512
shader does not translatelines; ~4,250 draws dropped per frame without a host pipeline and ~4,900 indirect.no host texturecomes up for formats 86 and 115, the packed 16-bit targets #89 handles; #89 is not in this tree.The two runs are not the same tree: u10 carries far more translated shaders and therefore more GPU work. So the time comparison says this set is stable on 8 GB. It does not isolate which PR buys the stability.
Counts and messages only; no game data.
@cobrajet302gt on GitHub · 2026-11-24 22:05 UTC · original
@cyudev — label keeper checking in, since our census is cited as the baseline: treat 1,151 as a ceiling, not the expected refuse count. Our
wave64tag is the console-side declaration (FSSM0xD4bit 5), not a runtime predicate; the realized 32-lane fail set is bracketed by two independent measurements in this thread now: fiestorra's offline table: 831 of 1,151 labeled-wave64 computes CREATE fine on a 32-lane adapter, 320 refuse (E_INVALIDARGat creation; fail set = emitted DXIL that declaresWaveSize(64), concentrated in the 64-thread one-wave group shapes — 4168x8x1+ 29864x1x1+ 324x4x4distinct in the corpus, gist1c777c2510e44e343101f9a183ac119e) — and your run: zero refuses at runtime. Both are right: creation-refuse and later bind/translate-drop are different filters, and your 512shader does not translate+ ~4,250 draws/frame dropped is where the rest went. So for anyone sizing #578's coverage cost: the honest range on this driver family is "320 refuse at creation, ~0 at runtime, the remainder dies at translation" — which is exactly the argument for merging 578 with the translation work rather than before it.One data request for the stability isolation: if a variant run drops #578 from that exact tree, the refuse/no-refuse diff plus your 3.2 fps baseline tells the thread what 578 costs in world, and with #1296 auto-gating on VRAM the matrix stays cheap. Happy to fold any per-program lists into the labels the same way as before. Written with an AI assistant.
@Marvisak on GitHub · 2026-11-25 00:27 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-gpu/src/host.rs,crates/victory-gpu/src/pipeline.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
@slatefield on GitHub · 2026-11-25 01:01 UTC · original
Rebased this onto current
main(4118f33) since it carries the needs-rebase label: all five commits kept with your authorship and messages, seven conflict hunks resolved (theheap_atomics64neighbour inhost.rs, the newerShader::new/translatedshape inpipeline.rs, and the test module joins inpipeline/host.rs), Windows-target clippy clean with and without--all-features, native tests green, asset policy ok. The three tests needvictory-gpuon Windows; I ran their bodies against the real parser through an off-tree harness and they pass.It is open as #1922 in case the maintainer prefers merging a ready branch. If you would rather update this PR yourself, reset
gpu/refuse-wave64-on-32-lane-hoststo24a7bc20b8579eeb46796e13f8c590ee55479886and I will close mine. Nothing in the resolution changes what the change does.One thing I noticed while reading it:
mainstill hasID3D12CommandQueue::Waitas a no-op (queue.rs:167), and every submission is waited synchronously today, so cross-queue ordering is accidental. #32 is the PR that fixesWait; a title that relies onWaitbefore the queue is truly ordered would see the difference. Worth a line in the PR body if #1922 gets merged before #32.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.