GPU: cap oversized sampler heaps #1032

Open
github-bot wants to merge 2 commits from github-bot/gh-1032 into main AGit
Owner

@⁠divyeshganta on GitHub · 2026-11-24 15:14 UTC · original
divyeshganta:fix/sampler-heap-limit → main · +15 −3 · 1 files · 2 commits · open

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

**@⁠divyeshganta** on GitHub · 2026-11-24 15:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/1032) `divyeshganta:fix/sampler-heap-limit` → `main` · +15 −3 · 1 files · 2 commits · open Caps oversized host sampler heaps at D3D12’s 2,048 descriptor limit and logs when higher slots are unavailable. Addresses #65.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:17:42 +00:00
Author
Owner

@⁠ThomasHFWright on GitHub · 2026-11-24 15:23 UTC · original

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.

**@⁠ThomasHFWright** on GitHub · 2026-11-24 15:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1032#issuecomment-7135952581) 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.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 16:30 UTC · original

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).

**@⁠Zipettte** on GitHub · 2026-11-24 16:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/1032#issuecomment-7137774998) 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)._
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:34 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 00:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/1032#issuecomment-7148645106) <!-- victory-triage v1 head=b38a3c9fa1a60647bcf152c6e6464be4137519c1 verdict=needs-rebase at=2026-11-25T00:13:20Z --> 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](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/descriptor/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1032/head:github-bot/gh-1032'
git switch 'github-bot/gh-1032'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1032'
git switch 'github-bot/gh-1032'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1032'
git switch 'github-bot/gh-1032'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1032'
git switch 'main'
git merge --squash 'github-bot/gh-1032'
git switch 'main'
git merge --ff-only 'github-bot/gh-1032'
git switch 'main'
git merge 'github-bot/gh-1032'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1032
No description provided.