GPU: log initial states and clear format when texture creation fails #1627
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1628"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by AwsAli05 on 2026-11-24T19:57:40Z.
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.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T20:06:16Z.
Review: COMMENTED
Static review only: victory-gpu/victory-hle/apps are Windows-only (D3D12/windows_sys), so nothing here compiles or runs on macOS — please rely on the Windows CI leg.
Failed host texture creation now logs
host_state(legal state afterlegal_for),title_stateandclear_format— andclear_value[0]is indeed the format word (resource.rs setsvalue[0] = pc_format(value[0])on the[u32; 5]clear value), so the field is correct.host_stateis computed once beforeCreateCommittedResourceinstead of inline — no behavior change, clearer logs. Trivial and safe.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:32:37Z.
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, afterlegal_forand the common-layout reset), and the format of the optimized clear value afterpc_format. I checked that those are the values theCreateCommittedResource/CreateCommittedResource3calls receive. Nothing else in the call changes.CI: passing (
check).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:01:49Z.
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