shader: a node test that misses every node asks nothing of title memory #1440
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!1440
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1440"
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?
@LouisRiverstone on GitHub · 2026-11-28 20:04 UTC · original
LouisRiverstone:perf/bvh-miss-no-memory-lookup→main· +47 −17 · 2 files · 1 commits · merged 2026-11-29 00:24 UTCWhy
With
VICTORY_BVH_MISS=1(the launcher's default) every ray-tracing node test already answers a miss, but the lowering still looked the node up in the directory of title memory before branching:SLOT_MEMORYdirectory load per node test, whose result no branch read;SLOT_FAULTS.memory.rstake_faultsreads those notes every frame and, for each page, maps 64 KiB of card memory and sends it up (map+bring), for nodes that are never read.So on the default settings the trace programs cost VRAM, uploads and host work for nothing. That hurts most on 8 GB cards.
What changed
crates/victory-shader/src/emit/intersect.rs:bvh_miss()now takes the same early path asno_hit(). A box returnsNONE, anything else the triangle miss, and nothing is read. Those are the values the oldbvh_miss()branches returned, so the picture should not change. The two branches made dead by this are removed.The shader cache key includes the translator's sources (
VICTORY_TRANSLATOR), so cached translations are replaced on the first run of this build.Tests
a_node_test_that_misses_every_node_asks_nothing_of_title_memorychecks that, with every node missed, the program binds neitherSLOT_MEMORYnorSLOT_FAULTS, in both the 32- and 64-bit forms and both descriptor forms.cargo test -p victory-shader: 337 passed, 6 ignored. This includes the on-card node tests against the reference.cargo clippy -p victory-shader --all-targets: one warning, inemit/mod.rs:2837, which this PR does not touch.Not verified
The change has not been run in game. To check it on a card, compare the log's ten-second line "title memory by address" (faults and pages made should drop to about zero with the builder off), and VRAM and GPU time in F3, against a build without it. Expect a stutter on the first run while the affected shaders are translated again (or run
victory warm).35fa829bcdto23cd9aa4c4