Textures: VICTORY_DROP_MIPS leaves a placed texture's largest levels out #4785
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!4785
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4784"
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?
@andreasposchinger-dotcom on GitHub · 2026-12-01 08:13 UTC · original
andreasposchinger-dotcom:vibe/drop-texture-mips-cd2fb7→main· +170 −13 · 5 files · 1 commits · draftFixes #3786
What it changes
With
VICTORY_DROP_MIPSset (the F1 menu's MEMORY > DROP TEXTURE MIPS), a view of a placed texture shows from the level that is left: the texture's largest levels are left out, on the card and in its host copy. Less memory and fewer uploads; the picture is softer up close.first_miptakes the resource's description with the view's: the level a slot shows is the largest the texture drops that the view still shows.drop_view, taken before the copy base is read).first_mip_of).VICTORY_DROP_MIPSis off by default (0): a texture keeps its levels, as before. The issue's patch turned it to 2; on, the picture is softer up close, so it asks to be chosen. So is a value from 1 to 4; more than the texture's last level is clipped to it.How it was tested
cargo check -p victory-gpu --target x86_64-pc-windows-msvcpassed for the lib with tests (mimalloc's and blake3's C stood in for locally; the stand-ins were not committed).cargo clippy -p victory-gpu --target x86_64-pc-windows-msvc --lib --profile test -- -D warnings: the five lints it reports are pre-existing onmain(host/font.rs213 and 260,host/menu.rs673,host/panel.rs602 and 668). Onmain, clippy for this target cannot be run here at all (its build scripts fail), so this is as far as it goes locally; none of the five is in a file this touches.drop_mips_leaves_the_largest_levels_outtest runs in CI (the code is Windows-only); nothing was run here.Checked for overlap
main; this one has none.@gut0to on GitHub · 2026-12-01 15:14 UTC · original · reviewed
AI-assisted review: I traced the new test through dropped() and the environment-backed drop_mips() setting. I used AI assistance and verified the default behavior in the current source.
@ -6285,0 +6383,4 @@layout: 0,flags: 0,};assert_eq!(dropped(&d, 0, u32::MAX), 2);@gut0to on GitHub · 2026-12-01 15:14 UTC · original
This test depends on VICTORY_DROP_MIPS in the calling environment: dropped() reads drop_mips(), whose default is 0, while these assertions require 2. On a clean Windows test run with the variable unset, the first assertion returns 0 and fails; if a developer exports 2, the result becomes environment-dependent. Could the pure calculation take the requested mip count as an argument, with a separate test for environment parsing?
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.