Slot retries: 1.6k slots left null per window, 113 rewritten at retry #122

Open
opened 2026-12-01 16:38:21 +00:00 by github-bot · 5 comments
Owner

@⁠TheRifai on GitHub · 2026-12-01 16:36 UTC · original

Finding (rules 12, 14, 29)

vkback's slot retry path carries a measurable amount of work per window: in a house-save camera walk, vk.log reports 1,634 slot left null for a cause that can pass (written again later) and 113 slot written at a retry (what it lacked is there now) in one stats window, plus 6 slot of a superseded placed texture read with its old words at the index slots.

Seen on: main cab86d1, house save, scripted camera walk (VICTORY_KEYS W/I/K/J/L/O/P/Enter), 180 s, GE-Proton11-16 / RX 9070 XT. Run: /tmp/opencode/capture/explore/walk/runs/20261201-173035.

This is related to issue #44 and the index-slot work (PR #116 took ~0.7 ms/frame off slot_reads), but it is a different population: slots that are deliberately left null and retried. Each retry re-enters the descriptor write path, so the title-side cost is not just the first resolution. No new rule-32 error; these are counted informationals.

Next

Count which cause keeps the slot null (image not made yet, image refused for VRAM, placed texture superseded, hold_new waiting for earlier GPU work) and rank by retry count and GPU ms. A fix should reduce retries without uncaching slots whose bytes genuinely change (those are issue #57's one-array work). Evidence: A/B of renderer slot_reads ms and retry counts.

**@⁠TheRifai** on GitHub · 2026-12-01 16:36 UTC · [original](https://github.com/vktory6/VKtory/issues/122) ## Finding (rules 12, 14, 29) `vkback`'s slot retry path carries a measurable amount of work per window: in a house-save camera walk, `vk.log` reports **1,634** `slot left null for a cause that can pass (written again later)` and **113** `slot written at a retry (what it lacked is there now)` in one stats window, plus **6** `slot of a superseded placed texture read with its old words at the index slots`. Seen on: main `cab86d1`, house save, scripted camera walk (`VICTORY_KEYS` W/I/K/J/L/O/P/Enter), 180 s, GE-Proton11-16 / RX 9070 XT. Run: `/tmp/opencode/capture/explore/walk/runs/20261201-173035`. This is related to issue #44 and the index-slot work (PR #116 took ~0.7 ms/frame off `slot_reads`), but it is a different population: slots that are deliberately left null and retried. Each retry re-enters the descriptor write path, so the title-side cost is not just the first resolution. No new rule-32 error; these are counted informationals. ## Next Count *which* cause keeps the slot null (image not made yet, image refused for VRAM, placed texture superseded, hold_new waiting for earlier GPU work) and rank by retry count and GPU ms. A fix should reduce retries without uncaching slots whose bytes genuinely change (those are issue #57's one-array work). Evidence: A/B of renderer `slot_reads` ms and retry counts.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 16:38:21 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 16:44 UTC · original

Thanks for looking. I checked this against the code and I'm closing it, because there's nothing to fix here yet:

  • By design: these retries are deliberate. hold_new mirrors victory-gpu's show_new_later (an image made while earlier batches may still run shows only once they ran), and the other causes are written again when what they lacked arrives. Each cause has its own counted note.
  • Small numbers: some of the numbers you read as "per window" are run totals. Kinds in the issues quiet this window list print the total since the start, and "quiet" means nothing new in that window. Even at 1.6k a window, that's next to ~2.8 million descriptor writes a window, so retries aren't where slot_reads time goes.

If a profile shows retries costing measurable renderer time (e.g. the be: write_view share for retried slots), please reopen with that number.

**@⁠vktory6** on GitHub · 2026-12-01 16:44 UTC · [original](https://github.com/vktory6/VKtory/issues/122#issuecomment-7318141213) Thanks for looking. I checked this against the code and I'm closing it, because there's nothing to fix here yet: - **By design:** these retries are deliberate. `hold_new` mirrors victory-gpu's `show_new_later` (an image made while earlier batches may still run shows only once they ran), and the other causes are written again when what they lacked arrives. Each cause has its own counted note. - **Small numbers:** some of the numbers you read as "per window" are run totals. Kinds in the `issues quiet this window` list print the total since the start, and "quiet" means nothing new in that window. Even at 1.6k a window, that's next to ~2.8 million descriptor writes a window, so retries aren't where `slot_reads` time goes. If a profile shows retries costing measurable renderer time (e.g. the `be: write_view` share for retried slots), please reopen with that number.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 16:47 UTC · original

Reopening: I was wrong to close this as "by design". The retries are deliberate, but each one leaves a slot null for one or more frames where the console shows the resource, so they're known-incorrect behaviour like any other gap. Sorry, and thanks for raising it.

  • I created a task based on your report: github.com/vktory6/VKtory@3465541. It extends "Newly made images show empty for a frame" (which already covers hold_new) to the other Exit::Retry causes: a buffer view of a buffer whose creation vkback hasn't seen yet, a placed image or sampler whose creation failed, and a copy let go because its source went. Your proposed next step, counting by cause first, is the right start; the note doesn't say which cause it was.
  • The rules now say this explicitly: github.com/vktory6/VKtory@55eed9c (docs/AGENTS.md: "Deliberate is not correct").
**@⁠vktory6** on GitHub · 2026-12-01 16:47 UTC · [original](https://github.com/vktory6/VKtory/issues/122#issuecomment-7318225855) Reopening: I was wrong to close this as "by design". The retries are deliberate, but each one leaves a slot null for one or more frames where the console shows the resource, so they're known-incorrect behaviour like any other gap. Sorry, and thanks for raising it. - I created a task based on your report: https://github.com/vktory6/VKtory/commit/3465541. It extends "Newly made images show empty for a frame" (which already covers `hold_new`) to the other `Exit::Retry` causes: a buffer view of a buffer whose creation vkback hasn't seen yet, a placed image or sampler whose creation failed, and a copy let go because its source went. Your proposed next step, counting by cause first, is the right start; the note doesn't say which cause it was. - The rules now say this explicitly: https://github.com/vktory6/VKtory/commit/55eed9c (`docs/AGENTS.md`: "Deliberate is not correct").
Author
Owner

@⁠firefloc on GitHub · 2026-12-01 20:29 UTC · original

One rendering symptom to correlate with the retry diagnostics. On RX 7900 XTX / RADV, GE-Proton 11-14, Series X mode, local build f0929d9 (VKtory base 5930321 with a local Wine guard patch) and BCPack tables loaded, part of a character's upper-body outfit was invisible after about 30 minutes of outdoor gameplay. The background showed through while the head, trousers, bag and strap still rendered. Two F9 marks at presents 43324 and 43418, 4.4 seconds apart, show the same symptom from different angles.

The aggregate show_new_later count was increasing around both marks. The counters for newly null retry slots and slots written on retry recorded no new events in those windows. A slot could already have been null. We haven't associated a descriptor or draw with the missing outfit, so the link to any specific retry path remains open.

**@⁠firefloc** on GitHub · 2026-12-01 20:29 UTC · [original](https://github.com/vktory6/VKtory/issues/122#issuecomment-7324761193) One rendering symptom to correlate with the retry diagnostics. On RX 7900 XTX / RADV, GE-Proton 11-14, Series X mode, local build `f0929d9` (VKtory base `5930321` with a local Wine guard patch) and BCPack tables loaded, part of a character's upper-body outfit was invisible after about 30 minutes of outdoor gameplay. The background showed through while the head, trousers, bag and strap still rendered. Two F9 marks at presents 43324 and 43418, 4.4 seconds apart, show the same symptom from different angles. The aggregate `show_new_later` count was increasing around both marks. The counters for newly null retry slots and slots written on retry recorded no new events in those windows. A slot could already have been null. We haven't associated a descriptor or draw with the missing outfit, so the link to any specific retry path remains open.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 20:32 UTC · original

Thanks, this matches a symptom we saw ourselves today: a character's clothing missing in a cutscene while head, arms and legs render, and staying missing. I added your observation to the TASKS item "A character's clothing does not render in a cutscene": github.com/vktory6/VKtory@ab7b4e6

Your counters already narrow it: no new retry nulls and no new no-address creations around the marks, but show_new_later and "partly unmapped" rising. Next is tying the missing outfit to its draw and the images it samples. We have a draw-logging tool on a branch for the flicker work that can do that, and it may become the way to check this too.

**@⁠vktory6** on GitHub · 2026-12-01 20:32 UTC · [original](https://github.com/vktory6/VKtory/issues/122#issuecomment-7324862886) Thanks, this matches a symptom we saw ourselves today: a character's clothing missing in a cutscene while head, arms and legs render, and staying missing. I added your observation to the TASKS item "A character's clothing does not render in a cutscene": https://github.com/vktory6/VKtory/commit/ab7b4e6 Your counters already narrow it: no new retry nulls and no new no-address creations around the marks, but `show_new_later` and "partly unmapped" rising. Next is tying the missing outfit to its draw and the images it samples. We have a draw-logging tool on a branch for the flicker work that can do that, and it may become the way to check this too.
Author
Owner

@⁠firefloc on GitHub · 2026-12-02 17:41 UTC · original

I recovered two settings for the original marks: BCPack tables were configured and the build carried the Wine stack guard fix, with VICTORY_VIEW_GUARD=0 for alias tracking. F9 captured the displayed image only. For a fresh reproduction I would take the same scene with the tables loaded and alias tracking enabled, before attributing the symptom to retries or incomplete mapping.

At 9388397, the detailed VKB_TLCAP records cover target-less draws, and slot_read_at_index bypasses the normal slot-read hook. A local diagnostic prototype adds that hook and a bounded draw filter, and labels Execute-wide slot reads separately from operation-local ones. Four CPU tests passed, including keeping slot, resource, image, and null reason distinct. This is diagnostic plumbing. A matched capture with the outfit visible and missing is still needed. If the draw is absent, compare the draw or indirect submission first. If it is present, follow the descriptors actually sampled to the image and its fill state at the first consumer.

**@⁠firefloc** on GitHub · 2026-12-02 17:41 UTC · [original](https://github.com/vktory6/VKtory/issues/122#issuecomment-7353551946) I recovered two settings for the original marks: BCPack tables were configured and the build carried the Wine stack guard fix, with `VICTORY_VIEW_GUARD=0` for alias tracking. F9 captured the displayed image only. For a fresh reproduction I would take the same scene with the tables loaded and alias tracking enabled, before attributing the symptom to retries or incomplete mapping. At `9388397`, the detailed `VKB_TLCAP` records cover target-less draws, and `slot_read_at_index` bypasses the normal slot-read hook. A local diagnostic prototype adds that hook and a bounded draw filter, and labels Execute-wide slot reads separately from operation-local ones. Four CPU tests passed, including keeping slot, resource, image, and null reason distinct. This is diagnostic plumbing. A matched capture with the outfit visible and missing is still needed. If the draw is absent, compare the draw or indirect submission first. If it is present, follow the descriptors actually sampled to the image and its fill state at the first consumer.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/vktory6--VKtory#122
No description provided.