[BUNDLE] #1296 (texture mip drop) resolved onto the GPU bundles by antikohza, stacked on #1542 #1616

Closed
MamaLeVrai wants to merge 156 commits from upstream-pr/1617 into main
MamaLeVrai commented 2026-11-24 19:50:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-24T19:50:56Z.


#1296 (texture mip drop for low-VRAM cards) resolved onto the GPU bundles, by its author. antikohza did the resolution and published it as a branch on top of #1542 (see the comment there); this PR is that branch as it is, so that #1296 can be reviewed and merged on the stack (#1418, #1426, #1439, #1542) instead of conflicting with it. The commits and their authors are not touched.

For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a [BUNDLE] PR, stacked on #1542, which is itself on #1418, #1426 and #1439. Until they land, their commits show here too.

What it is

#1296 adds VICTORY_TEXTURE_MIP_DROP (clamped 0..=3), a quality switch that drops the top mips of host textures so a 6-8 GB card does not run out of committed memory while the world streams, plus discrete-GPU selection on hybrid laptops (matching the adapter's LUID) and an automatic default: when the variable is not set, drop = 1 on a GPU with 8.5 GiB or less of dedicated VRAM, 0 otherwise; an explicit setting always wins. Its description has the root cause analysis and the measurements (it fixes #737 and #1226).

That default changes behaviour for owners of 4-8 GB cards (their textures are halved unless they set the variable), which is the point of the PR and worth a maintainer's decision.

What was reconciled onto the stack

From antikohza's comment on #1542 (antikohza/VIctory@0d79788):

  • list.rs and descriptor.rs: merged without conflict.
  • host.rs: #967's adapter::open() and #1426's device creation kept, a redundant best_adapter() dropped, the LUID-matched DEVICE_MEMORY kept.
  • resource.rs: (texture, drop) = host_texture(...) wired into #431's lazy OnceLock initializer (Resource::host), so the lazy first-use allocation and the retirement after submission combine with the mip drop.
  • texture.rs: #1418's five-argument detile_plane() kept for the existing tests, and a detile_plane_with_drop(..., self.mip_drop, ...) added for dropped-mip staging.

Verification

I ran the same checks on the branch (Windows 11, RX 6950 XT, Rust 1.98.1, the pinned toolchain):

Check Result
cargo clippy --workspace --all-targets --locked -- -D warnings clean
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clean
cargo test --workspace --locked 469 passed, 0 failed, 8 ignored (two runs; #1542 alone: 463 passed, 8 ignored; main: 342 passed, 6 ignored)

antikohza reports the same three checks, plus xtask policy, passing in their fork's CI (run 45473319819). The title was not run. No game data is used or committed.

Re-verify in one go

git fetch https://github.com/MamaLeVrai/VIctory.git bundle/texture-mip-drop
git checkout FETCH_HEAD
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6590111968 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1617). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-24T19:50:56Z. --- **#1296 (texture mip drop for low-VRAM cards) resolved onto the GPU bundles, by its author.** antikohza did the resolution and published it as a branch on top of #1542 (see the comment there); this PR is that branch as it is, so that #1296 can be reviewed and merged on the stack (#1418, #1426, #1439, #1542) instead of conflicting with it. The commits and their authors are not touched. > For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a `[BUNDLE]` PR, stacked on #1542, which is itself on #1418, #1426 and #1439. Until they land, their commits show here too. ## What it is [#1296](https://github.com/Marvisak/VIctory/pull/1296) adds `VICTORY_TEXTURE_MIP_DROP` (clamped `0..=3`), a quality switch that drops the top mips of host textures so a 6-8 GB card does not run out of committed memory while the world streams, plus discrete-GPU selection on hybrid laptops (matching the adapter's LUID) and an automatic default: when the variable is not set, `drop = 1` on a GPU with 8.5 GiB or less of dedicated VRAM, `0` otherwise; an explicit setting always wins. Its description has the root cause analysis and the measurements (it fixes #737 and #1226). **That default changes behaviour for owners of 4-8 GB cards** (their textures are halved unless they set the variable), which is the point of the PR and worth a maintainer's decision. ## What was reconciled onto the stack From antikohza's comment on #1542 (`antikohza/VIctory@0d79788`): - `list.rs` and `descriptor.rs`: merged without conflict. - `host.rs`: #967's `adapter::open()` and #1426's device creation kept, a redundant `best_adapter()` dropped, the LUID-matched `DEVICE_MEMORY` kept. - `resource.rs`: `(texture, drop) = host_texture(...)` wired into #431's lazy `OnceLock` initializer (`Resource::host`), so the lazy first-use allocation and the retirement after submission combine with the mip drop. - `texture.rs`: #1418's five-argument `detile_plane()` kept for the existing tests, and a `detile_plane_with_drop(..., self.mip_drop, ...)` added for dropped-mip staging. ## Verification I ran the same checks on the branch (Windows 11, RX 6950 XT, Rust 1.98.1, the pinned toolchain): | Check | Result | |---|---| | `cargo clippy --workspace --all-targets --locked -- -D warnings` | clean | | `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` | clean | | `cargo test --workspace --locked` | 469 passed, 0 failed, 8 ignored (two runs; #1542 alone: 463 passed, 8 ignored; `main`: 342 passed, 6 ignored) | antikohza reports the same three checks, plus `xtask policy`, passing in their fork's CI (run 45473319819). The title was not run. No game data is used or committed. ## Re-verify in one go ```powershell git fetch https://github.com/MamaLeVrai/VIctory.git bundle/texture-mip-drop git checkout FETCH_HEAD cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings cargo test --workspace --locked ``` AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot commented 2026-11-24 20:02:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T19:51:06Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:Marvisak/VIctory:review:6046272208 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1617#pullrequestreview-6046272208). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/copilot-pull-request-reviewer%5Bbot%5D) on 2026-11-24T19:51:06Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
upstream-sync closed this pull request 2026-11-25 02:04:37 +00:00
Marvisak commented 2026-11-25 02:05:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:21:52Z.


Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged.

See #1296.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149469979 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1617#issuecomment-7149469979). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:21:52Z. --- Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged. See #1296. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Marvisak commented 2026-11-25 02:06:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:32:19Z.


Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-gpu/src/copystat.rs, crates/victory-gpu/src/descriptor/host.rs, crates/victory-gpu/src/device.rs, crates/victory-gpu/src/draw.rs, crates/victory-gpu/src/host.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149660949 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1617#issuecomment-7149660949). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:32:19Z. --- <!-- victory-triage v1 head=0d79788520a795f413a0bc9f26e9ce3b5c452c71 verdict=needs-rebase at=2026-11-25T01:32:18Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-gpu/src/copystat.rs`, `crates/victory-gpu/src/descriptor/host.rs`, `crates/victory-gpu/src/device.rs`, `crates/victory-gpu/src/draw.rs`, `crates/victory-gpu/src/host.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_

Pull request closed

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
Marvisak/VIctory!1616
No description provided.