GPU: log the missing D3D12 1.7 (no castable texture formats) #2003
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2005"
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 Calvix2k on 2026-11-25T02:44:55Z.
Only the log; the placed-view test's expectation lives in #2251, and the cast device is now asked once per texture.
What
resource::make_texturemakes a texture with its formats (castable) throughCreateCommittedResource3, which needsID3D12Device10(D3D12 1.7). On a Windows 10 system runtime that interface is absent; the existing fallback then clears the castable list — correctly, since the old API cannot pass one — but silently, so every view in another format gets its ownHostTextureand a copy at the read, and nothing in the log says why.resource.rs: ask forID3D12Device10once per texture (oneQueryInterfaceserving both the log and the creation, which used to ask twice) and, when it is absent while a castable list was wanted, log once atinfo.HostTexturebehaviour are as inmain.Verification
cargo test -p victory-gpu --features diagnostics --lib— the same single failure as unmodifiedmain(draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view, the missingID3D12Device10; #2251 derives its expectation).cargo clippy -p victory-gpu --all-targets -- -D warningsclean;cargo xtask policyclean.ID3D12Device10exists the log is not reached, and the creation path is unchanged.No game data.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:48:45Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Logs missing D3D12 1.7 and skips the sharing test there — capability gating for older WARP/driver combos; good hardening.
Imported from Marvisak/VIctory. Originally posted by AlanQiang0418 on 2026-11-25T02:48:50Z.
Could we keep both GPU readbacks running on hosts without Device10, and use the writer texture's accepted format list to decide whether round 0 should share? #1765 already has that assertion. The early return here also skips the BC1 round, which expects a copy on every host.
I tested
cdc5986on an RTX 5080 and WARP. Both passed normally. With Device10 still available, I simulatedCreateCommittedResource3returningE_INVALIDARGfor the R32_UINT allocation only. Both runs then failed atround 0: one host texture(actualfalse, expectedtrue). Dropping the early return and usinglet shared = shared && !a.castable.is_empty();made both pass with the same injected failure, including the copy and texel assertions. The Intel report on #1765 describes a real adapter that refuses the list.The log can also use the error from the existing interface query. That saves a second
QueryInterfaceon each eligible texture and includes the HRESULT. I tested a one-file implementation with tracing enabled on both adapters. Four injectedE_NOINTERFACEresults in one process produced one INFO line with0x80004002; normal runs produced zero._d16and_d16_hiloads #2001[PR #2005] GPU: log the missing D3D12 1.7 and skip the sharing test thereto [PR #2005] GPU: log the missing D3D12 1.7 (no castable texture formats)Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T09:16:53Z.
Automated triage for the maintainers.
Merge candidate. This is a recommendation to look, not an approval. Re-reviewed at
b674985, which merges cleanly intomain.resource::make_texture(crates/victory-gpu/src/resource.rs) now asks forID3D12Device10once per texture, only when there are castable formats, and keeps theQueryInterfaceerror. The placed path (CreatePlacedResource2), the log and the committed path (CreateCommittedResource3) all use that one result.maincan ask twice. The one-time info line now carries the HRESULT. Control flow otherwise matchesmain: the committed path runs exactly whenmain's!castable_formats.is_empty() && cast::<ID3D12Device10>().is_ok()would. The test expectations stay with #2251.The earlier small point still stands, and it does not block: a placed texture made without
ID3D12Device10clearscastable_formatsbefore the log check, so the line first appears with a committed texture. Checkingdevice10.is_none()right after the query would log on the first texture.On your reply: confirmed. Dropping the test change leaves #2251 to own the expectations, and using the query's own error saves the second
QueryInterface. CI:checkpassing on this head.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T09:40:47Z.
Narrowed after seeing #2251 (@kotekompotek), which derives the placed-view test's expectation from the host instead of skipping it, and does the same for the paired-copy and heap-cap tests.
What is left here is only the missing log: when a castable format list would be used and the device has no
ID3D12Device10(D3D12 1.7 — a Windows 10 system runtime), say so once, because otherwise the fallback (every view in another format gets its own host texture and a copy) is invisible.Host::device10()is the check.The placed-view test change from this branch is dropped in
83ee34f; #2251 owns the test expectations. Nothing conflicts between the two now.Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T18:33:51Z.
Rebased onto
origin/main13f91ca; the branch is mergeable again.Conflicts were in
host.rs(device10next to main's newcopies_in_video_memory) andresource.rs(main'scrate::placementpath). Resolution:Host::device10is gone, as the last commit intended:resource::make_textureasksID3D12Device10once per texture into adevice10local and uses it for the placement, the log and the committed creation. The placed path now reuses that query instead of asking again.device10is none, before the plain fallback.3e80d2c/ #2251.On Windows 10 19045 without the Agility runtime (no
ID3D12Device10) + RX 7800 XT:cargo clippy -p victory-gpu --all-targetsclean,cargo test -p victory-gpu --lib194 passed, 1 failed, 1 ignored; the one failure isa_texture_written_in_one_format_reads_in_another_through_a_placed_view("a placed texture"), the expectation #2251 owns, and it fails the same way onmainhere. The new info log appears once.AI-assisted (DeepSeek V4.1).
Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T21:19:17Z.
Both points from @AlanQiang0418 are handled, one by the drop and one by
b674985.1. The early return and the BC1 round: gone. The test change was dropped in
83ee34f; #2251 owns the placed-view, paired-copy and heap-cap expectations. The diff here now touches onlyresource::make_texture: oneID3D12Device10query per texture, plus one log. No test edits, soround 0/round 1keep expecting a copy on every host, and the writer texture's accepted format list is not consulted here at all — that decision stays where #1765/#2251 put it.2. The log uses the query's own error, not a second call. Noticed and adopted, thank you: the
Resultis kept instead of discarded with.ok(), so the message carries the HRESULT.and the one-time message matches on it:
So an eligible texture costs exactly one
QueryInterfacewhether or notID3D12Device10is there, and the line says why it is missing.Verification (Windows 10 22H2 19045, RX 7800 XT, driver 32.0.32029.2010,
origin/main13f91carebased):cargo clippy --locked -p victory-gpu --all-targets -- -D warnings: clean.cargo test --locked -p victory-gpu --lib: 194 passed, 1 failed, 1 ignored. The one failure isdraw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view("round 0: a placed texture"), the expectation #2251 owns; it fails the same way onmainhere.I could not reproduce your injected
E_INVALIDARG/E_NOINTERFACEsetup, so the HRESULT in the line is the one yourdd1825edescribes rather than a second measurement of it.AI-assisted (DeepSeek V4.1), no game data.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T20:10:35Z.
Review: APPROVED
Verified locally merged onto
origin/main(63bcca43) at PR headb674985d(Windows 11 x64, NVIDIA RTX 5090 + Microsoft WARP,VICTORY_D3D12_DEBUG=1):crates/victory-gpu/src/resource.rs(make_texture): consolidatesID3D12Device10lookup to a singleQueryInterfaceper eligible texture shared across placement, one-time info logging (carrying theQueryInterfaceerror), and committed creation, without changing fallback behavior.cargo xtask policy: 191 files ok.cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--all-features): 0 warnings.cargo test --locked -p victory-gpu --features diagnostics --lib -- resource::tests:: draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view: 19/19 passed on both RTX 5090 and WARP withVICTORY_D3D12_DEBUG=1.placement.is_some()) and committed (placement.is_none())R8G8B8A8_UNORMtextures on RTX 5090 and WARP keeps non-emptycastablelists and emits 0"no ID3D12Device10"log events.Non-blocking note: echoing the triage remark, logging directly inside the
Err(error)arm of theID3D12Device10query would also cover placed-only runs (beforeCreatePlacedResourceclearscastable_formats) and eliminate the unreachableNonematch arm ondevice10_error. Fine to merge as-is; synthetic tests only.Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T23:08:35Z.
Review: APPROVED
LGTM — verified on RTX 5090 (Windows / D3D12) against
origin/main(63bcca4).ID3D12Device10/ castable texture formats) is unavailable improves diagnostics cleanly without changing behavior on supporting hosts.cargo test -p victory-gpu --lib resource:: -- --test-threads=1: all passed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.