GPU: cap oversized sampler heaps at 2,048 with dynamic slots #2451
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!2451
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2451"
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?
@makmatvey on GitHub · 2026-11-25 13:48 UTC · original
makmatvey:cursor/gpu-sampler-heap-cap-afb6→main· +91 −13 · 2 files · 2 commits · openRebased onto current
mainUnchanged in content: this is the same patch, re-landed on
63bcca4. The oneconflict was not semantic —
mainand this branch each appended a test to theend of
mod testsindescriptor/host.rs; all three are kept.A test defect fixed on top
Reviewing this by the method the triage here applies — revert the fix, keep the
test, watch it fail —
large_sampler_heap_is_cappeddid not test the fix itexists to guard. It opened with:
newreturningNoneis the bug. On a host that refusesmake(4 * HEAP_SAMPLERS)— an RTX 3060 here — the tree without the cap takesthat "no host GPU" return and the test passes. Measured rather than read:
So the test was green before and after the change it was written to protect.
It now asks the host for the skip and then
expects the heap, so a missing cappanics here instead of passing quietly:
Negative control, on the rebased tree:
descriptor/host.rs:2501— "an oversized sampler heap is capped, not dropped"Verified on Windows 11, RTX 3060, Rust 1.98.1
cargo clippy -p victory-gpu --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test -p victory-gpu --lib --lockedcargo xtask policyThe two failures are pre-existing on
mainand unrelated to this change: thecapped-heap assertions
descriptor::host::tests::dynamic_slots_are_held_until_releasedand
memory::tests::lists_share_a_table_and_copies_keep_their_views(issue #3178).The count is 231 rather than the previous 229 because of the two new tests.
cargo fmt --checkreports diffs elsewhere in the tree (crates/victory-formats/src/texture.rsand others) on unmodified
main; the two files this PR touches are clean, andno unrelated reflow is included.
No game data used.
make(4 * HEAP_SAMPLERS)is refused on this host, which iswhat makes the first branch of
HostHeap::newreachable here.🤖 Generated with Claude Code
@kotekompotek on GitHub · 2026-11-25 14:23 UTC · original
Mechanics verified:
State::tablesalready routes any table whose end index is>= host.count()through the fresh-table path (dynamic(n)+make_at), so a capped sampler heap works exactly like a capped view heap — before this,dynamic()unconditionally returnedNonefor samplers and the draw was dropped. Keeping the cap unconditional (not only when creation fails) makes behavior host-independent, matching the comment. The warn-once when a table exceeds the dynamic pool is a good failure signal — a 256-slot dynamic budget is small, so a pathological title table pattern will show in the log rather than silently dropping draws.@Marvisak on GitHub · 2026-11-25 16:08 UTC · original
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-gpu/src/descriptor/host.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
f1b8dd8ca8tocb36a9a1f2@DenRakEiw on GitHub · 2026-11-25 13:55 UTC · original · approved these changes
Verified against
origin/main(940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:cargo test -p victory-gpu descriptor::host::tests -- --skip dynamic_slots_are_held_until_released: 6/6 passed on RTX 5090, 6/6 passed on WARP (includinglarge_sampler_heap_is_cappedandsmall_sampler_heap_has_no_dynamic_slots).cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.AI-assisted (Gemini 4 Neon).
@catminou4 on GitHub · 2026-11-25 14:11 UTC · original · reviewed
Cap oversized sampler heaps at 2,048 with dynamic slots. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Same heap-capping theme as #2461 — overlaps in descriptor/host.rs; whichever merges second conflicts.
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.