Fix command-list upload crashes and document SM86 0.4.1 setup #295

Closed
github-bot wants to merge 0 commits from github-bot/gh-295 into main AGit
Owner

@⁠Sladewww on GitHub · 2026-12-01 10:52 UTC · original
Sladewww:fix/sm86-041-frame-generation → main · +96 −17 · 5 files · 1 commits · closed without merging

Background

DLSSG for SM86 is a third-party compatibility mod that enables DLSS Frame
Generation on older NVIDIA GPUs, including RTX 30-series cards such as the
RTX 3080 Ti. FoxHound already integrates DLSS Frame Generation through NVIDIA
Streamline. With SM86 0.4.1 installed separately, that existing integration
was able to produce 2× frame generation on an RTX 3080 Ti using Streamline
2.14.16.

Testing this setup exposed a FoxHound upload allocation crash that also
reproduced with frame generation disabled. This PR fixes the underlying
allocation issue and documents the optional SM86 setup. The mod remains a
separate install, and 4× gameplay still needs verification.

Problem

FoxHound could run out of contiguous virtual address space for command-list
uploads. When the allocator returned null, the game's BVH builder could crash.
This was reproduced at 4K with DLSS Balanced on an RTX 3080 Ti, with frame
generation both enabled and disabled.

Changes

  • Retry failed upload arena reservations with smaller allocations, down to the
    size needed for the request.
  • Extend the shader address directory and the corresponding host allocation
    range from 128 GiB to 256 GiB.
  • Document the optional DLSSG for SM86 0.4.1 setup and how to request and verify
    frame generation multipliers.

Verification

  • Two upload allocation regression tests passed. The shader library suite
    reported 205 passed and 2 ignored.
  • A Windows x64 build containing these fixes got past the original crash point
    on the affected RTX 3080 Ti.
  • Logs confirmed 2× frame generation with SM86 0.4.1 and Streamline 2.14.16.
    Gameplay at 4× still needs verification.
**@⁠Sladewww** on GitHub · 2026-12-01 10:52 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/295) `Sladewww:fix/sm86-041-frame-generation` → `main` · +96 −17 · 5 files · 1 commits · closed without merging ## Background DLSSG for SM86 is a third-party compatibility mod that enables DLSS Frame Generation on older NVIDIA GPUs, including RTX 30-series cards such as the RTX 3080 Ti. FoxHound already integrates DLSS Frame Generation through NVIDIA Streamline. With SM86 0.4.1 installed separately, that existing integration was able to produce 2× frame generation on an RTX 3080 Ti using Streamline 2.14.16. Testing this setup exposed a FoxHound upload allocation crash that also reproduced with frame generation disabled. This PR fixes the underlying allocation issue and documents the optional SM86 setup. The mod remains a separate install, and 4× gameplay still needs verification. ## Problem FoxHound could run out of contiguous virtual address space for command-list uploads. When the allocator returned null, the game's BVH builder could crash. This was reproduced at 4K with DLSS Balanced on an RTX 3080 Ti, with frame generation both enabled and disabled. ## Changes - Retry failed upload arena reservations with smaller allocations, down to the size needed for the request. - Extend the shader address directory and the corresponding host allocation range from 128 GiB to 256 GiB. - Document the optional DLSSG for SM86 0.4.1 setup and how to request and verify frame generation multipliers. ## Verification - Two upload allocation regression tests passed. The shader library suite reported 205 passed and 2 ignored. - A Windows x64 build containing these fixes got past the original crash point on the affected RTX 3080 Ti. - Logs confirmed 2× frame generation with SM86 0.4.1 and Streamline 2.14.16. Gameplay at 4× still needs verification.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 10:54:26 +00:00
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-12-01 12:08 UTC · original

Thanks, the diagnosis is right: when the window below 2^37 had no room for a list-upload arena, the allocator returned null and the title stopped.

Where this stands against the batch for the next release: #189, which is on that batch, changes the same file and removes the null from the other side. It reserves 32 pieces of 64 MiB at the top of the window first thing in a run, before anything else can fill it, and when no room is found an upload now comes from the process heap with a warning instead of returning null. So the crash you hit should be gone in the next release without this change, and this pull request no longer merges (both rewrite upload.rs).

What is still worth having from it, on top of #189:

  1. The retry with smaller arenas. With #189 a request that finds no 4 MiB gap falls back to the heap, where shaders that read by address see zeros (it only matters with the ray-tracing builder on). Taking a smaller gap first keeps those uploads readable. This is small and safe; a rebase of just this part over the next release would be welcome, and I can port it with you as author if you prefer.
  2. The window raised to 256 GiB. This is the larger step: MEMORY_PAGES is a translator constant, so every shader is translated again, and the address directory doubles. It belongs with the ray-tracing work and needs a before/after of the PC's memory and of the count of shaders that translate. Please keep it as its own pull request.

The SM86 notes in docs/dlss.md are fine as documentation of an optional third-party setup; they can come with either part.

**@⁠readmet3xt-lab** on GitHub · 2026-12-01 12:08 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/295#issuecomment-7310703688) Thanks, the diagnosis is right: when the window below 2^37 had no room for a list-upload arena, the allocator returned null and the title stopped. Where this stands against the batch for the next release: #189, which is on that batch, changes the same file and removes the null from the other side. It reserves 32 pieces of 64 MiB at the top of the window first thing in a run, before anything else can fill it, and when no room is found an upload now comes from the process heap with a warning instead of returning null. So the crash you hit should be gone in the next release without this change, and this pull request no longer merges (both rewrite `upload.rs`). What is still worth having from it, on top of #189: 1. **The retry with smaller arenas.** With #189 a request that finds no 4 MiB gap falls back to the heap, where shaders that read by address see zeros (it only matters with the ray-tracing builder on). Taking a smaller gap first keeps those uploads readable. This is small and safe; a rebase of just this part over the next release would be welcome, and I can port it with you as author if you prefer. 2. **The window raised to 256 GiB.** This is the larger step: `MEMORY_PAGES` is a translator constant, so every shader is translated again, and the address directory doubles. It belongs with the ray-tracing work and needs a before/after of the PC's memory and of the count of shaders that translate. Please keep it as its own pull request. The SM86 notes in `docs/dlss.md` are fine as documentation of an optional third-party setup; they can come with either part.
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-12-01 12:20 UTC · original

A correction to my note above, after reading #189's code more closely: part 1 (the retry with smaller arenas) is not as simple over #189 as I wrote.

After #189, upload::reserve makes no search of the window for one second after a search failed. That rule is there on purpose: a search of a full window takes long in the kernel, and without it thousands of searches a frame gave 30-second frames and the title's watchdog. A retry loop that calls reserve again with a smaller size right after a failure is therefore refused by that rule, and one that goes around it brings the long searches back.

A shape that would fit: when the search for a whole 4 MiB arena fails, make exactly one more search in the same call, for just the blocks the request needs, before the failure is noted; so at most two searches a second where there is one now. If you rebase part 1, please build it that way, with a test that counts the searches made across repeated failing requests. I will not port it myself for now; with the heap fallback in place nothing crashes, and it only matters with the ray-tracing builder on.

**@⁠readmet3xt-lab** on GitHub · 2026-12-01 12:20 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/295#issuecomment-7310989875) A correction to my note above, after reading #189's code more closely: part 1 (the retry with smaller arenas) is not as simple over #189 as I wrote. After #189, `upload::reserve` makes no search of the window for one second after a search failed. That rule is there on purpose: a search of a full window takes long in the kernel, and without it thousands of searches a frame gave 30-second frames and the title's watchdog. A retry loop that calls `reserve` again with a smaller size right after a failure is therefore refused by that rule, and one that goes around it brings the long searches back. A shape that would fit: when the search for a whole 4 MiB arena fails, make exactly one more search in the same call, for just the blocks the request needs, before the failure is noted; so at most two searches a second where there is one now. If you rebase part 1, please build it that way, with a test that counts the searches made across repeated failing requests. I will not port it myself for now; with the heap fallback in place nothing crashes, and it only matters with the ray-tracing builder on.
github-bot closed this pull request 2026-12-01 17:36:38 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.