GPU: two invalid calls the title made, and the diagnostics feature #2432
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2432
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2432/head"
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?
@FoxxoOwO on GitHub · 2026-11-25 13:25 UTC · original
FoxxoOwO:gpu/invalid-calls→main· +23 −2 · 3 files · 1 commits · closed without mergingThe D3D12 debug layer (previously unusable — the app's
diagnosticsfeature did not forward tovictory-gpu, soVICTORY_D3D12_DEBUGandVICTORY_D3D12_WARPcould never turn on) names two calls that remove the device while the title loads its world. Both are gone.crates/victory-gpu/src/resource.rsinshared_texture:GetResourceAllocationInfowas asked about the title's texture description, which may carryALLOW_UNORDERED_ACCESSin a format the host cannot view as unordered access — an invalid call, answered by device removal. It now asks the live host texture's own description. The result is only theSAVEDstatistic of shared bytes.crates/victory-gpu/src/descriptor/host.rsinfits: a texture unordered view took the title's view format unconditionally.CreateUnorderedAccessViewwithB5G5R5A1_UNORM(the menu's) is an invalid call, and the debug layer removes the device.fitsnow askstyped_store(D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW) about the format the view really takes and rejects the ones the host cannot store, so the slot falls back to the existing null-view path.What it changes in the title
Before: device removed after ~550 frames at the start of the world load (
DXGI_ERROR_INVALID_CALL).After: the world loads, mesh pipelines run, menus at 30 fps; the title then dies of
DXGI_ERROR_DEVICE_HUNG— 1428 draws a frame at 4282 ms/frame, an 8 s submission. That is a throughput problem (world batching/culling), not an invalid call, and is not addressed here.Verification
cargo test -p victory-gpu: 141 passed, 2 failed —descriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_views, both failing onmainbefore this change.cargo check -p victory-gpuclean; the touched hunks arerustfmt-clean (the crate has pre-existing formatting drift under rustfmt 1.98.1).@kotekompotek on GitHub · 2026-11-25 14:27 UTC · original
Two parts, two overlaps worth noting for triage:
GetResourceAllocationInfochange is the right fix on its own merits: querying the live texture'sGetDesc()instead of the transformeddmeans the queried description is the ground truth of what the host actually created. Under #2442 (which drops the illegalALLOW_UNORDERED_ACCESSinhost_desc) the querieddis already sanitized, so the paths become equivalent — but the live-desc form is more robust (covers any future transform, not just the flag).fits()block duplicates #2462: both refuse a typed unordered view whose effective format failstyped_store— #2462 probesview != 0 ? view : own(with aview == 0 && typelessexemption), this probestypeless || cast ? view : own. Equivalent outcomes, slightly differentonce!paths; only one should land. Note main's existing check at ~1047 only coverscast && family(view) != family(own), so the same-family-cast and own-format cases both PRs add are genuinely new coverage — but it only needs adding once.@Marvisak on GitHub · 2026-11-25 15:57 UTC · original
Automated triage for the maintainers.
Merge candidate.
shared_textureincrates/victory-gpu/src/resource.rsnow passes the live host texture's own description toGetResourceAllocationInfo. Before, it passed the title-derivedd, which can be an invalid description; the result only feeds theSAVEDstatistic.fitsindescriptor/host.rsnow refuses a typed unordered view whose formattyped_storerejects, and it checks the format the view actually takes (viewif typeless or castable, otherwiseown). That extends main's existing check, which only covered castable formats from another family. CI (check) passes.Notes for the maintainer: #2462 adds an overlapping check to
fits(it also covers theview == 0case, which this PR doesn't), so only one of the two should land. Theapps/victory/Cargo.tomlline is harmless but redundant:victory-hle/diagnosticsalready enablesvictory-gpu/diagnosticsonmain, so the description's claim that the GPU debug switches could never turn on is not accurate. This is a recommendation to look, not an approval.Generated by Claude Code
@KainanP on GitHub · 2026-11-25 19:36 UTC · original
RTX 4060 Laptop (610.47), merged onto main
13f91cae: the B5G5R5A1 UAV half crashes the process (access violation 0xc0000005) on a UAV without a description, becauseview == 0returns before the new check; the B4G4R4A4 half still removes the device; no new failures otherwise. Details and the side-by-side table with the other #1753 PRs: #1753. Tested with the help of an AI assistant (Claude Code).@Marvisak on GitHub · 2026-11-25 22:09 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 each part is redundant or done elsewhere. The
Cargo.tomlline changes nothing:victory-hle'sdiagnosticsfeature already enablesvictory-gpu/diagnostics. Theshared_texturechange is line for line #2286. Thefits()check sits after the early return for a view with no format, so that case is still unchecked; #2462 covers it.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