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#75
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?
@adamMasMusic on GitHub · 2026-11-24 21:12 UTC · original
After merging
mainat4e17478, the NVIDIA driver refuses about 80 more compute pipelines on an RTX 3070 (32-lane waves), withE_INVALIDARG(0x80070057), and their dispatches are dropped. The opening cutscene looks visibly worse. The only change to shader translation between the two builds I compared is90228a7(#11, "restore parked lane-mask pairs a few instructions apart; relative VGPR reads keep parked lanes").Setup: Windows 10 22H2 (19045) with the Agility SDK 1.620 runtime (needed for shader model 6.6 on Windows 10), RTX 3070 8 GB, Series X profile, release build, warm pipeline library.
Before:
1684989plus local launch aids (watchdog hook, shader-cache key, offline fill tool, Agility exports). None of those touch translation.02384a60fda6f2d0,2cc4c197ee29e291,2da4beb386509b77,369cbe906ea72764. Also the mesh pipelinef5e50eb2108c425bthat #51 fixes.After: the same tree with
mainmerged up to4e17478, which adds3930989(tests),90228a7(#11) and4e17478(docs).0x80070057, mostly while the pipeline library warms up at start.VICTORY_RELAY=2/VICTORY_PIPELINE_WAIT_MS=24, so it is not the relay.The newly refused programs include the four that #11 lets translate for the first time (
7f05ddab771799a9,a53a7977fe762268,be14e72d86362031,f133e35efed2a48a). The rest translated and were created fine before. My guess, not verified: the new form needs 64-lane waves (or something else a 32-lane NVIDIA card can't do), which the driver refuses at pipeline creation.The 80 compute programs refused after the merge but not before
I'm testing a local revert of
90228a7next and will add the result here.@adamMasMusic on GitHub · 2026-11-24 21:14 UTC · original
Confirmed by reverting: the same tree with
90228a7reverted (and #51, #40, #52 and #63 merged on top) refuses only 3 compute pipelines (02384a60fda6f2d0,2da4beb386509b77,369cbe906ea72764), all refused before #11 as well. With90228a7in, it was 84. Same machine, same Windows 10 / Agility 1.620 setup, RTX 3070.@JFIREonFIRE on GitHub · 2026-11-24 21:26 UTC · original
A data point against this: on Windows 11 with the in-box D3D12 runtime,
4e17478(with90228a7) refuses only the old four. RTX 3090, driver 621.01, diag build, an empty pipeline library, 15 minutes with about 11 of them in the world. Full report in #94.02384a60fda6f2d0,2cc4c197ee29e291,2da4beb386509b77and369cbe906ea72764(plus meshf5e50eb2108c425b).7f05ddab771799a9,a53a7977fe762268andbe14e72d86362031. Also06cf47dbd76827cd,0709e8356abd9082,0c028454b58543f0,17af15c4015cb4b6,2dc602192abf6288and55679a0547649d0b. That is every one I checked. The fourth,f133e35efed2a48a, doesn't translate here ("a lane mask exchanged where not every lane runs is not supported").So on this machine the #11 form creates fine on a 32-lane NVIDIA card. The difference from your run is Windows 10 with the Agility SDK 1.620 runtime, plus a 3070 instead of a 3090 and a release build. That suggests the extra 80 refusals come from the runtime, or from something the Agility runtime checks that the Windows 11 one does not, rather than from the driver refusing a 64-lane form. Not verified beyond this one run. Running the D3D12 debug layer on your setup would show what the runtime objects to in one of those pipelines (for example
7f05ddab771799a9).AI-assisted (Claude Code).
@Paull007 on GitHub · 2026-11-24 21:44 UTC · original
Following up on the 3090 result above: the same build makes pipelines for most of the hashes the 3070 refuses, on the same GPU generation, so #11's translations look fine and the difference is the 3070 setup.
Two things I checked:
CreateComputePipelineState, so the0x80070057is the create call refusing what it was given.WaveSize(32)+ WaveOps to noWaveSizeand no wave ops, i.e. the plainest form. Diag and release builds translate the same.What the 3070 run has that the 3090 run doesn't: a warm library, a local shader-cache key and an offline fill tool. The translation of a wave64 program depends on the host's wave size (
set_host_max_wave). A cache filled by a process that never set it to 32 holdsWaveSize(64)translations, which NVIDIA refuses withE_INVALIDARG. The upstream cache key doesn't include the wave size, and a local key may not include the executable either.@adamMasMusic, could you try one run at
4e17478with an empty shader cache folder and an empty pipeline library, no offline fill? If that drops to the old 3 or 4, it's the cache. If not,VICTORY_D3D12_DEBUG=1on a diagnostics build (orvictory translate --pipelineswithVICTORY_HOST_WAVE=32 VICTORY_D3D12_DEBUG=1 VICTORY_TRANSLATE_ONLY=7f05ddab771799a9) will print the debug layer's reason.Attached: a small patch that adds the host's widest wave and
VICTORY_WAVE_LOCALto the shader cache key, so a cache filled under another wave size is never served.AI-assisted, no game data.
0001-GPU-the-shader-cache-keys-on-the-host-s-widest-wave-.patch
@m335671 on GitHub · 2026-11-24 21:46 UTC · original
Another data point against a regression from
90228a7, this time on Ada, with a before/after on the same machine: RTX 4070, Windows 11, in-box D3D12 runtime. The refused set is identical before and after #11, and the three programs #11 newly translates get pipelines and are bound.Setup: RTX 4070 12 GB (32-lane waves), driver 32.0.16.2124, Ryzen 9 7900, 32 GB, Windows 11 Pro 26300, in-box D3D12 (no Agility redistributable). Release builds plus one diagnostics build, Series X profile, the same save (prologue), and one pipeline library shared across the runs. Counts and hashes only.
7b0f7361684989+ #2590228a7+ #7790228a7+ #77, diag build, warm library, ~11 minIn all four runs the refused set is the same, each refused once:
02384a60fda6f2d0,2cc4c197ee29e291,2da4beb386509b77,369cbe906ea72764,6b82bc7d22016cb5;f5e50eb2108c425b+ pixelce3f0432a08f1d35.7f05ddab771799a9,a53a7977fe762268andbe14e72d86362031wereshader does not translateon7b0f736. On90228a7they logshader translated, a pipeline is made (not refused), and each gets afirst bind.So, like the 3090 on Windows 11 above, this points at the 3070's Windows 10 / Agility 1.620 setup rather than at #11's translations.
Not tested: Windows 10 or the Agility SDK runtime, Ampere, an empty pipeline library on the
90228a7runs.AI use: the runs were done on my machine. Claude Code (Claude Opus 5.5) built and ran them, read the logs and wrote this comment.
@JFIREonFIRE on GitHub · 2026-11-24 22:10 UTC · original
Root cause of the four compute refusals that every 32-lane NVIDIA report shows (
02384a60fda6f2d0,2cc4c197ee29e291,2da4beb386509b77,369cbe906ea72764, plus6b82bc7d22016cb5from #7 and above). Measured offline on an RTX 3090 at4e17478withVICTORY_HOST_MAX_WAVE=32 VICTORY_TRANSLATE_ONLY=<hashes> victory translate shaders.rpf --pipelines --validate --list.E_INVALIDARG.dxc -dumpbin) all declareWaveSize(64), and PSV0 says min = max = 64. Groupshared memory is within limits: the largest is6b82…at exactly 32,768 B,02384a60…uses 16.5 KiB, and the others 512 B.Why the translator keeps 64 lanes for each one: in every case the last reason is "an LDS read and write in one lane-branch region". These programs rely on the console's 64 lanes reaching LDS in lockstep without a barrier. Split into two 32-lane waves, they would need a group barrier inside a branch that only some lanes take.
369cbe906ea72764GpuParticleUpdate CS_Visibilityds_add_rtnon them. A block that only thread 0 runs reads dwords 4–5 and writes 0, 1, 4, 5 and 12. A loop reads dword 0 while adding atomically to dwords 16 and 20.2cc4c197ee29e291sr_tracing CS_Tiling_Generate_Opaquev_mbcntand a lane mask read as a number. The retry stops at "a lane mask exchanged where not every lane runs".02384a60fda6f2d0vfx_triangleClip CS_DefragHeap_ComputeRelocationsv_mbcntover the 64-lane mask gives each lane a slot. Lane 63 alone then adds the wave's count to a counter in LDS, andv_readlane(…, 63)decides when the loop exits. Splitting it would need a barrier for only one console wave's two host waves, and D3D12 has none.2da4beb386509b77alphaResolve CS_AlphTransmissionPrefilterMips_barrierfollows, and other lanes read it. That barrier is inside a lane branch, so it is already only a fence today. Splitting would also break the reads within one console wave that are right today.6b82bc7d22016cb5vfx_triangleClip CS_CollectTriangles_Meshletsds_add_rtn. "Local waves" is rejected at 0x3a14: "a count or sum over the wave used as data".The closest to fixable is
369cbe…. It would need two analyses: proof that a branch runs at most one lane (its condition isgroup*64 + tid == 0), and proof that constant LDS addresses written and read in one region don't overlap. For the others I see no sound form on 32-lane hosts. A per-console-wave barrier built from LDS spin-waits has no forward-progress guarantee between waves in D3D12. So on NVIDIA these dispatches stay dropped (about 1–5 per frame in the prologue). I didn't check whether that is visible.The refused mesh pipeline (
f5e50eb2108c425b) is a different thing: blending on anR8_UINTtarget, which #51 fixes.AI-assisted (Claude Code). No game data attached.
@Revens2 on GitHub · 2026-11-24 22:12 UTC · original
Another data point, and I could not reproduce the ~80 extra refusals: RTX 5070, Windows 11, in-box D3D12 runtime,
4e17478(with #11), release build.Setup: RTX 5070 12 GB (32-lane waves), driver 32.0.16.2124, Series X profile, release build of unmodified
mainat4e17478, one 480 s run from a fresh data dir (so a cold pipeline library and shader cache), 2024 "shader translated" lines.Result:
host pipeline refused,0x80070057): 5, all compute:02384a60fda6f2d0,2cc4c197ee29e291,2da4beb386509b77,369cbe906ea72764,6b82bc7d22016cb5. None of the 80 hashes listed in the report is among them.This matches the RTX 3090 and RTX 4070 reports above (the old set plus
6b82bc7d22016cb5, as in the 4070 run). Together with the reporter's own revert result, it points at the Windows 10 / Agility 1.620 + 3070 setup or a stale/foreign shader-cache entry rather than at #11's translation. Paull007's suggestion (a cache filled under another wave size) is the only concrete hypothesis so far; I did not test it, since this machine does not show the problem.Not tested: Windows 10, the Agility SDK runtime, Ampere, a warm pipeline library, the cutscene. Because it does not reproduce here, I am not opening a fix PR for this issue.
AI use: the run was done on my machine; Claude Code (Claude Sonnet 5.5) built and ran it and wrote this comment.
@adamMasMusic on GitHub · 2026-11-24 22:13 UTC · original
Correction: this was my setup, not #11. Sorry for the noise, and thanks to everyone who checked.
Retested on the same RTX 3070 / Windows 10 / Agility 1.620 machine with a build that has
90228a7back in, under a fresh shader-cache key (no fill tool, noVICTORY_SHADER_CACHE_EXE), into the world:02384a60fda6f2d0,2cc4c197ee29e291,2da4beb386509b77,369cbe906ea72764).7f05ddab771799a9,a53a7977fe762268andbe14e72d86362031translated, got pipelines and were bound.f133e35efed2a48astill doesn't translate.Cause of the 84: before those runs I had started the offline
VICTORY_FILL_SHADER_CACHEfill with that same executable and stopped it part way. Without a host GPU (and withoutVICTORY_HOST_MAX_WAVE=32) the fill translates the 64-lane forms, and it stores them under the key the game run then reads, so the runs got translations the 32-lane card refuses. Exactly as @Paull007 guessed. Closing.@arminkhaleghirod on GitHub · 2026-11-24 23:18 UTC · original
RTX 4080, debug layer on (
translate --pipelines,VICTORY_TRANSLATE_ONLYset to the four):2cc4c197ee29e291and2da4beb386509b77: "Shader wants wave lane count of 64 but maximum wave lane count for device is 32".2da4…gets it twice, from WaveSize and from PSV0.369cbe906ea72764: no layer message, just the bare E_INVALIDARG.VICTORY_HOST_MAX_WAVE=32changes nothing: all four still keepWaveSize(64). So it's not the offline wave-width artifact #76 fixes.That agrees with the analysis above: only
369c…looks safe to run without WaveSize, and only if you can prove the lane-0 init branch runs one lane.