Descriptor: accept the console's unbounded sampler heap #1643
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1643
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1643"
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?
@Shad0wrend on GitHub · 2026-11-28 22:54 UTC · original
Shad0wrend:console/unbounded-sampler-heap→main· +33 −6 · 1 files · 1 commits · closed without mergingWhat
The GDK defines
D3D12XBOX_DESCRIPTOR_HEAP_TYPE_SAMPLER_UNBOUNDED(heap type 4): a shader-visible sampler heap with a limited set of border colours. The layer rejected it —increment(4)returned 0, soGetDescriptorHandleIncrementSizereturned 0 andCreateDescriptorHeapreturnedE_INVALIDARG— so sampler bindings that use a bindless/unbounded heap were lost.incrementnow gives type 4 the same 16-byte stride as an ordinary sampler heap.Heap::samplers()and both shader-visible checks treat type 4 as a sampler heap, so writes are mirrored into a host sampler heap and handles/indexing use the right stride.Validation
cargo test --release --locked -p victory -p victory-gpu -p victory-hle— green (29 + 2 + 551 + 199 + 1 tests, 0 failures). New testunbounded_sampler_heaps_use_the_sampler_stridechecks the stride, heap creation, sampler classification and handle arithmetic; all 13 descriptor tests pass.cargo clippy --release -p victory-gpu --all-targets --locked -- -D warningswith pre-existing upstream lints allowed — clean.cargo run --release --quiet -p xtask -- policy --staged— 1 file ok.No game paths, logs or binaries are included.
@babuakhil on GitHub · 2026-11-28 23:23 UTC · original
Checked on NVIDIA: Windows 11, RTX 3060, Rust 1.98.1 (pinned), applied on current
main(d4b5d51); cherry-picks cleanly. Clippy reports nothing indescriptor.rs(the crate's other 2 errors are onmainalready), all 13descriptor::testspass includingunbounded_sampler_heaps_use_the_sampler_stride, andcargo test -p victory-gpu --libpassed 551/551 in one run and had onewatch::testsfailure in the other, a test that fails now and then onmaintoo.The host heap is made from
samplers()asD3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, and every other heap-kind check (draw.rsincluded) goes throughsamplers(), so type 4 is covered everywhere.Before and after, from a throwaway test (not part of this PR) that creates shader-visible heaps and asks for the host heap on the RTX 3060:
mainincrement_size(4)createfails,E_INVALIDARGhandle(3)atstart + 48createfailsSo it fixes what it says. One thing to keep in mind, not caused by this PR: the host heap behind a large sampler heap fails here. On
main, an ordinary sampler heap (type 1) gets its host heap at 4000 samplers and not at 4095, 4096 or 65536; type 4 now hits the same limit, which comes from this driver. When that happensHostHeap::new_withlogsno host descriptor heapand the title's samplers in that heap aren't mirrored. Since an unbounded heap is presumably the kind a title makes large, it may be worth a louder message, or a note in the code, for when the console count goes over what the host allows.6bc28d465bto74f539b1e9@Shad0wrend on GitHub · 2026-11-29 01:39 UTC · original
Closing per maintainer request; not pursuing these changes.
Pull request closed