Skip to content

GPU: cap oversized sampler heaps - #1032

Open
divyeshganta wants to merge 2 commits into
Marvisak:mainfrom
divyeshganta:fix/sampler-heap-limit
Open

divyeshganta wants to merge 2 commits into
Marvisak:mainfrom
divyeshganta:fix/sampler-heap-limit

Conversation

@divyeshganta

Copy link
Copy Markdown
Contributor

Caps oversized host sampler heaps at D3D12’s 2,048 descriptor limit and logs when higher slots are unavailable. Addresses #65.

@ThomasHFWright

Copy link
Copy Markdown

Independent Wine/hardware validation of 392b86f50af9fd20ab899985cff39811ee3360c2, base ffe310e. This reproduces the oversized sampler-heap failure and confirms that the cap avoids it on this setup.

A temporary test inside descriptor::host::tests required the hardware device, created sampler heaps with the following requested counts, and checked GetDesc().NumDescriptors, the tracked count, made/kept lengths, zero dynamic slots, and no device removal:

Requested Created / tracked
1 1
2,048 2,048
2,049 2,048
65,536 2,048

All checks passed. Negative control: retaining the test but replacing count.min(PORTABLE_SAMPLERS) with count makes HostHeap::new(true, 2049) return None, failing after the first two cases. The test/control edits were removed before the full suite.

Full workspace unit/integration suite, all features, all 14 generated Windows MSVC test executables: 341 passed, 5 failed, 6 ignored, identical to the matched ffe310e baseline. The five failures remain the empty pipeline library (#347), missing Wine Winsock export (#217), shader-checksum rejection expectation, nested Cargo fixture build, and Windows xtask attempting to launch host Git. Native Linux xtask separately passes all 4 tests. Windows-target workspace Clippy with all targets/features and -D warnings, and native cargo xtask policy, pass.

Environment: Rust 1.98.1, Wine 11.22, RTX 5090 / NVIDIA 620.73.04, vkd3d-proton 30b0eb9bc12dc9f, native d3dcompiler_47 for GPU fixtures; same runtime DLLs as baseline. Offline, offscreen, no game data. This establishes heap-creation behavior only: it does not establish correct rendering for titles using sampler slots above 2,047, which remain unavailable. No gameplay, native Windows/WARP, or Wine doctests were run. Aggregate counts include existing early-return tests when optional console compilers or the DXIL validator are unavailable.

AI-assisted testing with Codex.

nazmi pushed a commit to nazmi/VIctory that referenced this pull request Nov 24, 2026
Applied as the net diff of upstream PR Marvisak#1032 (head b38a3c9), 2 commits: b38a3c9,392b86f5.
@Zipettte

Copy link
Copy Markdown

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at b38a3c9: cargo test -p victory-gpu passes, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-gpu/src/descriptor/host.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

nazmi added a commit to nazmi/VIctory that referenced this pull request Nov 25, 2026
Marvisak#1324, Marvisak#1432 and Marvisak#1032 landed with their evidence; Marvisak#1436 is closed upstream.
The two accepted ztrx ports were re-verified as working (wait-budget tests and
the launcher parse), and a declaration sweep shows 575 ztrx-only symbols, which
is why the remaining features stay held rather than cherry-picked.
Xeltax added a commit to Xeltax/VIcky that referenced this pull request Nov 25, 2026
…w fork main 465b94f, RT33–RT35

Conflict in memory.rs `run_in` (doc and the notes field): kept fx-rt-next's
side, which already reads the notes handle as changed by VICTORY_NOTES_ON_CARD.
VICKY-RT.md: the new base, fork PR Marvisak#1032 (UwUCammie) listed, the recommended
switches on this base, and RT33–RT35.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A4bpLmErkufJL3LGgfR561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants