Run pixel shader wave operations over helper lanes, as the console does #2373
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!2373
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2373"
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?
@Vyto-Line on GitHub · 2026-11-25 12:10 UTC · original
Vyto-Line:helper-lane-waves→main· +107 −5 · 7 files · 1 commits · openThe console's wave operations include a pixel shader's helper lanes; the host's leave them out. A loop that serves one lane's value per pass (v_readfirstlane, then the lanes with that value) never serves a helper lane whose value no live lane shares, and a loop over a range taken from a whole-wave min/max gives a helper lane an unreliable range. Such a lane runs to the loop limit; on an RTX 3080 that made single draws of Grand Theft Auto VI's world (PS_VehicleLiveryOff..., PS_Textured_Eight) take longer than the driver allows, which reset the GPU. Each was found with every draw and dispatch made to finish before the next.
Where the host runs shader model 6.7, pixel shaders with wave operations are now emitted as 6.7 with the entry attribute
"waveops-include-helper-lanes" (DXC's [WaveOpsIncludeHelperLanes]); the attribute group is written only into modules that use it, so other shaders' bytes are unchanged. Without 6.7, v_readfirstlane in a pixel shader gives a helper lane its own value: what the console gives it on the pass that serves it.
The setting is part of the translation, so the shader cache keys on it. The RTX 3080 reports 6.7; all of the title's vertex and pixel pipelines build with it. With it, the vehicle draw no longer hangs; another draw (MSR_VS_CascadeShadows_drawskinned) still does.
@Marvisak on GitHub · 2026-11-25 12:29 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR conflicts with current
main(940d32f) incrates/victory-gpu/src/shader_cache.rsandcrates/victory-shader/src/emit/lower.rs. Its content will be reviewed once it is rebased.Generated by Claude Code
@YaBulochka on GitHub · 2026-11-25 12:47 UTC · original
Regression data point on the full retail dump: this PR gains 808 programs but loses 3,002, so the net is -2,194 validated.
Method:
victory translate shaders.rpf --validate --list, Linux/Wine, dxil.dll 1.9.2609.5,x86_64-pc-windows-gnurelease.940d32f(baseline)Program-by-program (
common the sorted validated lists):emit: a scalar memory read as data- e.g.MSNC_VS_MirrorReflectionPedTransformSkinD_907647ea_Wrappedat0x22dc,MS_VS_MirrorReflectionPedTransformDecalsD_db76baa6_Wrappedat0x1474;MSNC_VS_*/MS_VS_*(mesh and vertex stage), not pixel.So the helper-lane pixel work does what it says for its own stage (that is presumably the +808), but something in the same tree makes scalar memory reads fail to trace in the mesh/vertex lowering. Worth running this exact command before merging; if you want, I can also bisect the PR's commits to say which one introduces the
scalar memory read as datapath.Baseline command and dump are the same as in the #1458 reports.
@YaBulochka on GitHub · 2026-11-25 13:10 UTC · original
Correction to my comment above - the regression is not in this PR, and I compared against the wrong baseline.
The PR's merge-base is
ffe310e, not940d32f. Numbers on the same dump, same command:ffe310e(this PR's base)58f0be9)940d32f(current main, unrelated to this PR)So on its own base this PR is neutral: 21,724 before, 21,724 after, same lost set (
emit: a scalar memory read as dataonMSNC_VS_*/MS_VS_*). The 3,002 programs I attributed to this PR were already failing at its base; something betweenffe310eand940d32ffixes them.Apologies for the noise - the fix is to rebase the PR on current main and re-run, where the expected number is 23,918.
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.