fix(shader): try loop-barrier-free wave-wide form before approximate local waves (VICTORY_WAVE_WIDE_APPROX) #282
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!282
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-282"
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?
@Mikey970 on GitHub · 2026-11-27 20:40 UTC · original
Mikey970:pr/wave-wide-approx→main· +322 −3 · 4 files · 1 commits · closed without mergingProblem
When a console wave64 compute shader on a 32-lane host cannot be lowered by the exact non-widened forms,
emitfalls directly back tolocal waves (APPROXIMATE)(where each 32-lane host wave ballots/counts only its own half), because globalVICTORY_WAVE_WIDE=1is unsafe for shaders whose widened barriers fall inside loops.Fix
VICTORY_WAVE_WIDE_APPROX=1(opt-in, off by default; keyed inshader_cache.rs).lower::watch_loop_barriers—accepting it only when it lowers to 32 lanes and puts no translator barrier inside a CFG loop (keepingptfx_CS_lightAtlas_Sprite/_Trailon their safe path).shader_binning_utils:CS_GenerateShaderBinOffsetsandlens_flares:CS_ScanMip0..3) while refusing all loop-barrier shaders.watch_loop_barriershelper inlower.rsso this PR is standalone and can be reviewed/merged independently of theVICTORY_WAVE_WIDE_AUTOPR.)Testing
emit::wide_approx_tests(a_count_in_a_kept_lane_branch_takes_the_wave_wide_form_before_an_approximate_oneanda_count_in_a_kept_lane_branch_in_a_loop_keeps_its_form), both DXIL-validated and passing.cargo check -p victory-gpupasses.@trustno1-coder on GitHub · 2026-11-28 19:23 UTC · original
Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.
Pull request closed