[Ready to merge] I have prepared a fix for #773 (Auto-size texture mip levels) #826

Open
opened 2026-11-24 11:41:10 +00:00 by Xvania7 · 4 comments
Xvania7 commented 2026-11-24 11:41:10 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-24T11:41:10Z.


I have prepared a fix for #773 (Auto-size texture mip levels). Since direct PRs are restricted, the ready-to-merge branch is available in my fork: https://github.com/Xvania7/VIctory/tree/fix/issue-773-mip-levels

The code includes tests and all checks pass locally:

cargo test -p victory-gpu: 51 passed, 0 failed, 1 ignored
cargo clippy: 0 warnings
cargo xtask policy: 154 files ok

It can be automatically merged. Maintainers can pull it or let me know if a PR is needed. (Note: AI-assisted fix)

<!-- greyfinch-sync:Marvisak/VIctory:issue:6580951605 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/826). Originally posted by [Xvania7](https://github.com/Xvania7) on 2026-11-24T11:41:10Z. --- I have prepared a fix for #773 (Auto-size texture mip levels). Since direct PRs are restricted, the ready-to-merge branch is available in my fork: https://github.com/Xvania7/VIctory/tree/fix/issue-773-mip-levels The code includes tests and all checks pass locally: cargo test -p victory-gpu: 51 passed, 0 failed, 1 ignored cargo clippy: 0 warnings cargo xtask policy: 154 files ok It can be automatically merged. Maintainers can pull it or let me know if a PR is needed. (Note: AI-assisted fix)
DaviTostes commented 2026-11-24 12:04:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T11:50:37Z.


Verified the fork branch 3eafeaf (fix/issue-773-mip-levels) on Arch Linux x86_64, Windows MSVC release test build under Wine 11.22 (--test-threads=1):

  • victory-gpu: 51 passed, 0 failed, 1 ignored — matches the numbers in the issue.
  • In the game prefix (vkd3d-proton 3.2 + DXVK dxgi) two unrelated tests fail (indirect::tests::argument_clamp_builds, pipeline::library::tests::a_rejected_blob_gives_an_empty_library); both pass in the plain prefix, so they are environment (clamp compiler / vkd3d blob), not this change.

Not tested: a title run with the fix (the change is GetDesc-only), native Windows, and the mip-clear case in the game.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7130623384 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/826#issuecomment-7130623384). Originally posted by [DaviTostes](https://github.com/DaviTostes) on 2026-11-24T11:50:37Z. --- Verified the fork branch `3eafeaf` (`fix/issue-773-mip-levels`) on **Arch Linux x86_64**, Windows MSVC release test build under **Wine 11.22** (`--test-threads=1`): - `victory-gpu`: **51 passed, 0 failed, 1 ignored** — matches the numbers in the issue. - In the game prefix (`vkd3d-proton 3.2 + DXVK dxgi`) two unrelated tests fail (`indirect::tests::argument_clamp_builds`, `pipeline::library::tests::a_rejected_blob_gives_an_empty_library`); both pass in the plain prefix, so they are environment (clamp compiler / vkd3d blob), not this change. **Not tested:** a title run with the fix (the change is `GetDesc`-only), native Windows, and the mip-clear case in the game.
fuzeofficlal commented 2026-11-24 12:04:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T11:59:03Z.


I independently tested 3eafeaf on native Windows using RTX 5090 and WARP (verified via the D3D12 adapter LUID). The probe used the guest placed-resource path and required a live D3D12 texture mirror before comparing the two descriptions.

Synthetic RGBA8 texture Guest and native mip counts on both adapters
7×5 2D, automatic 3
7×5×9 3D, automatic 4
7×5 2D, explicit one-mip control 1

A native copy into the final 1×1 mip of the automatic 2D texture and a copy back out returned the expected RGBA8 texel on both adapters. The probe covers resource creation and last-mip storage. It uses native D3D12 for the texel copies.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7130804091 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/826#issuecomment-7130804091). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-24T11:59:03Z. --- I independently tested `3eafeaf` on native Windows using RTX 5090 and WARP (verified via the D3D12 adapter LUID). The probe used the guest placed-resource path and required a live D3D12 texture mirror before comparing the two descriptions. | Synthetic RGBA8 texture | Guest and native mip counts on both adapters | | --- | ---: | | 7×5 2D, automatic | 3 | | 7×5×9 3D, automatic | 4 | | 7×5 2D, explicit one-mip control | 1 | A native copy into the final 1×1 mip of the automatic 2D texture and a copy back out returned the expected RGBA8 texel on both adapters. The probe covers resource creation and last-mip storage. It uses native D3D12 for the texel copies.
Xvania7 commented 2026-11-24 12:04:44 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-24T12:03:39Z.


Thanks a lot to @DaviTostes and @fuzefofficial for the independent verification! Really appreciate you testing it on Arch Linux, Windows MSVC, and especially the RTX 5090 + WARP. Glad to hear the mip counts and texel copy back are working exactly as expected across different hardware. Let me know if any further changes are needed before merging

<!-- greyfinch-sync:Marvisak/VIctory:comment:7130906050 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/826#issuecomment-7130906050). Originally posted by [Xvania7](https://github.com/Xvania7) on 2026-11-24T12:03:39Z. --- Thanks a lot to @DaviTostes and @fuzefofficial for the independent verification! Really appreciate you testing it on Arch Linux, Windows MSVC, and especially the RTX 5090 + WARP. Glad to hear the mip counts and texel copy back are working exactly as expected across different hardware. Let me know if any further changes are needed before merging
Marvisak commented 2026-11-25 04:07:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T03:48:40Z.


Automated triage for the maintainers. This is the fix for #773, which is still present on main. resource_desc in crates/victory-gpu/src/resource.rs writes back the description exactly as the title created it, so an automatically sized texture (MipLevels 0) reports 0 mips. mip_count in the same file already computes the full chain for 0. Open PR #933 ("report allocated mips from GetDesc") already addresses #773. Pull requests are open to everyone again (see #717), so please open the branch as a pull request and link #773. If it duplicates #933, compare the two and agree in #773 which one goes forward.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152262469 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/826#issuecomment-7152262469). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T03:48:40Z. --- <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-24T12:03:39Z at=2026-11-25T03:48:39Z --> Automated triage for the maintainers. This is the fix for #773, which is still present on `main`. `resource_desc` in `crates/victory-gpu/src/resource.rs` writes back the description exactly as the title created it, so an automatically sized texture (`MipLevels` 0) reports 0 mips. `mip_count` in the same file already computes the full chain for 0. Open PR #933 ("report allocated mips from GetDesc") already addresses #773. Pull requests are open to everyone again (see #717), so please open the branch as a pull request and link #773. If it duplicates #933, compare the two and agree in #773 which one goes forward. --- _Generated by [Claude Code](https://claude.ai/code)_
Sign in to join this conversation.
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#826
No description provided.