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

オープン
#68 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
171

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

phantoslayer21/wronggpu のほかの issue

phantoslayer21/wronggpu の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。