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

Merged
slyd3 merged 1 commit from upstream-pr/1335 into main 2026-11-29 08:16:56 +00:00
slyd3 commented 2026-11-28 17:35:00 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by slyd3 on 2026-11-28T17:35:00Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5542865360 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1335). Originally posted by [slyd3](https://github.com/slyd3) on 2026-11-28T17:35:00Z. --- ## 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.
cxy0072019-sketch commented 2026-11-28 18:00:04 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cxy0072019-sketch on 2026-11-28T18:00:04Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7243450734 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1335#issuecomment-7243450734). Originally posted by [cxy0072019-sketch](https://github.com/cxy0072019-sketch) on 2026-11-28T18:00:04Z. --- 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.
slyd3 commented 2026-11-28 20:08:29 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by slyd3 on 2026-11-28T20:08:29Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7245065297 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1335#issuecomment-7245065297). Originally posted by [slyd3](https://github.com/slyd3) on 2026-11-28T20:08:29Z. --- 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.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!1335
No description provided.