mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
Count only release_kept's own features in its line of those released once the GPU is past them.
The review of 9071dfc3 found that release_kept counted the features "released once the GPU is past their last frame" as every DLSS feature left in the list of what was let go of, capped at the call's count, on the claim that older entries had older fences and went first. That does not hold: an entry let go of earlier can have a later fence than this call's (a size evaluated in a later submission and then freed), so the line could credit an earlier let-go to this call. release_kept now keeps the handles of the features it lets go of and counts those still in the list after vk_upscaler_let_go: a feature goes into the list once and leaves it only through its release, and no feature is made in between, so such a handle is one of this call's. With upscaler_idle_wait = 1 that is 0 unless a feature was evaluated in the submission being recorded, which no wait can pass yet. Only the log line changes. Checks that passed: vk_dlaa.c compiles with -Wall -Wextra and no warning, upscaler_idle_check, tools/check_content.py --staged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2068,18 +2068,23 @@ static void stale_sizes(const struct Size *cur, const struct Size *host) {
|
||||
// has (retire_feat, vk_upscaler_let_go), after it. None of them is evaluated again: its size makes a new one.
|
||||
static void release_kept(const struct Size *making, int all) {
|
||||
int n = 0;
|
||||
NgxHandle *mine[DLSS_SIZES]; // this call's features, to tell them in dead from those let go of before
|
||||
for (int i = 0; i < DLSS_SIZES; i++) {
|
||||
struct Size *s = &D.sizes[i];
|
||||
if (s == making || !s->feat) continue;
|
||||
if (!all && (uint64_t)s->w * s->h <= (uint64_t)making->w * making->h) continue;
|
||||
mine[n] = s->feat;
|
||||
retire_feat(s, 0), n++;
|
||||
if (D.last == s) D.last = NULL;
|
||||
if (D.host == s) D.host = NULL;
|
||||
}
|
||||
if (!n) return;
|
||||
vk_upscaler_let_go();
|
||||
int left = upd_count(&dead, UPD_FEAT); // older ones have older fences and went first: those left are this call's
|
||||
if (left > n) left = n;
|
||||
// this call's features still in dead: the GPU is not past their last frame (a feature goes into dead once and
|
||||
// leaves it only through its release, and no feature is made in between, so a handle there is one of them)
|
||||
int left = 0;
|
||||
for (int i = 0; i < dead.n; i++)
|
||||
for (int j = 0; j < n; j++) left += dead.e[i].kind == UPD_FEAT && dead.e[i].handle == (void *)mine[j];
|
||||
char later[80] = "";
|
||||
if (left) snprintf(later, sizeof later, "; %d of them once the GPU is past their last frame", left);
|
||||
rt_log("dlaa: %d DLSS feature(s) released before the one for %ux%u is made (%s); made again when used%s", n,
|
||||
|
||||
Reference in New Issue
Block a user