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 摘要。