Outgrown point-motion textures are kept until the context is destroyed

未關閉
#68 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
32/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
cpp

研究方向

Start in clean/runtime/interop/executor_d3d12.cpp at point_texture (around line 404), where the point-motion texture is reallocated and the old one is pushed to retired_, and at the destructor (around line 61), the only place it is released. Check how mpoint_w_ and the render rectangle feed the growth path, and how the parked executor in clean/fsr/src/frontend.h keeps retired_ alive. Done means either a single maximum-size allocation from create, or retired textures released once external_done() reaches their recorded value, verified by a WARP test per #62. Read #62 and #64 first, since the ordering assumption depends on them.

由索引模型根據 Issue 內容生成。

描述

area: runtime enhancement

What happens

point_texture (clean/runtime/interop/executor_d3d12.cpp:404) reallocates the point-motion texture when a frame needs a larger one. The old texture is pushed to retired_ (:406), because a recorded list may still use it. The only release is in the destructor (:61).

Growth is monotonic (w = max(w, mpoint_w_), :407), so allocation stops once the largest render rectangle has been seen. The total is bounded by the sum over the first upward sweep.

When it can happen

Only with motion_outres=point, which is not the default (original is, clean/runtime/interop/backend.cpp:174, clean/FORMATS.md:692), and only when the game sets WG_CREATE_MOTION_OUTPUT_RES. The parked executor (clean/fsr/src/frontend.h:156) can keep retired_ alive across context re-creation with the same parameters.

A typical case is a few textures. The worst case is dynamic resolution that rises in many small steps, where the retired textures add up to a noticeable amount of VRAM on a smaller card.

Found by reading the code. It has not been reproduced.

To do

  • Allocate mpoint_ once at the context's maximum render size taken from create. This removes retired_. The cost is one maximum-size texture, which the growth path reaches anyway.
  • Or record external_recorded() when a texture is retired and release it in record() once external_done() reaches that value. This relies on the ordering assumption in #64, which holds for a single context.

Test

WARP, using the executor seam described in #62. Feed frames with render widths 100, 101, 102, and so on, and assert that retired_ stays empty (maximum-size allocation) or drains after external_done() advances.

Related: #62, #64.

主要語言
C++
星號
12
分支
2
平均合併
3 小時 10 分鐘
30 天內合併 PR
171

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

phantoslayer21/wronggpu 的其他 Issue

查看 phantoslayer21/wronggpu 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。