Avoid unnecessary native shader code copies during IR construction #1235
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#1235
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?
@Damokles2 on GitHub · 2026-11-28 16:11 UTC · original
NativeProgram::patched_code()currently clones the complete native shader code buffer even when no export words need to be replaced.Its production caller,
spill::build(), immediately passes the resulting buffer toir::build(), which only requires a borrowed byte slice.A small internal borrow-or-own helper can eliminate this unnecessary allocation and payload copy while preserving the existing public owned
patched_code()API.I have prepared and validated a narrow implementation against upstream commit
9ce3cf9.Validation results:
The established benefit is reduced allocation and copying, not a demonstrated overall shader compilation or gameplay speedup.
Hosted validation:
Both runs passed compilation and applicable tests, with identical pre-existing Clippy, formatting, and asset-policy failures.
The implementation is ready for submission as a pull request.
AI-assisted with OpenAI Codex.
@github-actions[bot] on GitHub · 2026-11-28 16:11 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)