Restore Wave32 lowering for known compute kernels #1450
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1450
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1450"
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?
@Nazzgy on GitHub · 2026-11-28 20:13 UTC · original
Nazzgy:codex/wave32-known-lds-retry→main· +77 −2 · 2 files · 1 commits · merged 2026-11-29 08:16 UTCProblem
The stricter Wave32 LDS analysis from #43 can reject known 64-thread Wave64 compute kernels that previously translated on a 32-lane host. The affected workloads include water, vegetation and decal processing.
Change
Keep ordinary lowering first. When it cannot produce a supported Wave32 shader, retry only the identified compute containers with a scoped write-only LDS policy. The retry still rejects provable overlapping writes, divergent barriers, unknown LDS instructions and unsafe mixed reads and writes. An explicit compatibility setting keeps its existing behavior.
The thread-local guard restores the previous policy before the next translation. The synthetic LDS test also checks restoration and provable write-overlap rejection.
Validation
923e38c.@ArturoWolff on GitHub · 2026-11-28 20:40 UTC · original
Independent native Linux regression check, on Rust 1.98.1, exact clean base
923e38cc8c92cd1c42090076382138538f2bb487and exact PR headbf252ea2df586c7deb654ed4bb54759ff32dcc55. Separate build targets, locked dependencies, offline builds, x86-64 Linux:cargo test --locked --offline --target x86_64-unknown-linux-gnu -p victory-shader --lib emit::lds::tests -- --test-threads=1Both revisions: 21 passed, 0 failed, 0 ignored, 230 filtered out. The candidate's added scoped-policy restoration and explicit overlap-refusal assertions passed. Both builds reported the same nine native test-build warnings.
One remaining correctness concern: rejecting provable overlap is not the same as demonstrating absence of a hazard for every admitted case. The tests exercise the analysis with a simulated 32-lane host, not the production digest-selection path or results of emitted GPU programs. A title-independent synthetic dispatch with independently calculated expected output would help distinguish successful lowering from correct synchronization and values. It would be particularly useful to retain negative controls for unproven shared writes and hazardous mixed accesses.
We have a separate observed Wave32 refusal on an RTX 4060 (#1475 observation); I cannot match that runtime identifier to the six containers in this PR. No hardware dispatch, title execution, or visual/performance claim from this test.
AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
@CowboyBingus on GitHub · 2026-11-28 20:51 UTC · original
In #1475, three builder compute programs for the ray-tracing structures are refused on a 32-lane host, in a build of
32ecacfaplus four commits that change nothing in victory-shader (a builder size-copy fix that is off by default, its tests, and a no-foreground test switch), with "no wave32 lowering for this wave64 program". WithVICTORY_LDS_WRITE_ONLY_OK=1they translate and the builder runs (pipelines=53).Here are their container digests: DXBC bytes 4..20, the
Container::digestvalue thatknown_write_only_kernelmatches on. I read them from the host'sknown-shaders.bin.None of the three is among the 6 digests in
known_write_only_kernelin this PR. The same file holds those 6 digests, under log hashes 0e366d15868e17bd, 1f1fbd86759b3da2, 55679a0547649d0b, 5964b734c70b91eb, 89d08e561897d4e5 and caf96a3229145fa6. In the run without the switch reported in #1475, all 6 of those hashes were also logged as "no wave32 lowering for this wave64 program".How the digests were read:
pipeline.rs,shader()).known-shaders.binrecord is stage (1 byte), blake3 hash (32), container length (u32 LE), then the container (pipeline/known.rs). The file parsed into 19100 records, ending exactly at the file's length.data[4..20]of the container (dxbc.rs,Container::parse).first bind ... size=lines for the same three hashes.Are these three in scope for #1450?
🤖 Generated with Claude Code
@nick0451 on GitHub · 2026-11-28 20:57 UTC · original
Tested in play: it fixes a visible regression on current main, missing vegetation.
Setup: RTX 3090 24 GB (driver 610.88), i9-14900K, Windows 11. Release builds of main
923e38cand this PR merged onto it. Series S, DLSS Performance, frame generation off. The same frozen save, outdoors on a balcony by the water, standing still. One warm-up start each, then main and this PR in turn, two rounds. Each run is 40 s to settle, 60 s measured, then a screenshot.Shaders that don't translate (
no wave32 lowering for this wave64 program), distinct per run:0e366d15868e17bd,1f1fbd86759b3da2,55679a0547649d0b,5964b734c70b91eb,89d08e561897d4e518d957e62926ed3e,21f7ad7863620328,407eca669212d400,6b82bc7d22016cb5,7c9a6a83826cdfacPicture: on main, the bushes and palms behind the railing (next to the flag) and the potted plant by the door are missing in both runs. With this PR they're drawn again in both, as they were on
63b902fthis morning in the same spot. The mean pixel difference between the builds is about 8 against 2 between two runs of the same build. So the stricter analysis drops the vegetation's compute work on current main, and this PR brings it back.Speed: 23.1 fps (22.0, 24.3) against 25.5 (25.1, 25.9) for main. That fits the vegetation being drawn again; it's not overhead.
No crash, device loss or
ERRORline in either build.Also,
6b82bc7d22016cb5, the program #822 fixed on63b902f, fails again on923e38c.Tested with an AI assistant (Claude Code); results are from this PC.
@Nazzgy on GitHub · 2026-11-28 21:03 UTC · original
Thanks for the RTX 3090 A/B test and for checking the #1475 digests. The vegetation recovery confirms the regression this PR targets. I’d keep the three RT builder kernels in #1475 for separate validation. Before merging, I’d add a synthetic GPU test that exercises the digest-selected retry, checks its output against an independently computed reference, and includes a case where the retry must still refuse lowering.
@Hailey-Ross on GitHub · 2026-11-28 22:51 UTC · original
Tested on Windows: this fixes the missing foliage for me.
On
d4b5d51(main as of today) trees and bushes are missing everywhere, only appearing once I walk into them, with eight compute shaders failing with "no wave32 lowering for this wave64 program is not supported". Withbf252eaapplied on top, same settings and save, the foliage is back everywhere.d4b5d51d4b5d51+ #1450Fixed:
0e366d15868e17bd,1f1fbd86759b3da2,55679a0547649d0b,5964b734c70b91eb,89d08e561897d4e5.Still failing:
21f7ad7863620328,6b82bc7d22016cb5,7c9a6a83826cdfac.RTX 4080 SUPER, driver 621.40, Windows 11 25H2;
-Res 4k, DLSS Performance, 2x frame generation. Details in #1499.0x8007000E, Wave64→Wave32 Failure, Unimplemented Pipeline Slots & 1M View Heap Cap #1798