Shaders: a program's constant table starts after its instructions #1880
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!1880
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1880"
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?
@brunofgmag on GitHub · 2026-11-29 01:24 UTC · original
brunofgmag:pr/code-table-start→main· +61 −6 · 1 files · 1 commits · merged 2026-11-29 02:13 UTCcode_dwordbuilt a program's constant table from the lowest byte any load or descriptor named. A load at a computed offset names offset 0, so the table became the whole program, up to 64 KiB, and every thread held those instruction bytes as constants. A program's constants follow its instructions, so the table now starts where the instructions end. A load at a fixed offset below that still keeps the old start.Upstream measured on an NVIDIA card that the driver reserved several GB of video memory as soon as pipelines were created, and the VRAM peak fell from 15.9 GB to 12.7 GB with this change.
Port of Marvisak/VIctory#2143 by desplmfao, with its test. The new test passes. The two tests that fail in
victory-shaderand the one clippy lint fail onmainas well.@kibagami-nc on GitHub · 2026-11-29 02:46 UTC · original
For the record, now that this is on by default: the same change was #550 here (both are ports of desplmfao's Marvisak/VIctory#2143). On 2026-11-28, @Machad3x measured it in an A/B on an RTX 3080 Ti (comment):
That is why #550 had it behind a switch, off by default. In its favour, it got an RTX 5090 under Proton past its Xid 13 (#721), on top of the VRAM figures above.
#550 is now only the way back, with the default left as merged here:
VICTORY_CODE_TABLE_AFTER=0starts the table at the lowest offset any load names, as before.The A/B was on the main of two days ago, in a batch with other PRs, so it may not hold now. @Machad3x, if you have a moment: one Series X run on current main, plus one with
VICTORY_CODE_TABLE_AFTER=0on #550's branch, would show whether the 3080 Ti cost is still there.