Repository navigation
Conversation
catminou4
left a comment
There was a problem hiding this comment.
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.
|
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 The log can also use the error from the existing interface query. That saves a second |
…ing test there
|
Automated triage for the maintainers. Merge candidate. This is a recommendation to look, not an approval. Re-reviewed at
The earlier small point still stands, and it does not block: a placed texture made without On your reply: confirmed. Dropping the test change leaves #2251 to own the expectations, and using the query's own error saves the second Generated by Claude Code |
|
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 The placed-view test change from this branch is dropped in |
resource::make_texture makes a texture with its castable formats through CreateCommittedResource3, which needs ID3D12Device10 (D3D12 1.7). On a Windows 10 system runtime the interface is missing (E_NOINTERFACE), the castable list is cleared silently, and every view in another format gets its own host texture and a copy at the read. Say so once in the log: without it a tester cannot tell why a window shows two textures per memory (and why the placed-view test fails). Host::device10() exposes the check, and the placed-view sharing test skips with the reason when it is false, like the other capability skips: what it checks cannot hold without the castable list. Closes Marvisak#1999.
The test's expectation is host-derived in Marvisak#2251 (which covers the memory paired-copy and heap-cap tests as well); this branch keeps only the log for the missing D3D12 1.7 and `Host::device10`.
The log check and the castable-format creation each cast the device. Ask once per texture and use the answer for both, which also drops the `Host::device10` helper.
a4f8f45 to
ca43982
Compare
|
Rebased onto Conflicts were in
On Windows 10 19045 without the Agility runtime (no AI-assisted (DeepSeek V4.1). |
The one ID3D12Device10 query per texture now keeps its Result, so the info log can name the HRESULT without asking a second time. Requested by @AlanQiang0418 on Marvisak#2005.
|
Both points from @AlanQiang0418 are handled, one by the drop and one by 1. The early return and the BC1 round: gone. The test change was dropped in 2. The log uses the query's own error, not a second call. Noticed and adopted, thank you: the let mut device10_error = None;
let device10 = match (!castable_formats.is_empty())
.then(|| host.device.cast::<ID3D12Device10>())
.transpose()
{
Ok(device) => device,
Err(error) => { device10_error = Some(error); None }
};and the one-time message matches on it: ONCE.call_once(|| match &device10_error {
Some(error) => tracing::info!(error = %error, "..."),
None => tracing::info!("..."),
});So an eligible texture costs exactly one Verification (Windows 10 22H2 19045, RX 7800 XT, driver 32.0.32029.2010,
I could not reproduce your injected AI-assisted (DeepSeek V4.1), no game data. |
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; Tests: heap-capped and barrier-less hosts run the GPU tests #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.