Support custom shader/pipeline cache directory (e.g., VICTORY_CACHE_DIR) / 支持自定义着色器与管线缓存目录 #810
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#810
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?
@Txd2475066993 on GitHub · 2026-11-28 06:35 UTC · original
你好!非常感谢你对这个项目的开发与维护。
目前 victory 默认将着色器(shader)和管线(pipeline)缓存存放在 C 盘的 %LOCALAPPDATA%\victory 目录下。在进行着色器预加载后,该目录体积很容易增长到 10GB 以上。由于 C 盘通常是容量相对紧张的系统盘,大体积缓存很容易占满空间。
考虑到项目中已经使用了 VICTORY_ADAPTER、VICTORY_EARLY_DEPTH 等环境变量进行配置,能否增加一个环境变量(例如 VICTORY_CACHE_DIR 或 VICTORY_DATA_DIR)来允许用户自定义缓存存放路径?
建议逻辑:
当设置了 VICTORY_CACHE_DIR(或 VICTORY_DATA_DIR)时,将编译好的着色器/管线缓存保存到指定目录。
未设置时,保持当前的默认行为(使用 %LOCALAPPDATA%\victory)。
(可选) 体积较小的 .log 日志文件可继续留在 %LOCALAPPDATA%\victory\logs 或随自定义目录存放;同时如果能在文档中简单说明驱动或版本更新后哪些旧缓存文件可以安全清理,对用户排查空间占用会更有帮助。
感谢考虑这个建议!
Hi! Thanks for your great work on this project.
Currently, victory stores its shader and pipeline caches under %LOCALAPPDATA%\victory on the C: drive. When preloading shaders, this cache directory easily grows to 10+ GB. Since the C: drive is usually the system drive with limited storage space, large shader caches can quickly fill it up.
Since the project already uses environment variables like VICTORY_ADAPTER and VICTORY_EARLY_DEPTH, would it be possible to add an environment variable (such as VICTORY_CACHE_DIR or VICTORY_DATA_DIR) to customize the storage location?
Suggested behavior:
If VICTORY_CACHE_DIR (or VICTORY_DATA_DIR) is set, store the compiled shader/pipeline caches in that path.
If unset, keep the current default behavior (%LOCALAPPDATA%\victory).
(Optional) Keep lightweight .log files in %LOCALAPPDATA%\victory\logs or place them alongside the custom directory, and briefly document which files can be safely cleaned up after driver/build updates.
Thanks for considering this!
@github-actions[bot] on GitHub · 2026-11-28 06:35 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)
@kibagami-nc on GitHub · 2026-11-28 06:46 UTC · original
Both already exist, and so does a third that moves everything at once.
VICTORY_HOME: everything of ours goes there, including settings, logs, caches, saves and downloads. For a full C: drive this is the simplest:VICTORY_CACHE_DIR: only the caches move (translated shaders, pipelines, the prepared game images):VICTORY_DATA_DIR: the same for the data folder (saves). It must not be inside the cache folder.setxtakes effect in programs started after it, so open a new window or sign in again first. The same paths can also go invictory.tomlascache_diranddata_dir; the environment variables win over the file.When started directly, victory.exe follows all three. The script launchers keep
VICTORY_CACHE_DIRandVICTORY_DATA_DIR. They droppedVICTORY_HOMEuntil #774.On cleaning up: the cache folder holds only things that are made again when missing. Deleting it is safe; the next start just takes longer while it translates again. Your saves are in the data folder, not in the cache.
[Feature Request] Support custom shader/pipeline cache directory (e.g., VICTORY_CACHE_DIR) / 支持自定义着色器与管线缓存目录to Support custom shader/pipeline cache directory (e.g., VICTORY_CACHE_DIR) / 支持自定义着色器与管线缓存目录@hussainmussa on GitHub · 2026-11-29 08:46 UTC · original
/claim
As said above, the settings exist in the code (
VICTORY_CACHE_DIR,VICTORY_DATA_DIR,VICTORY_HOME, andcache_dir/data_dirinvictory.toml), but the README only namesVICTORY_HOME. I'll send a README change that documents them, which one wins, and where the cache folder is by default (also asked in #496).Written with help from Claude.
@kalberts0089-hash on GitHub · 2026-11-29 09:23 UTC · original
@Txd2475066993 thanks for the request. kibagami-nc covered the variables. Here's the cleanup part you asked about, with what changed in v2026.11.29.01:
victory.exe clear-shaders, or "CLEAR SHADER CACHE (RESTARTS THE GAME)" in the F1 menu, deletes<cache_dir>\shadersand<cache_dir>\pipelines. It leavesimages, the translated title, which is slow to make again. Settings, saves and logs aren't touched (apps/victory/src/play.rs:252-264).VICTORY_LIBRARY_KEEP_MB(default 1024), it is rebuilt at the end of a run with only the pipelines that run used (crates/victory-gpu/src/pipeline/library.rs:1160-1168).Play-VIctory.cmdnow followsVICTORY_HOMEtoo (4b5cc03d). Before, it putcache-paretoback on C:.Two things no
VICTORY_*variable moves:%LOCALAPPDATA%\NVIDIA\DXCache, which keeps the pipelines a preload warms up. Its size limit is NVIDIA Control Panel > Manage 3D settings > Shader Cache Size. Disk Cleanup's "DirectX Shader Cache" clears it.advisor-shown\<build>marker, always under%LOCALAPPDATA%\victory(crates/victory-gpu/src/host/panel.rs:708).github-bot referenced this issue2026-11-29 10:17:28 +00:00
@trustno1-coder on GitHub · 2026-11-29 23:07 UTC · original
Closing this one: it was reported on v2026.11.28.02 or earlier, and a lot has changed since (crash fixes, memory, shaders, warm-up and speed).
If it still happens on v2026.11.29.05, please open a new issue with the newest play log from
%LOCALAPPDATA%\victory\logs\andcrashes.log, and we'll look at it there.