fix(victory-gpu): reserve pool-eligible levels-on-demand textures #431

Merged
mauroalvare merged 3 commits from upstream-pr/431 into main 2026-11-27 19:38:44 +00:00
mauroalvare commented 2026-11-26 18:39:56 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by mauroalvare on 2026-11-26T18:39:56Z.


Vice-Tay

Vice-Tay now considers levels-on-demand before sending an eligible texture to the committed texture pool. When levels-on-demand is enabled, the pool's ability to hold the texture no longer prevents a reserved allocation.

The GPU regression creates a texture that meets both requirements and verifies that it uses reserved backing.

Earlier Neptune description

Change

Adds ("VICTORY_LEVELS_ON_DEMAND", "1") to LOW_VRAM ("8 GB card") and MID_VRAM ("12 GB card") in crates/anyxboxx-launcher/src/options.rs (base 8e32daa359adaa09dc8b8650867b492740055a70).

Both presets set VICTORY_TEXTURE_MAX_SIZE (1024 and 2048) to keep large mip levels off the card. In VIctory (third_party/victory/crates/victory-gpu/src/resource.rs:1454 and tiles.rs:81), tiles::over_cap / VICTORY_TEXTURE_MAX_SIZE is only evaluated when crate::tiles::wanted() is true — which requires VICTORY_LEVELS_ON_DEMAND=1.

In crates/anyxboxx-launcher/profiles.toml, only windows-nvidia sets VICTORY_LEVELS_ON_DEMAND=1; windows-amd, linux-amd, intel, and other leave it unset. Selecting the 8 GB or 12 GB card preset on any AMD, Intel, Linux/Proton, or fallback host therefore passed VICTORY_TEXTURE_MAX_SIZE without VICTORY_LEVELS_ON_DEMAND=1, causing VIctory to silently ignore the texture size cap.

Including ("VICTORY_LEVELS_ON_DEMAND", "1") in LOW_VRAM and MID_VRAM makes both presets self-contained across all profiles (and remains a no-op duplicate merge on windows-nvidia, where it is already "1").

Linked issue: N/A

Verification

Base reproduction (8e32daa, before the edit to options.rs):

cargo test -p anyxboxx-launcher vram_presets_enable_levels_on_demand
-> FAILED. 0 passed; 1 failed
   assertion `left == right` failed: windows-amd + LowVram must enable VICTORY_LEVELS_ON_DEMAND so VIctory honours VICTORY_TEXTURE_MAX_SIZE
     left: None
    right: Some("1")

After the fix:

cargo test -p anyxboxx-launcher                              -> ok. 212 passed; 0 failed; 1 ignored (5.40s)
cargo clippy -p anyxboxx-launcher --all-targets -- -D warnings -> Finished `dev` profile (0 warnings)

Note: detached::tests::sleeper is the launcher's helper test marked #[ignore]. Pure launcher environment/config change on Windows x64 (Ryzen 7 9700X, RTX 5070 Ti, 32 GB RAM).

Oracle and test data

New unit test env::tests::vram_presets_enable_levels_on_demand_on_non_nvidia_profiles in crates/anyxboxx-launcher/src/env.rs uses a synthetic temporary game directory and checks build_env for both Preset::LowVram and Preset::MidVram across windows-amd, linux-amd, intel, and other. Fails on base 8e32daa and passes with this change. No game, console, or SDK files were used.

Checklist

  • The PR covers a single reviewable behaviour.
  • A test fails without this change and passes with it.
  • The commands and results of each check are given above.
  • An unimplemented function returns an error (E_NOTIMPL), never a fake success.
  • README: the same change in all 9 languages (test_readme_sync.py checks it).
  • No game, console or SDK file, no key, no dump, no download link.
  • Findings drawn from a title: limited to what rule 2 of AGENTS.md allows (names, slots, argument shapes, flag values, HRESULTs, IIDs, counts), with how they were obtained; no address or RVA.
  • Code taken from another project: compatible licence and credit in THIRD_PARTY.md.

Made with AI assistance (Antigravity).

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:5515417786 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/431). Originally posted by [mauroalvare](https://github.com/mauroalvare) on 2026-11-26T18:39:56Z. --- ## Vice-Tay Vice-Tay now considers levels-on-demand before sending an eligible texture to the committed texture pool. When levels-on-demand is enabled, the pool's ability to hold the texture no longer prevents a reserved allocation. The GPU regression creates a texture that meets both requirements and verifies that it uses reserved backing. <details> <summary>Earlier Neptune description</summary> ## Change Adds `("VICTORY_LEVELS_ON_DEMAND", "1")` to `LOW_VRAM` ("8 GB card") and `MID_VRAM` ("12 GB card") in `crates/anyxboxx-launcher/src/options.rs` (base `8e32daa359adaa09dc8b8650867b492740055a70`). Both presets set `VICTORY_TEXTURE_MAX_SIZE` (`1024` and `2048`) to keep large mip levels off the card. In VIctory (`third_party/victory/crates/victory-gpu/src/resource.rs:1454` and `tiles.rs:81`), `tiles::over_cap` / `VICTORY_TEXTURE_MAX_SIZE` is only evaluated when `crate::tiles::wanted()` is true — which requires `VICTORY_LEVELS_ON_DEMAND=1`. In `crates/anyxboxx-launcher/profiles.toml`, only `windows-nvidia` sets `VICTORY_LEVELS_ON_DEMAND=1`; `windows-amd`, `linux-amd`, `intel`, and `other` leave it unset. Selecting the 8 GB or 12 GB card preset on any AMD, Intel, Linux/Proton, or fallback host therefore passed `VICTORY_TEXTURE_MAX_SIZE` without `VICTORY_LEVELS_ON_DEMAND=1`, causing VIctory to silently ignore the texture size cap. Including `("VICTORY_LEVELS_ON_DEMAND", "1")` in `LOW_VRAM` and `MID_VRAM` makes both presets self-contained across all profiles (and remains a no-op duplicate merge on `windows-nvidia`, where it is already `"1"`). Linked issue: N/A ## Verification Base reproduction (`8e32daa`, before the edit to `options.rs`): ``` cargo test -p anyxboxx-launcher vram_presets_enable_levels_on_demand -> FAILED. 0 passed; 1 failed assertion `left == right` failed: windows-amd + LowVram must enable VICTORY_LEVELS_ON_DEMAND so VIctory honours VICTORY_TEXTURE_MAX_SIZE left: None right: Some("1") ``` After the fix: ``` cargo test -p anyxboxx-launcher -> ok. 212 passed; 0 failed; 1 ignored (5.40s) cargo clippy -p anyxboxx-launcher --all-targets -- -D warnings -> Finished `dev` profile (0 warnings) ``` Note: `detached::tests::sleeper` is the launcher's helper test marked `#[ignore]`. Pure launcher environment/config change on Windows x64 (Ryzen 7 9700X, RTX 5070 Ti, 32 GB RAM). ## Oracle and test data New unit test `env::tests::vram_presets_enable_levels_on_demand_on_non_nvidia_profiles` in `crates/anyxboxx-launcher/src/env.rs` uses a synthetic temporary game directory and checks `build_env` for both `Preset::LowVram` and `Preset::MidVram` across `windows-amd`, `linux-amd`, `intel`, and `other`. Fails on base `8e32daa` and passes with this change. No game, console, or SDK files were used. ## Checklist - [x] The PR covers a single reviewable behaviour. - [x] A test fails without this change and passes with it. - [x] The commands and results of each check are given above. - [x] An unimplemented function returns an error (`E_NOTIMPL`), never a fake success. - [x] README: the same change in all 9 languages (`test_readme_sync.py` checks it). - [x] No game, console or SDK file, no key, no dump, no download link. - [x] Findings drawn from a title: limited to what rule 2 of `AGENTS.md` allows (names, slots, argument shapes, flag values, HRESULTs, IIDs, counts), with how they were obtained; no address or RVA. - [x] Code taken from another project: compatible licence and credit in `THIRD_PARTY.md`. Made with AI assistance (Antigravity). </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LooperSalty/AnyXboxX!431
No description provided.