First uploads over the line: the widest free range is what fits in either texture pool #4200
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!4200
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4199"
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?
@marquezlale-creator on GitHub · 2026-11-30 17:22 UTC · original
marquezlale-creator:pr/texture-widest-free→main· +829 −826 · 33 files · 13 commits · closed without mergingWhat it changes
resource::first_upload_decisionlets a first upload past the room line go without a new block when it fits a free range of the texture pools (pool::texture_widest_free). That took the wider of the large and small pools. A small face (4-12 KiB) can only be cut from the small pool (pool_for), so it was admitted on the large pool's room while its own pool grew a new 64 MiB block for it, with none refused at the whole card.Now
texture_widest_free(bytes)looks at the pool the texture goes to, told by its size (after review): 64 KiB or less in all → the small pool; over 256 KiB → the large pool, whatever the small one holds; in between, where the size alone does not tell (4 KiB placement depends on the first level), it must fit in both. Each pool's range counts after its start is moved up to the pool's alignment (64 KiB / 4 KiB), and the small pool only where small textures go (VICTORY_POOL_SMALLplacement andVICTORY_POOL_SMALL_APARTboth on). A unit test covers it (widest_free_is_its_own_pools).How it was tested
cargo testpassed for the crates it touches:cargo test -p victory-gpu widest_free first_uploadyes;cargo check -p victory --testsyes.Checked for overlap
texture_widest_free).🤖 Generated with Claude Code
@IRennie74 on GitHub · 2026-11-30 18:23 UTC · original · edited 2026-11-30 18:44 UTC
The fix is right for the flood you saw. One side effect of taking the smaller of the two pools: when the small pool's widest range is small or 0, every large texture over the line is now judged by the small pool's room too. A large texture that would fit the large pool's free range then falls through to the next check.
The caller knows which pool the texture goes to.
first_upload_decision's argument atresource.rs:2677is computed where the texture's size and placement are at hand, andpool_for(alignment, apart)picks the pool. Passing the alignment intotexture_widest_freeand looking only at that pool would keep the fix for small faces without refusing large textures on the small pool's account. On 8-12 GB cards, which run over the line most, extra refusals of large first uploads mean more textures shown at lower levels.@marquezlale-creator on GitHub · 2026-11-30 18:42 UTC · original
Thanks, agreed.
texture_widest_freenow takes the texture's size and looks only at the pool it goes to: 64 KiB or less in all → the small pool; over 256 KiB → the large pool, whatever the small one holds; in between (where the size alone doesn't tell, since the 4 KiB placement depends on the first level) → both, as before. The alignment itself isn't known at that call site, so the size decides; the test covers all three cases (9392a57e).@trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed