Shaders: "an address with two computed terms" drops ~900 vertex/pixel programs (200–270 draws a frame); a small fix #773
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#773
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@traeb0n on GitHub · 2026-11-28 05:34 UTC · original
What happens
resource.rsaddress()refuses an access when the base register pair holds a table plus a computed index and the instruction's offset operand is computed too. That coverssoffseton scalar loads (s_load_dwordx4 s[..], s[t:t+1], s9) and the VGPR offset on global loads. The pipeline is refused, and its draws are dropped.One run of the opening: release build, Series X, 2560x1440, DLSS Quality,
-FastwithVICTORY_SEND_THREAD=0, RTX 5070, about 3.5 minutes:an address with two computed terms is not supported: 481 vertex, 512 pixel, at code offsets 0x68–0xcc.Why it can be allowed
Addresskeeps only one computed term (dynamic), but the computed term is only used for arithmetic in three places in lowering. Descriptor loads from tables and heaps (heap_index) already compute their index from the registers (base + offset + soffset), not fromAddress::dynamic. So the refusal is about bookkeeping, not something lowering can't do.The change (based on main
63b902f)crates/victory-shader/src/resource.rs:In
address(), in place of the earlyErr("an address with two computed terms"):s_getpc_b64(table in the code) branch still returns that error whendynamic2.is_some().Ok(Address { .. })usesdynamicanddynamic2.Addressliteral getsdynamic2: None.Readers that look at the shape of
dynamicwon't take a two-term address:root_indexed_view:if address.dynamic2.is_some() { return None; }first_lane_offset:address.ok().filter(|a| a.dynamic2.is_none())?(param, dynamic, dynamic2).Every other reader only checks
dynamic.is_none()/is_some(). Those stay correct becausedynamic2is only ever set whendynamicis set too.crates/victory-shader/src/emit/lower.rs:for d in [a.dynamic, a.dynamic2].into_iter().flatten() { off = off + i32_of(d) }.Errifa.dynamic2.is_some().built_offset: adddynamic2todynamicwhen present.Results
cargo test --release -p victory-shader --lib: 350 passed, 0 failed.two computed termsfailures. 225 shaders fail for other reasons: 198 containers with no vertex, pixel, compute or mesh program, 22 with no wave32 lowering for a wave64 program, and 5 with a descriptor read only as data.Also, for anyone merging PR #18 together with Kemerd#7 onto current main:
count_refusalgets defined twice inhost/card_steps.rs. Keeping main's fixed-table version works.s_pack_ll_b32_b16arm inlower.rsbecomes unreachable behind the new ll/lh/hh arm.vcc_read_on_entry_past_an_empty_exec_reads_as_zero_in_a_program_made_from_piecesstill expects a title's program to be refused, but after commit1150908that program translates.Written with an AI assistant (Claude Code); the run was on my machine. No game files attached.
@github-actions[bot] on GitHub · 2026-11-28 05:34 UTC · original
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)
github-bot referenced this issue2026-11-28 06:35:12 +00:00