GetDesc returns zero mips for automatically sized textures #773

Open
opened 2026-11-26 04:13:57 +00:00 by github-bot · 1 comment
Owner

@⁠fuzeofficlal on GitHub · 2026-11-24 10:14 UTC · original

On ffe310e, creating a texture with MipLevels = 0 allocates the full mip chain, but the guest resource's GetDesc returns zero. Native D3D12 returns the allocated count. A clear loop driven by that descriptor skips every mip of a synthetic 4×4 texture.

Synthetic check Stock Patched
4×4 automatic chain, matching texels across all three mips 0/21 21/21
Explicit two-mip control, matching texels 20/20 20/20
Ordinary buffer, reported mip count 1 1

RTX 5090 and WARP gave the same results. Automatic 1D, 2D, 2D array, and 3D cases also reported the same counts as native D3D12 after the patch. Both diagnostic runs passed 53 tests with one benchmark ignored.

Source commit uses the existing mip-count calculation when returning the descriptor for an automatically sized texture.

**@⁠fuzeofficlal** on GitHub · 2026-11-24 10:14 UTC · [original](https://github.com/Marvisak/VIctory/issues/773) On `ffe310e`, creating a texture with `MipLevels = 0` allocates the full mip chain, but the guest resource's `GetDesc` returns zero. Native D3D12 returns the allocated count. A clear loop driven by that descriptor skips every mip of a synthetic 4×4 texture. | Synthetic check | Stock | Patched | | --- | ---: | ---: | | 4×4 automatic chain, matching texels across all three mips | 0/21 | 21/21 | | Explicit two-mip control, matching texels | 20/20 | 20/20 | | Ordinary buffer, reported mip count | 1 | 1 | RTX 5090 and WARP gave the same results. Automatic 1D, 2D, 2D array, and 3D cases also reported the same counts as native D3D12 after the patch. Both diagnostic runs passed 53 tests with one benchmark ignored. [Source commit](https://github.com/fuzeofficlal/VIctory/commit/ec64d8d5959df14243437d207c725d235ab1c9f0) uses the existing mip-count calculation when returning the descriptor for an automatically sized texture.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:57 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:51 UTC · original

Automated triage for the maintainers.

Confirmed on main: resource_desc (the resource's GetDesc) in crates/victory-gpu/src/resource.rs writes back the description exactly as the title created it. A texture created with MipLevels = 0 therefore reports 0, although mip_count in the same file allocates the full chain.

Open pull request #933 ("report allocated mips from GetDesc") addresses it. Please compare your commit with it and comment there, or open your own pull request if yours differs. Pull requests are open to everyone. The GetDesc return-value issue is separate (#779).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:51 UTC · [original](https://github.com/Marvisak/VIctory/issues/773#issuecomment-7152309332) <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-24T10:14:33Z at=2026-11-25T03:51:44Z --> Automated triage for the maintainers. Confirmed on `main`: `resource_desc` (the resource's `GetDesc`) in `crates/victory-gpu/src/resource.rs` writes back the description exactly as the title created it. A texture created with `MipLevels = 0` therefore reports 0, although `mip_count` in the same file allocates the full chain. Open pull request #933 ("report allocated mips from GetDesc") addresses it. Please compare your commit with it and comment there, or open your own pull request if yours differs. Pull requests are open to everyone. The `GetDesc` return-value issue is separate (#779). --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#773
No description provided.