streamline: send the back buffer extent, not 0x0, when clearing frame generation tags #1335

Manually merged
github merged 1 commit from github-bot/gh-1335 into main 2026-11-29 08:21:14 +00:00 AGit
Owner

@⁠slyd3 on GitHub · 2026-11-28 17:35 UTC · original
slyd3:fix-streamline-zero-extent → main · +3 −2 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC

Summary

When no upscaling happened in a frame, present_begins clears the frame generation tags (depth, motion vectors, hudless colour, UI colour and alpha) by sending null resource tags to Streamline. These null tags carried an all-zero Extent. This PR gives them the back buffer size (Extent::sized(planes.size), the same size the other tags in that function use), so the clear call no longer passes a 0x0 extent.

Correction

The first version of this description said that this removes the Streamline warning

dlfgPresent.cpp:421[sanitizeResourceExtent] Invalid backbuffer resource extent ... (0 x 0)

That was wrong. It was my guess from reading the code, and I did not compare the order of the log lines. Thanks to @⁠cxy0072019-sketch for testing it properly.

What was tested

By @⁠cxy0072019-sketch (comment below), RTX 5070 Ti, driver 621.24, 1920x1080, DLSS Quality, 3x FG, same diagnostic binary with the old and the new extent:

  • The clear path sent 0x0 in the control and 1920x1080 with this patch, in both the hardware upscaler check and a pause/resume from the same story checkpoint.
  • All clears returned OK and FG resumed in both runs (178 of 180 presents with FG on, 534 frames shown, for both).
  • The sanitizeResourceExtent warning still appeared once in each run, on the first FG enable, before the first tag-clear call. The pause/resume did not emit it in either run on that driver.

My own logs (RTX 4070 SUPER, driver 621.24) show the same order in all four runs that have frame generation: first frame with depth and motion vectors tagged, then DLSS Frame Generation switched ... on=true, then the warning about 0.3 ms later. So the warning does not come from the clear path.

What this PR does and does not do

  • Does: the clear call sends a valid extent instead of 0x0. The resource is still null, so what is cleared does not change.
  • Does not: remove the warning at the first FG enable. Its cause is not known to me. The code sends no back buffer tag of its own, so it may come from Streamline's own handling of the swap chain proxy. I did not find it.
  • Not tested by me in game. cargo check -p victory-gpu passes.
  • Other Streamline warnings in the same logs (for example Couldn't lock the mutex on sync present) are separate from this change.

If you would rather not take a change that has no visible effect, please close this PR; I will not mind.

**@⁠slyd3** on GitHub · 2026-11-28 17:35 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1335) `slyd3:fix-streamline-zero-extent` → `main` · +3 −2 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC ## Summary When no upscaling happened in a frame, `present_begins` clears the frame generation tags (depth, motion vectors, hudless colour, UI colour and alpha) by sending null resource tags to Streamline. These null tags carried an all-zero `Extent`. This PR gives them the back buffer size (`Extent::sized(planes.size)`, the same size the other tags in that function use), so the clear call no longer passes a 0x0 extent. ## Correction The first version of this description said that this removes the Streamline warning ``` dlfgPresent.cpp:421[sanitizeResourceExtent] Invalid backbuffer resource extent ... (0 x 0) ``` **That was wrong.** It was my guess from reading the code, and I did not compare the order of the log lines. Thanks to @⁠cxy0072019-sketch for testing it properly. ## What was tested By @⁠cxy0072019-sketch (comment below), RTX 5070 Ti, driver 621.24, 1920x1080, DLSS Quality, 3x FG, same diagnostic binary with the old and the new extent: - The clear path sent 0x0 in the control and 1920x1080 with this patch, in both the hardware upscaler check and a pause/resume from the same story checkpoint. - All clears returned OK and FG resumed in both runs (178 of 180 presents with FG on, 534 frames shown, for both). - The `sanitizeResourceExtent` warning still appeared once in each run, on the first FG enable, **before** the first tag-clear call. The pause/resume did not emit it in either run on that driver. My own logs (RTX 4070 SUPER, driver 621.24) show the same order in all four runs that have frame generation: `first frame with depth and motion vectors tagged`, then `DLSS Frame Generation switched ... on=true`, then the warning about 0.3 ms later. So the warning does not come from the clear path. ## What this PR does and does not do - Does: the clear call sends a valid extent instead of 0x0. The resource is still null, so what is cleared does not change. - Does not: remove the warning at the first FG enable. Its cause is not known to me. The code sends no back buffer tag of its own, so it may come from Streamline's own handling of the swap chain proxy. I did not find it. - Not tested by me in game. `cargo check -p victory-gpu` passes. - Other Streamline warnings in the same logs (for example `Couldn't lock the mutex on sync present`) are separate from this change. If you would rather not take a change that has no visible effect, please close this PR; I will not mind.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 17:35:51 +00:00
Author
Owner

@⁠cxy0072019-sketch on GitHub · 2026-11-28 18:00 UTC · original

I tested c8b6d00 on an RTX 5070 Ti (621.24), at 1920×1080 with DLSS Quality and 3× FG. The same diagnostic binary used the old zero extent in one run and the new back-buffer extent in the other.

In both the hardware upscaler check and a pause/resume from the same story checkpoint, I verified that the clear path sent 0×0 in the control and 1920×1080 with the patch. All clears returned OK and FG resumed in both runs. The hardware probe reported 178 of 180 presents with FG on and 534 frames shown for both.

The warning from sanitizeResourceExtent still appeared once in each run, on the first FG enable, before the first tag-clear call. The instrumented pause and resume did not emit that warning in either arm on this driver.

**@⁠cxy0072019-sketch** on GitHub · 2026-11-28 18:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1335#issuecomment-7243450734) I tested c8b6d00 on an RTX 5070 Ti (621.24), at 1920×1080 with DLSS Quality and 3× FG. The same diagnostic binary used the old zero extent in one run and the new back-buffer extent in the other. In both the hardware upscaler check and a pause/resume from the same story checkpoint, I verified that the clear path sent 0×0 in the control and 1920×1080 with the patch. All clears returned OK and FG resumed in both runs. The hardware probe reported 178 of 180 presents with FG on and 534 frames shown for both. The warning from `sanitizeResourceExtent` still appeared once in each run, on the first FG enable, before the first tag-clear call. The instrumented pause and resume did not emit that warning in either arm on this driver.
github-bot changed title from streamline: give the cleared frame generation tags the back buffer ex… to streamline: send the back buffer extent, not 0x0, when clearing frame generation tags 2026-11-28 20:11:41 +00:00
Author
Owner

@⁠slyd3 on GitHub · 2026-11-28 20:08 UTC · original

Thank you for testing this so carefully, and for the control run with the same binary.

You are right, and my description was wrong. I had assumed the warning came from the tag-clear path, but I had not compared the order of the log lines. In my own logs (RTX 4070 SUPER, 621.24) the warning also comes about 0.3 ms after DLSS Frame Generation switched ... on=true, i.e. at the first FG enable, before any clear. So this change cannot remove it.

I have rewritten the title and the description of the PR: it now only claims what you verified (the clear call sends 1920x1080 instead of 0x0, all clears OK, FG resumes), and says plainly that the first-enable warning stays and that I do not know its cause yet.

**@⁠slyd3** on GitHub · 2026-11-28 20:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1335#issuecomment-7245065297) Thank you for testing this so carefully, and for the control run with the same binary. You are right, and my description was wrong. I had assumed the warning came from the tag-clear path, but I had not compared the order of the log lines. In my own logs (RTX 4070 SUPER, 621.24) the warning also comes about 0.3 ms after `DLSS Frame Generation switched ... on=true`, i.e. at the first FG enable, before any clear. So this change cannot remove it. I have rewritten the title and the description of the PR: it now only claims what you verified (the clear call sends 1920x1080 instead of 0x0, all clears OK, FG resumes), and says plainly that the first-enable warning stays and that I do not know its cause yet.
github manually merged commit 6835a678e3 into main 2026-11-29 08:21:14 +00:00
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/trustno1-coder--VIctory-NVIDIA!1335
No description provided.