GPU tests: cover texture alias fallback on runtimes without Device10 #2747
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!2747
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2747"
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?
@VlREX on GitHub · 2026-11-25 19:30 UTC · original
VlREX:fix/texture-test-device10-fallback→main· +3 −0 · 1 files · 1 commits · openFixes the texture alias test expectation on Windows runtimes without ID3D12Device10 support.
Test environment:
Root cause: ID3D12Device10 returns E_NOINTERFACE (0x80004002).
Local diagnostic test results:
Texture copy and pixel validation remain enabled. No production rendering code changes.
The equivalent diagnostic patch passed on physical hardware. CI verification of the final minimal patch is pending.
@fuzeofficlal on GitHub · 2026-11-25 20:03 UTC · original
Reviewed and verified
3892a538on Windows 11 (RTX 5090 + WARP) againstmain(13f91ca).sharedwithhost.device.cast::<ID3D12Device10>().is_ok()accurately reflects the runtime condition for castableCreateCommittedResource3sharing vs. theALIAS_COPIESfallback path, keeping readback assertions intact without adding any shared test state.VICTORY_D3D12_WARP=1,--features diagnostics --lib -- --test-threads=1): 198 passed, 0 failed, 1 ignored.draw::tests): 11/11 passed both parallel and--test-threads=1.cargo clippy -p victory-gpu --all-targets --locked(default and--features diagnostics): 0 warnings;cargo xtask policy: 184 files ok; cleangit merge-treeagainst13f91caand#2726.@kotekompotek on GitHub · 2026-11-25 20:07 UTC · original
Right fix for hardware variance: resource aliasing requires ID3D12Device10, so the Arc::ptr_eq assertion now keys off whether the legacy path is actually in use while still requiring the copy itself and the texel readback.
@oni-swr on GitHub · 2026-11-25 20:16 UTC · original
Independent WARP verification: PR head
3892a53Environment: Windows 11, rustc/cargo 1.98.1, debug build,
VICTORY_WARP=1 VICTORY_D3D12_WARP=1(Microsoft WARP only, no physical GPU), Windows SDK 10.0.26100.0dxil.dll1.8.2502.11 onPATH. Tested the PR head itself (single commit directly onorigin/main13f91caee2, so identical to the merge tree). All commandscargo ... --locked.Baseline on origin/main:
test -p victory-gpu --lib: 195 passed, 0 failed, 1 ignored.--features diagnostics: 1 failure,memory::tests::a_submission_that_missed_leaves_the_copies_at_once(memory.rs:886), pre-existing and flaky on main (failed 3 of 4 repeated full runs, passes alone).clippy --all-targets --features diagnostics -D warnings: clean.On this PR (test-only change):
test -p victory-gpu --lib: 195 passed, 0 failed, 1 ignored.--features diagnostics: 198 passed, 0 failed, 1 ignored.clippy --locked -p victory-gpu --all-targets --features diagnostics -- -D warnings: clean.host.device.cast::<ID3D12Device10>()inresource.rsanddraw.rswith anE_NOINTERFACEerror: with the PR's test,a_texture_written_in_one_format_reads_in_another_through_a_placed_viewpasses. With origin/main's test and onlyresource.rspatched, it fails (round 0: one host texture, left false, right true). Restored all files afterwards.Review: the expectation that the pair shares a host texture is now conditional on Device10, matching
resource.rs(castable formats are cleared on the legacy path). The readback texels and the 'a copy only where not shared' assertion are unchanged. Caveat: Device10 being present does not strictly guaranteeCreatePlacedResource2succeeds, so such a runtime would still fail the test. No other findings.Not tested: a physical GPU, any retail title or game behavior, a release build, non-Windows targets.
AI disclosure: this verification was run by Claude Code (Claude Sonnet 5.5). No game files, dumps, shader names or retail hashes were used.
@Marvisak on GitHub · 2026-11-25 23:25 UTC · original
Automated triage for the maintainers. This is a test-only change to
a_texture_written_in_one_format_reads_in_another_through_a_placed_viewincrates/victory-gpu/src/draw.rs. The test now expects the castable pair to share one host texture only when the device casts toID3D12Device10. That matchescrates/victory-gpu/src/resource.rs, where the legacyCreatePlacedResourcepath clears the castable formats, so the test no longer fails on runtimes without Device10. The copy and texel readback assertions are unchanged. CI:checkpassing. This is a recommendation for a maintainer to look, not an approval.Generated by Claude Code
@Dukestar69 on GitHub · 2026-11-26 04:11 UTC · original · approved these changes
Tested merged onto
origin/main(63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090):cargo test -p victory-gpu --lib draw::tests: 20 passed, 0 failed.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).
@fuzeofficlal on GitHub · 2026-11-26 12:07 UTC · original · approved these changes
Reviewed and verified at head
3892a538and merged ontoorigin/main(63bcca43) on Windows 11 (RTX 5090 + WARP,VICTORY_D3D12_DEBUG=1):sharedonhost.device.cast::<ID3D12Device10>().is_ok()ina_texture_written_in_one_format_reads_in_another_through_a_placed_view(crates/victory-gpu/src/draw.rs:2396-2399) matchescrates/victory-gpu/src/resource.rs:1328,1364, where the legacy creation path clearscastable_formats. OnID3D12Device10runtimes, round 0 staysshared == truewith the exact same strictness; on runtimes withoutID3D12Device10,sharedbecomesfalseso line2415(assert_eq!(copied, !shared, ...)) actively enforces that theALIAS_COPIESfallback path runs and still checks every readback texel. Test-only with no production side effects.git merge-treeagainstorigin/main(63bcca43);cargo xtask policy(184 files ok);cargo clippy -p victory-gpu --all-targets -- -D warningsclean with default features and--all-features(both at3892a538and merged onto63bcca43).Device10path:draw::tests11/11 passed on RTX 5090 (default), RTX 5090 +VICTORY_D3D12_DEBUG=1, and WARP +VICTORY_D3D12_DEBUG=1; merged onto63bcca43,a_texture_written_in_one_format_reads_in_another_through_a_placed_viewpassed on RTX 5090 +VICTORY_D3D12_DEBUG=1.Device10probe (forcinghost.device.cast::<ID3D12Device10>()toErrinresource.rsanddraw.rs): passed on WARP +VICTORY_D3D12_DEBUG=1through theALIAS_COPIESfallback with exact texels and zero debug-layer warnings; revertingdraw.rstoorigin/mainfailed as expected atround 0: one host texture (left: false, right: true).Device10probe on RTX 5090 (with or withoutVICTORY_D3D12_DEBUG=1), round 0 fails earlier atround 0: a placed texturedue to a pre-existingresource.rs:1238-1245(shared_texture) quirk whereR32_UINTandR9G9B9E5_SHAREDEXPshare aMemoryKeyandALLOW_UNORDERED_ACCESSis ORed onto the fallbackR9G9B9E5_SHAREDEXPtexture (which NVIDIA rejects while WARP/AMD accept).LGTM.
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.