GPU: initialise new page tables to their null view pair #3119
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!3119
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3119"
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?
@fuzeofficlal on GitHub · 2026-11-26 08:50 UTC · original
fuzeofficlal:fix/gpu-page-table-null-init→main· +91 −0 · 1 files · 1 commits · openSummary
Split out from #3106 per triage feedback.
Shared::newallocates the title-memory page table buffer and reserves anulldescriptor pair (heap.pair()), but previously left the table buffer zeroed until the firstShared::rewrite. If a command list executes with that table beforerewritehas ever run (for example when its view heap is released before its firstprepare), every level-1 lookup resolves to block 0 and every block-0 entry hase.x == 0, causing translated shaders to index descriptor slot 0 instead ofself.null.Changes
crates/victory-gpu/src/memory.rs:Shared::new, point every level-1 entry at block 0 and fill allBLOCKentries of block 0 with[null, 0], matchingwrite_tablefor an empty table.memory::tests::new_table_routes_all_lookups_to_null_before_first_rewrite, verifying both the initial table contents and aSOURCEcompute dispatch against an un-rewritten table with a non-zero buffer bound at slot 0.Testing
main(63bcca43) before the fix.cargo test -p victory-gpu --locked --lib memory::tests -- --skip lists_share_a_table_and_copies_keep_their_views(RTX 5090): 8 passed, 0 failed.VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --locked --features diagnostics(WARP): 247 passed, 0 failed, 1 ignored.cargo clippy --workspace --all-targets --locked -- -D warningsand--all-features: clean.cargo test -p xtask --locked policy::tests::repository_passes_policy: passed.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.