native: VICTORY_TEXTURE_DROP_TOP_MIP=2 also drops a second level of very large textures #473
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!473
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-469"
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?
@Hayyan612 on GitHub · 2026-11-27 21:35 UTC · original
Hayyan612:gpu/top-mip-drop-2→main· +86 −26 · 4 files · 1 commits · merged 2026-11-28 00:38 UTCWhat this changes
Follow-up to the top-mip drop (#350, merged):
VICTORY_TEXTURE_DROP_TOP_MIP=2also makes a sampled-only 2D texture whose larger side is at least 4096 texels, and that has two levels below its top, without its top two levels: a quarter of the width and height, about 94% of its memory. Textures from 1024 to 4095 still lose one level, a texture always keeps at least one, and=1is unchanged. Off by default, like=1.The upload, the background job, the view mapping (
host_mip_range) and the copies (host_mipin80a012f1,mip - dropped_levels()) already take any number of dropped levels; the selection now takes the setting's level instead of a flag. Docs:docs/native-host.mdanddocs/metal-backend.md.Refs #349
How it was tested
cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory: not run; the change is invictory-gpuonly. Ran natively on arm64 instead:cargo test -p victory-gpu --lib -- drop_top_mip a_texture_made_without host_mip_range texture, 85 passed, 2 ignored. New tests:setting_two_drops_a_second_level_only_from_very_large_textures,host_mip_rangewith two levels dropped, anda_texture_made_without_two_levels_gets_the_levels_below(Metal: the host texture's level 0 receives the title's level 2).cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings(on mainb998bb65with this commit)=1(heap_set_mb, failed command buffers, lowest memory level) would show what the second level adds and what it costs in sharpness up close.Checklist
VICTORY_*variable and documented (no new variable;VICTORY_TEXTURE_DROP_TOP_MIPgains the value 2)github-bot referenced this pull request2026-11-27 21:54:14 +00:00