GPU: log the missing D3D12 1.7 (no castable texture formats) #2005
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!2005
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Calvix2k on GitHub · 2026-11-25 02:44 UTC · original
Calvix2k:codex/gpu-device10-1999→main· +34 −4 · 1 files · 4 commits · openOnly 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.
@AlanQiang0418 on GitHub · 2026-11-25 02:48 UTC · original
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.@Marvisak on GitHub · 2026-11-25 09:16 UTC · original · edited 2026-11-25 22:24 UTC
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
@Calvix2k on GitHub · 2026-11-25 09:40 UTC · original
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.@Calvix2k on GitHub · 2026-11-25 18:33 UTC · original
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).
@Calvix2k on GitHub · 2026-11-25 21:19 UTC · original
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.
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.