Textures: add an opt-in maximum dimension (VICTORY_TEXTURE_MAX_DIM) #63
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/PastiiJay--klbf-lab!63
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-63"
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?
@Evan-Lowry on GitHub · 2026-11-26 05:43 UTC · original
Evan-Lowry:textures-max-dim→beta· +344 −23 · 5 files · 1 commits · openSummary
Add an opt-in
VICTORY_TEXTURE_MAX_DIMlimit for eligible sampled, block-compressed placed textures. The host uses an existing smaller mip chain and remaps shader views and uploads to match. Unset or0leaves the cap off. Diagnostics report cap savings and, withVICTORY_VRAM_TEXTURE_CENSUS=1, texture allocation buckets.Measurements
RX 6800, 16 GB RAM; same gameplay scene, moving camera, ABBA-style comparisons. No game assets are included.
At 256 the frame pacing got worse (p95 1183 ms vs 383 ms at 512 with
VICTORY_STAGING_BUDGET_MB=384), so 512 looks like the practical floor on a 16 GB PC.The cap makes textures softer. Observed lettering, posters and walls retained correct materials, with no dark, grey or wrong materials. Frame times were noisy on the paging-bound PC, with no consistent regression.
Validated on this branch itself (current beta + this commit, same PC, camera moving; this build's first runs start from a fresh shader cache, so they reach the cell later and frame times aren't comparable to the table above):
VICTORY_TEXTURE_MAX_DIMScreenshots in the cell show correct materials with the cap. They're softer, with no dark or wrong textures.
Test plan
victory, with and withoutdiagnostics.victory-gputests on D3D12 WARP, excludingdepth_bounds_pipeline_loads_and_filters_draws; run the cap-specific WARP test withVICTORY_TEXTURE_MAX_DIM=512.unnecessary_sort_bywarnings in unrelated code; both configurations pass with those two lint categories allowed.🤖 Generated with Claude Code
@PastiiJay on GitHub · 2026-11-26 05:43 UTC · original
Thanks @Evan-Lowry, a clear opt-in with real numbers on a 16 GB PC. We'll try 512 on our RX 9070 XT and report here.
@HandshakeHackin on GitHub · 2026-11-26 05:54 UTC · original
I tested
56d62d0on Windows WARP using a synthetic 768×512 BC1 texture with four mip levels. Each row and level had a distinct byte pattern. With the cap off, I compared all 261,120 active bytes across four staged levels. WithVICTORY_TEXTURE_MAX_DIM=256, I compared all 15,360 active bytes in the two retained levels, including rows with padding in the host footprint. Both runs matched the original title mip data byte for byte. This checks staging and mip offsets; in-game VRAM and frame pacing remain for the hardware comparison. Reproducible fixture and results@PastiiJay on GitHub · 2026-11-26 06:05 UTC · original
Result on our RX 9070 XT (16 GB, Windows 11, Series S mode, same scene, current beta + this PR, 5 min per run, dedicated VRAM sampled every 10 s after the first minute):
VICTORY_TEXTURE_MAX_DIMSo about 2.3 GB less VRAM (-22%) and 1.9 GB less RAM. The log shows
limiting the host size of sampled placed BC textures max_dim=512, no crash. Room fps: 7.5 without, 8.0 and 6.4 with (two passes), no clear difference beyond this build's usual run-to-run spread.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.