GPU: size a capped view heap to the host's limit #1522
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1523"
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 Marvisak/VIctory. Originally posted by cyudev on 2026-11-24T18:45:11Z.
GPU: size a capped view heap to the host's limit
When the title's shader-visible CBV/SRV/UAV heap does not fit,
HostHeap::newcapped it at the portable 1,000,000 without asking the host. It now binary-searches the largest heap the host takes, between 1,000,000 and the title's size plus the dynamic slots. The warning names that limit and how many title slots are left out:Grand Theft Auto VI asks for 1,245,184 slots. Two NVIDIA drivers take exactly 1,000,000:
So on NVIDIA the search finds no more room, and the change there is the clearer warning. Hosts above the portable limit (resource binding tier 3) now get all the room they have.
title slot past the host heapdid not fire up to the first world scene on the 3060 Ti.Scope change
This PR first also widened packed 16-bit render targets (B4G4R4A4, B5G5R5A1) that NVIDIA cannot render to or store to. #89, open since earlier, does the same and converts copies instead of skipping them. In three runs of the title on the 3060 Ti with a tree that has #89, both 2560x1440 targets were created (no
no host texture). That part is dropped here in favour of #89.Testing
cargo clippy -p victory-gpu --all-targets --all-features -- -D warnings: clean.cargo test -p victory-gpu: 50 passed.🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T18:57:07Z.
Review: APPROVED
Verified locally merged onto
origin/main(Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):cargo test -p victory-gpu— 50 passed, 0 failed (1 ignored) on both RTX 5090 hardware andVICTORY_D3D12_WARP=1(includingwidened_copy_skipped)cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— okClean NVIDIA host compatibility: binary-search sizing of the view descriptor heap to the host's actual limit and widening of unsupported 16-bit render target formats. Looks good.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by wwwwwwww3333333 on 2026-11-24T19:17:12Z.
AMD check for an NVIDIA-targeted change: RX 6750 XT (RDNA2, gfx1031), AMD driver 32.0.21045.29003, i5-13400F, Windows 11, Rust 1.98.1 MSVC. Head
946edfeon mainffe310e(clean merge).cargo test -p victory-gpu --lib -- --test-threads=1: 50 passed, 0 failed, 1 ignored, the same as main alone. The description lists AMD as untested; nothing in the GPU unit tests changes on an AMD host with this PR. This doesn't cover the title itself.Synthetic tests only, no game files. AI-assisted (Claude picked the PRs and wrote the batch script; I ran it on my machine).
[PR #1523] GPU: NVIDIA hosts – widen unsupported 16-bit targets, size the view heap to the host's limitto [PR #1523] GPU: size a capped view heap to the host's limitImported from Marvisak/VIctory. Originally posted by Bullet18x on 2026-11-24T20:07:42Z.
RTX 5090 (driver 621.40, Windows 11 10.0.28000), head
946edfeonffe310e, diag build: the search reportshost view heap capped ... count=1245184 host_limit=1000000 left_out=310720, so this driver takes exactly the portable limit and no more. The world is reached; the run still ends inDXGI_ERROR_DEVICE_HUNG~30 s in (as onmain). I did not check the 16-bit target change separately. Details of the other experiments: #1586.AI use: Claude Code (Claude Opus 5.5) built, ran and summarised; I checked it.
Imported from Marvisak/VIctory. Originally posted by cyudev on 2026-11-24T20:45:20Z.
Thanks for the runs (RTX 5090, RX 6750 XT). I've narrowed this PR to the view-heap sizing. #89 already handles packed 16-bit targets, and does more: it converts copies where this PR skipped them. In three title runs on my RTX 3060 Ti with a tree that has #89, both targets were created. The earlier approval was for the bigger change; the diff is now the heap search alone (
descriptor/host.rs).A correction to the first review: no test named
widened_copy_skippedexists. That was a helper function in the removed 16-bit part, not a test.Imported from Marvisak/VIctory. Originally posted by adnanoos on 2026-11-24T21:02:30Z.
RTX 5060 Laptop GPU (Blackwell, driver 32.0.16.2124, Windows 11 Pro 26200): the search finds nothing above the portable limit here:
host view heap capped ... count=1245184 host_limit=1000000 left_out=376256. So on this GPU the heap is the same as before (and as the debug layer says, ID 645: "the limit for shader visible view heaps is 1000000").Tested on #1520 (
2190efe) + #452 + #1010; this PR (385dad2) merges with one conflict inHostHeap::new, where #1520 also reservesaliasesslots: the search's upper bound and the title count need- aliasesthere too.Imported from Marvisak/VIctory. Originally posted by cyudev on 2026-11-24T21:33:52Z.
Closing this. Three NVIDIA GPUs (RTX 3060 Ti, RTX 5090, RTX 5060 Laptop, drivers 621.24-621.40) all stop at exactly 1,000,000. The debug layer's ID 645 says why: the D3D12 runtime itself caps shader-visible view heaps at 1,000,000 there. On AMD the title's whole heap already fits on the first try. The binary search can never find more room, so all that's left is a clearer log line, which isn't worth a PR.
What this PR did establish: on NVIDIA the cap is the runtime's 1,000,000, not a driver quirk, so the title's 1,245,184 slots leave 310,720 (or more with extra reserved slots) out. Reaching them needs remapping, not a bigger heap. The packed 16-bit part is covered by #89.
Thanks @DenRakEiw, @wwwwwwww3333333, @Bullet18x and @adnanoos for the runs.
Pull request closed