GPU: log initial states and clear format when texture creation fails #1628

Closed
github-bot wants to merge 2 commits from gh-pr/1628/head into gh-pr/1628/base
Owner

@⁠AwsAli05 on GitHub · 2026-11-24 19:57 UTC · original
AwsAli05:gpu/log-texture-creation-parameters → main · +9 −1 · 1 files · 2 commits · closed without merging

Refs #1600. Thanks to the issue reporter for isolating the initial state and optimized-clear format as arguments worth capturing.

The existing "no host texture" warning prints the host resource description and HRESULT. Add the state requested by the title, the state passed to D3D12 after translation, and the optional format of the optimized clear value. Capturing these arguments separately lets the next affected run tell which combination D3D12 received. The call still uses the same texture description, state and clear value.

I used a temporary synthetic WARP probe to exercise three calls through the ordinary texture allocation path. An RGBA8 target requested in state 0x02000004 with a format-10 clear failed with E_INVALIDARG and logged host_state=0x4, title_state=0x2000004 and clear_format=Some(10). The same resource with a matching format-28 clear allocated successfully. A zero-sample descriptor without a clear failed with E_INVALIDARG and logged clear_format=None.

The GPU suite passed 50 tests with one ignored benchmark. Clippy passed for the GPU crate with all targets and features. No game files were used for the probe.

**@⁠AwsAli05** on GitHub · 2026-11-24 19:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/1628) `AwsAli05:gpu/log-texture-creation-parameters` → `main` · +9 −1 · 1 files · 2 commits · closed without merging Refs #1600. Thanks to the issue reporter for isolating the initial state and optimized-clear format as arguments worth capturing. The existing "no host texture" warning prints the host resource description and HRESULT. Add the state requested by the title, the state passed to D3D12 after translation, and the optional format of the optimized clear value. Capturing these arguments separately lets the next affected run tell which combination D3D12 received. The call still uses the same texture description, state and clear value. I used a temporary synthetic WARP probe to exercise three calls through the ordinary texture allocation path. An RGBA8 target requested in state 0x02000004 with a format-10 clear failed with E_INVALIDARG and logged host_state=0x4, title_state=0x2000004 and clear_format=Some(10). The same resource with a matching format-28 clear allocated successfully. A zero-sample descriptor without a clear failed with E_INVALIDARG and logged clear_format=None. The GPU suite passed 50 tests with one ignored benchmark. Clippy passed for the GPU crate with all targets and features. No game files were used for the probe.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:51 +00:00
github-bot closed this pull request 2026-11-26 04:38:51 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:32 UTC · original · edited 2026-11-25 06:27 UTC

Automated triage for the maintainers.

Merge candidate. A small diagnostic for #1600. When texture creation fails, the "no host texture" warning in make_texture (crates/victory-gpu/src/resource.rs) now also logs the title's requested state, the host state actually passed (initial, after legal_for and the common-layout reset), and the format of the optimized clear value after pc_format. I checked that those are the values the CreateCommittedResource / CreateCommittedResource3 calls receive. Nothing else in the call changes.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1628#issuecomment-7149666927) · edited 2026-11-25 06:27 UTC <!-- victory-triage v1 head=581bc4eec1cae1180fe7ff27b2612253ee011902 verdict=merge-candidate at=2026-11-25T06:26:49Z --> Automated triage for the maintainers. **Merge candidate.** A small diagnostic for #1600. When texture creation fails, the "no host texture" warning in `make_texture` (`crates/victory-gpu/src/resource.rs`) now also logs the title's requested state, the host state actually passed (`initial`, after `legal_for` and the common-layout reset), and the format of the optimized clear value after `pc_format`. I checked that those are the values the `CreateCommittedResource` / `CreateCommittedResource3` calls receive. Nothing else in the call changes. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:01 UTC · original

Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing because the question it was written for has been answered. Issue #1600 asked which argument the host refuses for two of the title's targets. Its comments now show the debug layer naming the unsupported unordered-access and render-target flags on those formats on NVIDIA, with the initial state and clear format being fine, so the fields logged here are not the cause. The fix belongs in texture creation (see #2286 and #2319).

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 22:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1628#issuecomment-7175845912) Automated triage for the maintainers, second look (a review against current `main`, with builds and tests where they could change the verdict). Closing because the question it was written for has been answered. Issue #1600 asked which argument the host refuses for two of the title's targets. Its comments now show the debug layer naming the unsupported unordered-access and render-target flags on those formats on NVIDIA, with the initial state and clear format being fine, so the fields logged here are not the cause. The fix belongs in texture creation (see #2286 and #2319). If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!1628
No description provided.