GPU tests: read back cleared constant buffer descriptors #2889
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!2889
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2889"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 23:08 UTC · original
andrewpozdnakov7-jpg:codex1/null-cbv-shader-readback→main· +63 −0 · 1 files · 1 commits · openCoverage
#2449 tests that a null CBV description replaces the guest record. This test starts with a live CBV in a shader-visible guest heap and checks the actual GPU readback from both its mirrored host slot and a reused table slot. It clears the same CBV and expects both slots to read zero through a raw SRV.
This is the shader regression originally contributed in #1916, adapted to use the current guest heap mirroring and table paths. Production code is unchanged.
Verification
120233cf912173e4411431a4b47579ef420310feimmediately before #2449: both slots still returned0x11223344after the clear in six WARP runs.96e178d56be53cf164942a260f420d36b7dfb37bbased on842b0cb76f8f5fa9289bd779783c51ec24d75302: both slots returned0x11223344before the clear and zero afterward in all six runs.Please retain the test's Git author if cherry-picked. If folded into another commit, please retain
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.Refs #1242
@fuzeofficlal on GitHub · 2026-11-25 23:18 UTC · original
Verified
96e178d5on Windows 11 (RTX 5090 + WARP +VICTORY_D3D12_DEBUG=1) againstmain(842b0cb):draw::tests::cleared_constant_view_reads_zero_as_a_raw_bufferpassed on both RTX 5090 and WARP, under both default features and--features diagnosticswithVICTORY_D3D12_DEBUG=1(verifying both the mirrored slot and a copied table slot before and aftercreate_cbv(null, null, ...)).cargo clippy --locked -p victory-gpu --all-targets(default &--features diagnostics) 0 warnings;cargo xtask policy(191 files ok).Clean regression coverage for
#2449, ready to merge.@Marvisak on GitHub · 2026-11-26 04:27 UTC · original
Automated triage for the maintainers.
Merge candidate. Adds
cleared_constant_view_reads_zero_as_a_raw_bufferinvictory-gpu/src/draw.rs: it writes a CBV, clears it with a null description, and reads the mirrored and a reused table slot through a raw SRV. It complementsnull_cbv_clears_a_stale_viewby checking the host side (makeandnull_buffer_viewforView::Constant(0, 0)), uses synthetic data only, and expects D3D12 null-CBV semantics.CI: passing (the hosted check has no GPU, so this test likely returns early there).
Generated by Claude Code
@kotekompotek on GitHub · 2026-11-25 23:36 UTC · original · reviewed
Good coverage of the null-CBV path: reads through a raw ByteAddressBuffer of a cleared CBV must produce zeros in both the mirrored slot and a reused table slot — the hardware test exercises both rounds end to end. LGTM.
@Dukestar69 on GitHub · 2026-11-26 08:14 UTC · original · approved these changes
Verified on RTX 5090 & WARP against
origin/main(63bcca4):cargo test -p victory-gpu --lib cleared_constant_view_reads_zero_as_a_raw_buffer -- --test-threads=1: passed on RTX 5090 and WARP.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Clean synthetic GPU readback test covering cleared constant buffer descriptors.
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
96e178d5againstorigin/main(63bcca43) on Windows 11 (RTX 5090 + WARP,VICTORY_D3D12_DEBUG=1):cleared_constant_view_reads_zero_as_a_raw_buffer(crates/victory-gpu/src/draw.rs:2748-2806) adds end-to-end GPU readback coverage for null CBV clearing on both the mirrored host slot (0) and a reused dynamic table slot (visible.make_at(table_slot, &view)). Pre-filling the output buffer with0xdead_beefbefore every dispatch prevents stale-output false positives,readable(..., ResourceType::Cbv, ...)is exercised for both live and cleared views, COM releases (bufferandheap) assert refcount0, andGetDeviceRemovedReason().is_ok()is checked alongside[[0x1122_3344, 0x1122_3344], [0, 0]]. Test-only with no production changes or global state leaks.git merge-treeagainstorigin/main(63bcca43);cargo xtask policy(191 files ok);cargo clippy -p victory-gpu --all-targets -- -D warningsclean with default features and--all-features(both at96e178d5and merged onto63bcca43).cleared_constant_view_reads_zero_as_a_raw_bufferpassed; paralleldraw::tests21/21 passed.VICTORY_D3D12_DEBUG=1(--features diagnostics): target test 1/1 and paralleldraw::tests21/21 passed (also verified merged onto63bcca43: 1/1 passed with zero debug-layer errors).VICTORY_D3D12_WARP=1) +VICTORY_D3D12_DEBUG=1(--features diagnostics): target test 1/1 and paralleldraw::tests21/21 passed.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.