GPU tests: placed R32_UINT -> R9G9B9E5 view does not share its host texture (Windows 10, RX 7800 XT) #1999
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#1999
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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:37 UTC · original
A pre-existing GPU test fails on hardware here, on unmodified
main. No game files, no title run: synthetic textures and two compute shaders.main940d32f(also4118f33)cargo test -p victory-gpu --features diagnostics --lib a_texture_written_in_one_format_reads_in_anotherdraw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_viewRound 0 is the case the test says must share one host texture: a resource object written as
R32_UINT(42) and read through a placed view asR9G9B9E5(67), both 4 bytes per texel. On this machine the placed view gets a secondHostTexture(so a copy at the read) instead of the object's. Round 1 (17 → 71, BC1 against plain, expected not shared) is not reached because the assertion stops the test.Why this may matter beyond the test:
HostTexture::castableis what lets a title's ownR9G9B9E5view of anR32_UINTallocation read the bytes the compute pass wrote without a copy. If the castable list is empty here because the view was first seen after the texture was made, real titles with the sky's table format pay the copy every frame — that is the pattern this test was written for.What I cannot tell from one machine: whether the pair is meant to be castable from the DXGI format family rules (in which case the host texture's
castablelist should contain 67 regardless of registration order), or whether it depends onfitsseeing the view first. CI passes this test, so it is either adapter-dependent or an ordering difference.Is sharing for 42 ↔ 67 supposed to be platform-independent? If yes, I can dig into
fits/castableand send a fix with this case as the regression; if it is a known gap on Windows 10, please say so and I will close this.The whole
victory-gpudiagnostics suite on this host is otherwise 147 passed, 1 failed, 2 ignored, and the failure is this one.@BastienRodz on GitHub · 2026-11-25 02:39 UTC · original
This looks like the Windows 10 in-box runtime, not registration order. Host textures are made castable through
ID3D12Device10::CreateCommittedResource3's castable-format list (resource.rs, the host texture constructor). When the host refuses it,host_texturelogsthe host refuses castable formats: textures of one memory in other formats get their own host textureand makes the texture with an empty castable list, so the placed 67 view can't share. Castable formats needD3D12_FEATURE_D3D12_OPTIONS12::RelaxedFormatCastingSupported(enhanced barriers), which the in-box D3D12 of Windows 10 22H2 doesn't provide; the Agility SDK or Windows 11 does. If that warning is in your diagnostics log on that run, that's the cause. The test would then want to skip round 0 when the device reports no relaxed format casting, rather than fail.@AlanQiang0418 on GitHub · 2026-11-25 02:42 UTC · original
Sharing is optional here. The value the placed view reads is the invariant. PR #1765 already checks both outcomes and still performs the pixel readback on a host that takes the copy path. I applied its commit
d02e007tomainat940d32fand checked the registration-order question independently.Both rows held with the writer created first and with the placed SRV resolved first. In the normal writer-first run, the writer already had format 67 in its 21-format castable list before the reader existed. The BC1 control used two textures and one copy in all eight runs, with all 4,096 texels red.
I could not measure which path your Windows 10 machine took. One detail when checking the log: on this revision the refusal warning is inside the successful
ID3D12Device10interface-query branch. If that interface is unavailable, the code also falls back to plain creation, without emitting that warning. Host creation code@Calvix2k on GitHub · 2026-11-25 02:44 UTC · original
Root cause found, and it is environmental rather than a sharing regression: this runtime has no
ID3D12Device10, soresource::make_texturenever gets toCreateCommittedResource3and never records any castable format.Debug output on
main 940d32f(temporary prints, not committed):make_texturedoeshost.device.cast::<ID3D12Device10>(), and on failure it silently falls through to the plainCreateCommittedResourcepath, which clearscastable_formats. So on a Windows 10 system D3D12 runtime (this is the same reason the SM 6.6 GPU suites cannot make a device, #1829/#1991) every view in another format gets its ownHostTextureand a copy at the read — the fallback is working as designed, only the format pair the test picks cannot share without the castable list.So the test is honest about the capability; what is missing is (a) the log, because a tester cannot see why sharing is off, and (b) a skip for this case like the other capability skips.
I have both in a branch: a one-time
tracing::info!when the cast fails andHost::device10(), with the test skipping when it is false. I will open it as its own PR and link it here. WithD3D12Core.dllfrom the Agility SDK next to the executable (as the releases stage), the same code takes the castable path and the test passes; CI shows that.Closing this as environmental, tracked by the log/skip PR rather than a bug in sharing.
@Calvix2k on GitHub · 2026-11-25 10:40 UTC · original
Confirmed as the missing
ID3D12Device10(D3D12 1.7) and nothing else. With the Agility runtime staged for the test binaries — package 1.620.2,D3D12Core.dllin<profile>/D3D12/, theD3D12SDKVersion/D3D12SDKPathexports (the same opt-in #486 givesvictory-shader) — on this machine (Windows 10 19045, RX 7800 XT):including
draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view, which without the runtime fails atdraw.rs:2185,round 0: one host texture, leftfalse/ righttrue.So the same device, driver and title give either result depending on whether the runtime in use has castable formats; the test's expectation (
shared = truefor round 0, and noALIAS_COPIESmovement) is only right with them. The host can answer that directly:ID3D12Device10present, orD3D12_FEATURE_D3D12_OPTIONS12's castable-format support, decides which expectation the test derives — which is what #2251 is for. Without it the test is red on every Windows 10 machine that does not stage the runtime, and that includes CI if CI is Windows 10.@Marvisak on GitHub · 2026-11-25 12:49 UTC · original
Automated triage for the maintainers.
Confirmed in
main(940d32f) as a test that does not account for the host's capabilities.draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view(crates/victory-gpu/src/draw.rs) asserts round 0 shares one host texture. But the texture constructor incrates/victory-gpu/src/resource.rstakes the castable-format path only whenhost.device.cast::<ID3D12Device10>()succeeds; otherwise it silently creates a plain resource with no castable formats. The Windows 10 in-box runtime has noID3D12Device10, so the views get separate host textures (and a copy) and the assertion fails. With the Agility runtime staged, the suite passes on the same machine (comment above).Open PRs: #2251 (derive the expectation from the host's capability) and #1765 (checks both outcomes by the value read). A one-time log line when the cast fails, as proposed above, would also help testers.
Generated by Claude Code
@lerapeurdu62280-debug on GitHub · 2026-11-26 15:45 UTC · original
Same failure here on Windows 10 Pro 19045 with an RX 6600 (Adrenalin 32.0.21045), on
main63bcca4, with a different assertion:round 0: a placed texture. The cause on this PC is the Windows 10 D3D12 runtime without the Agility SDK: it stops at shader model 6.5 and has noID3D12Device10. SoCreateCommittedResource3(castable formats) is never reached, the R32_UINT texture is not castable to R9G9B9E5, and the view's own texture (format 67 with the memory's unordered access) is refused withE_INVALIDARG. On your PC the texture was made but not shared, which fits the same missing castable path.#3283 skips this test (and two others that need 6.6) on such a runtime. The real fix for the runtime itself is the Agility SDK (#2460 / #2878).