Descriptor: accept the console's unbounded sampler heap #1643
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Shad0wrend on 2026-11-28T22:54:42Z.
What
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.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by babuakhil on 2026-11-28T23:23:03Z.
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.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Shad0wrend on 2026-11-29T01:39:43Z.
Closing per maintainer request; not pursuing these changes.
Pull request closed