fix(gpu): keep placed alias views out of texture pool #550

Closed
opened 2026-12-05 02:47:00 +00:00 by github-bot · 3 comments
Owner

@⁠chefulano on GitHub · 2026-12-05 02:46 UTC · original

Problem

Placed texture views that alias a GPU render target or UAV (alias_of(this).is_some()) have fills(&desc) == true, so hosted_for() could sub-allocate them from the CPU-filled texture pool, mark host.filled = true (making idle sweeps evict them as CPU-uploadable textures), or take CPU upload shortcuts (compare_source / ahead::take) in the bindless slot refresh path instead of running readable() / texture::alias(). On constrained 8 GiB VRAM / 16 GiB RAM AMD RDNA 3 (RX 7600M XT 8 GiB) setups where pool eviction and VICTORY_POOL_MOVE run aggressively, GPU-copied alias contents could be lost or skipped (causing ghosting or black sky/reflections).

Change

  • Keep alias views out of the texture pool and idle eviction: hosted_for() passes allow_pool = !is_alias to host_texture_in() and sets host.filled = can_pool_or_evict_as_title_filled(fills(&r.desc), is_alias) (also removing the now-unused host_texture / host_texture_as wrappers).
  • Handle view-first creation order in copy_target(): Before calling want_level(this, 0), if a placed alias copy target already holds a pooled, title-filled, or partial-mip (base > 0) copy (copy_target_needs_detach()), reset wanted = 0, unstage it, remove it from sweep_members(), retire the old Made onto REPLACED, allocate a full-mip private non-pooled copy, and queue descriptor rebuilding via descriptor::queue_texture_replaced() (drained in descriptor::make_waiting() right before submission with zero slot locks held; REPLACED keeps the retired copy alive for any in-flight lists). Non-alias callers follow main's exact path.
  • Route bindless alias slots through readable(): draw.rs adds plan_bindless_slot() so placed aliases in the bindless pass run readable() (scheduling texture::alias() and shader-resource transitions) while skipping CPU compare_source() and async ahead::take().
  • Mark alias copy destinations GPU-written: texture::alias() acquires the destination via resource::copy_target(placed) and calls list.note_gpu_written(placed, None) on both direct-copy and buffer-mediated paths.

Measured impact

Pure correctness fix; non-alias textures follow main's exact path. Observed fixing missing alias contents on an earlier combined build running on an 8 GiB VRAM / 16 GiB RAM AMD RDNA 3 (RX 7600M XT 8 GiB) Linux host under RADV + vkd3d-proton; end-to-end GPU rendering was not re-run standalone on b581f7e.

Verification

  • Checked on main (b581f7e). Recommended to merge ahead of the companion castable-alias and sweep/residency PRs, which touch adjacent lines in resource.rs and texture.rs.
  • cargo xtask policy: 359 files ok; cargo test -p xtask -- policy::tests: 7 passed, 0 failed.
  • cargo check --locked --target x86_64-pc-windows-msvc -p victory-gpu -p victory --tests: 0 errors, 0 new warnings (only baseline room_lately).
  • Isolated CPU Wine parallel unit tests (5 passed, 0 failed): draw::tests:: (including new bindless_alias_routes_through_readable_and_skips_cpu_upload), resource::tests::alias_views_are_not_pooled_or_evicted_as_title_filled (covering pooled, title-filled, and base > 0 partial-mip cases), descriptor::tests::placed_key_matches_only_inline_placed_records_at_address, and descriptor::tests::queued_texture_replacements_coalesce_and_drain. Live D3D12 alias-copy rendering requires a D3D12 device.

Pull request details or commits were not available from GitHub; kept as an issue.

**@⁠chefulano** on GitHub · 2026-12-05 02:46 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/550) ## Problem Placed texture views that alias a GPU render target or UAV (`alias_of(this).is_some()`) have `fills(&desc) == true`, so `hosted_for()` could sub-allocate them from the CPU-filled texture pool, mark `host.filled = true` (making idle sweeps evict them as CPU-uploadable textures), or take CPU upload shortcuts (`compare_source` / `ahead::take`) in the bindless slot refresh path instead of running `readable()` / `texture::alias()`. On constrained 8 GiB VRAM / 16 GiB RAM AMD RDNA 3 (RX 7600M XT 8 GiB) setups where pool eviction and `VICTORY_POOL_MOVE` run aggressively, GPU-copied alias contents could be lost or skipped (causing ghosting or black sky/reflections). ## Change - **Keep alias views out of the texture pool and idle eviction:** `hosted_for()` passes `allow_pool = !is_alias` to `host_texture_in()` and sets `host.filled = can_pool_or_evict_as_title_filled(fills(&r.desc), is_alias)` (also removing the now-unused `host_texture` / `host_texture_as` wrappers). - **Handle view-first creation order in `copy_target()`:** Before calling `want_level(this, 0)`, if a placed alias copy target already holds a pooled, title-filled, or partial-mip (`base > 0`) copy (`copy_target_needs_detach()`), reset `wanted = 0`, unstage it, remove it from `sweep_members()`, retire the old `Made` onto `REPLACED`, allocate a full-mip private non-pooled copy, and queue descriptor rebuilding via `descriptor::queue_texture_replaced()` (drained in `descriptor::make_waiting()` right before submission with zero slot locks held; `REPLACED` keeps the retired copy alive for any in-flight lists). Non-alias callers follow `main`'s exact path. - **Route bindless alias slots through `readable()`:** `draw.rs` adds `plan_bindless_slot()` so placed aliases in the bindless pass run `readable()` (scheduling `texture::alias()` and shader-resource transitions) while skipping CPU `compare_source()` and async `ahead::take()`. - **Mark alias copy destinations GPU-written:** `texture::alias()` acquires the destination via `resource::copy_target(placed)` and calls `list.note_gpu_written(placed, None)` on both direct-copy and buffer-mediated paths. ## Measured impact Pure correctness fix; non-alias textures follow `main`'s exact path. Observed fixing missing alias contents on an earlier combined build running on an 8 GiB VRAM / 16 GiB RAM AMD RDNA 3 (RX 7600M XT 8 GiB) Linux host under RADV + vkd3d-proton; end-to-end GPU rendering was not re-run standalone on `b581f7e`. ## Verification - Checked on `main` (`b581f7e`). Recommended to merge ahead of the companion castable-alias and sweep/residency PRs, which touch adjacent lines in `resource.rs` and `texture.rs`. - `cargo xtask policy`: `359 files ok`; `cargo test -p xtask -- policy::tests`: `7 passed, 0 failed`. - `cargo check --locked --target x86_64-pc-windows-msvc -p victory-gpu -p victory --tests`: 0 errors, 0 new warnings (only baseline `room_lately`). - Isolated CPU Wine parallel unit tests (`5 passed, 0 failed`): `draw::tests::` (including new `bindless_alias_routes_through_readable_and_skips_cpu_upload`), `resource::tests::alias_views_are_not_pooled_or_evicted_as_title_filled` (covering pooled, title-filled, and `base > 0` partial-mip cases), `descriptor::tests::placed_key_matches_only_inline_placed_records_at_address`, and `descriptor::tests::queued_texture_replacements_coalesce_and_drain`. Live D3D12 alias-copy rendering requires a D3D12 device. *Pull request details or commits were not available from GitHub; kept as an issue.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 02:47:00 +00:00
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-05 03:36 UTC · original

Checked 65f3c84 on native Windows (one NVIDIA desktop card plus WARP, didn't run the game).

This is a default behaviour change, there is no switch. I confirmed it with a throwaway device test (reverted) that makes an R32_UINT UAV target and an R9G9B9E5 view placed at the same address, in both orders, and asks for the view's host copy, then calls copy_target on it. On main, both orders gave a pooled copy with filled set and the view in the sweep set, and copy_target kept that same copy. On this PR, target first gives a private copy with filled clear that stays out of the sweep set from the start. View first starts pooled and filled, then copy_target swaps it for a new private full-mip copy, queues exactly one (view, address, remake=true) entry, and a second copy_target call reuses that copy without queueing again. Same results with the debug layer on and on WARP.

Unit tests, cargo test -p victory-gpu --lib (skipping views_die_with_their_resource): 356 passed and 5 failed on the PR, 352 passed and the same 5 failed on main (indirect host_list_* x2, the two pipeline library loads, the flaky watch test). The 4 extra passes are the new tests. With the diagnostics feature and VICTORY_D3D12_DEBUG=1 it's 404 vs 400 with the same 5 failures. On WARP descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in also fails, but it fails the same way on main, so it isn't from this PR. clippy -p victory-gpu --all-targets gives the same warnings on both sides, and cargo check -p victory is clean apart from the existing room_lately warning.

Most of the protection against eviction comes from copy_destination, not from filled. take_idle and the pool move pick candidates by fills(&r.desc), copy_destination and host_wrote (resource.rs:2307-2313 and 2384-2391), not by host.filled. On main, alias() only called want_level, so an alias view never got copy_destination and could be let go or moved. Now alias() goes through copy_target (texture.rs:175), which sets it for good. Clearing host.filled (resource.rs:1724) mostly changes sweep set membership and the KINDS and census counters. That's fine, but the body makes it sound like filled is what keeps these out of eviction. Another side effect worth stating is that alias copies are now never idle-evicted at all. That's probably what you want for probes and the sky, but it is a memory change on the low-VRAM setups the body talks about.

note_gpu_written (texture.rs:318 and 354) does little by default. keep_gpu_written() falls back to placed_copied(), which is off unless VICTORY_PLACED_COPIED or VICTORY_KEEP_GPU_WRITTEN is set (texture.rs:1276), and the fresh copy from the detach isn't grown. So in the default config those two calls are close to a no-op.

The question I'd most like answered is about the descriptor refresh timing. make_waiting drains the queue right before the submission (descriptor.rs:1083) and rewrites the slots to the fresh copy at once (records.rs:850, descriptor/host.rs:2468 and 2495). main's own path for a replaced copy, texture_views_remade, waits until the submissions before it have finished (RESHOWN_AFTER, descriptor/host.rs:2420-2433), and the want_level doc says the old slots keep showing the old copy until the new one is filled. Here, a slot rewritten before the list that does the alias copy runs, or read by draws recorded earlier in that same list, sees the new copy before anything has been copied into it. Since the old copy held title-memory bytes anyway, that's at most one frame of wrong content, but I'd like to know whether skipping the wait was deliberate. texture_replaced also calls host::moved(start), so the placed slots get marked due again through the existing path as well. That looks harmless, just a double refresh.

Lock order looks fine to me. copy_target takes made, then unstage, sweep_members and REPLACED, which is the same order want_level uses (resource.rs:1415-1427). queue_texture_replaced only runs after made is dropped (resource.rs:2996-2998). texture_replaced lets go of the views read lock before it takes the record shard locks and the per-slot made locks, and refresh_placed_at lets go of placed before it locks slots. The key decoding in is_placed_key_at (descriptor.rs:732) matches kind_words/key_of. Table generations stay below the kind bits, and placed addresses fit the 40 bits. The full key scan in refresh_texture (records.rs:870-878) runs once per detached view, which is only the view-first case, so the cost seems acceptable. forget also drops queued entries for a released resource (descriptor.rs:1264), which is good.

The bindless change in draw.rs:4061-4072 and plan_bindless_slot (draw.rs:6465) does what the body says. An alias view no longer stops at compare_source "same" and always reaches readable(), which calls texture::alias. That means one alias copy per bindless pass per slot. I think that's right because the GPU rewrites the source, I'm just mentioning the cost.

Compared with #551, the shared helpers match. The descriptor/host.rs refresh_slot/refresh_placed_at hunk and the records.rs refresh_texture hunk are identical, and in descriptor.rs the only differences are the doc comment on the queue and two test comments. A trial merge of the two branches still conflicts in descriptor.rs (comments only), in resource.rs (hosted_for, copy_target and the test module) and in texture.rs (the top of alias(), where #551 adds the castable early return before want_level). So the helper part of a rebase is trivial, but the resource.rs and texture.rs parts need a real merge.

The body says the observed fix came from an earlier combined build on another driver stack and wasn't re-run on b581f7e. I couldn't confirm the visual fix either.

Not tested: the game, any visual result, an actual descriptor slot mirroring the view before and after the refresh (I read that path but didn't exercise it with a live slot), the other copy_target callers in list.rs (956, 1057, 1395) that could now hit the detach if a title copy ever targets an alias view, AMD or vkd3d-proton, and memory behaviour under pressure.

AI-assisted: yes

**@⁠Kal0s-design** on GitHub · 2026-12-05 03:36 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/550#issuecomment-7431196147) Checked 65f3c84 on native Windows (one NVIDIA desktop card plus WARP, didn't run the game). This is a default behaviour change, there is no switch. I confirmed it with a throwaway device test (reverted) that makes an R32_UINT UAV target and an R9G9B9E5 view placed at the same address, in both orders, and asks for the view's host copy, then calls copy_target on it. On main, both orders gave a pooled copy with filled set and the view in the sweep set, and copy_target kept that same copy. On this PR, target first gives a private copy with filled clear that stays out of the sweep set from the start. View first starts pooled and filled, then copy_target swaps it for a new private full-mip copy, queues exactly one (view, address, remake=true) entry, and a second copy_target call reuses that copy without queueing again. Same results with the debug layer on and on WARP. Unit tests, cargo test -p victory-gpu --lib (skipping views_die_with_their_resource): 356 passed and 5 failed on the PR, 352 passed and the same 5 failed on main (indirect host_list_* x2, the two pipeline library loads, the flaky watch test). The 4 extra passes are the new tests. With the diagnostics feature and VICTORY_D3D12_DEBUG=1 it's 404 vs 400 with the same 5 failures. On WARP descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in also fails, but it fails the same way on main, so it isn't from this PR. clippy -p victory-gpu --all-targets gives the same warnings on both sides, and cargo check -p victory is clean apart from the existing room_lately warning. Most of the protection against eviction comes from copy_destination, not from filled. take_idle and the pool move pick candidates by fills(&r.desc), copy_destination and host_wrote (resource.rs:2307-2313 and 2384-2391), not by host.filled. On main, alias() only called want_level, so an alias view never got copy_destination and could be let go or moved. Now alias() goes through copy_target (texture.rs:175), which sets it for good. Clearing host.filled (resource.rs:1724) mostly changes sweep set membership and the KINDS and census counters. That's fine, but the body makes it sound like filled is what keeps these out of eviction. Another side effect worth stating is that alias copies are now never idle-evicted at all. That's probably what you want for probes and the sky, but it is a memory change on the low-VRAM setups the body talks about. note_gpu_written (texture.rs:318 and 354) does little by default. keep_gpu_written() falls back to placed_copied(), which is off unless VICTORY_PLACED_COPIED or VICTORY_KEEP_GPU_WRITTEN is set (texture.rs:1276), and the fresh copy from the detach isn't grown. So in the default config those two calls are close to a no-op. The question I'd most like answered is about the descriptor refresh timing. make_waiting drains the queue right before the submission (descriptor.rs:1083) and rewrites the slots to the fresh copy at once (records.rs:850, descriptor/host.rs:2468 and 2495). main's own path for a replaced copy, texture_views_remade, waits until the submissions before it have finished (RESHOWN_AFTER, descriptor/host.rs:2420-2433), and the want_level doc says the old slots keep showing the old copy until the new one is filled. Here, a slot rewritten before the list that does the alias copy runs, or read by draws recorded earlier in that same list, sees the new copy before anything has been copied into it. Since the old copy held title-memory bytes anyway, that's at most one frame of wrong content, but I'd like to know whether skipping the wait was deliberate. texture_replaced also calls host::moved(start), so the placed slots get marked due again through the existing path as well. That looks harmless, just a double refresh. Lock order looks fine to me. copy_target takes made, then unstage, sweep_members and REPLACED, which is the same order want_level uses (resource.rs:1415-1427). queue_texture_replaced only runs after made is dropped (resource.rs:2996-2998). texture_replaced lets go of the views read lock before it takes the record shard locks and the per-slot made locks, and refresh_placed_at lets go of placed before it locks slots. The key decoding in is_placed_key_at (descriptor.rs:732) matches kind_words/key_of. Table generations stay below the kind bits, and placed addresses fit the 40 bits. The full key scan in refresh_texture (records.rs:870-878) runs once per detached view, which is only the view-first case, so the cost seems acceptable. forget also drops queued entries for a released resource (descriptor.rs:1264), which is good. The bindless change in draw.rs:4061-4072 and plan_bindless_slot (draw.rs:6465) does what the body says. An alias view no longer stops at compare_source "same" and always reaches readable(), which calls texture::alias. That means one alias copy per bindless pass per slot. I think that's right because the GPU rewrites the source, I'm just mentioning the cost. Compared with #551, the shared helpers match. The descriptor/host.rs refresh_slot/refresh_placed_at hunk and the records.rs refresh_texture hunk are identical, and in descriptor.rs the only differences are the doc comment on the queue and two test comments. A trial merge of the two branches still conflicts in descriptor.rs (comments only), in resource.rs (hosted_for, copy_target and the test module) and in texture.rs (the top of alias(), where #551 adds the castable early return before want_level). So the helper part of a rebase is trivial, but the resource.rs and texture.rs parts need a real merge. The body says the observed fix came from an earlier combined build on another driver stack and wasn't re-run on b581f7e. I couldn't confirm the visual fix either. Not tested: the game, any visual result, an actual descriptor slot mirroring the view before and after the refresh (I read that path but didn't exercise it with a live slot), the other copy_target callers in list.rs (956, 1057, 1395) that could now hit the detach if a title copy ever targets an alias view, AMD or vkd3d-proton, and memory behaviour under pressure. AI-assisted: yes
Author
Owner

@⁠t-jonesy on GitHub · 2026-12-05 14:19 UTC · original

We hit what looks like the same bug independently, on a 16 GB card, so it is not only a low-VRAM problem. Here is our root cause and data, in case it helps the review.

Setup: RX 9070 XT 16 GB, game 1.0.2.1, Series X, VICTORY_POOL_MOVE=1, with the card at about 94% of its budget during load-in.

Symptom: a frozen picture of the load-in scene over the live one. It shows behind the phone (the apartment instead of the street) and as a "ghost" over opaque surfaces. It stays for the whole session.

Cause, as we traced it. The DOF chain's half-size scene:

  • Pass 2668 reads an R9G9B9E5 view placed at an R32_UINT target that a temporal compute pass writes each frame. That is the same pair Kal0s reproduced here.
  • Its alias copy runs every frame. Then a blur, then a composite that blends it over the HDR scene at full weight behind the phone.

Under load-in pressure, move_out (POOL_MOVE) let go of that view's host copy when its texture block was drained. The copy was placed and title-filled, and neither host_wrote nor copy_destination, because alias() set neither. The next alias() made a new host copy and copied into it.

But the slot the draws read was a records (canon) slot. Canon slots are made again only on a fresh record, or through levels_changed_after when a copy grows, and alias copies trigger neither. So the slot kept showing the old host copy, holding the load-in frame, for the rest of the session. The alias lookups and copies themselves were fine throughout: we had counters on lookups and copies, and they never moved in ghost runs. What was wrong was which host copy the slot showed.

Evidence that the move is the trigger:

  • Of our runs on disk, 7 of 14 runs with a pool move during load-in ghosted. 0 of 28 runs without one did.
  • A move is necessary but not sufficient: the DOF copy also has to sit in a block that gets drained, which depends on boot path, thread order and memory pressure.
  • VICTORY_POOL_MOVE=0 alone avoids it.

Our fix (fork only, VICTORY_PLACED_REFRESH) has two halves:

  1. alias() marks the view a copy destination, so pool moves and the idle sweep leave its host copy alone. This is the same as your copy_target change, and as Kal0s says, it is the part that actually protects it.
  2. A sampled alias view whose slot shows a different host copy than the one the alias copies go into has its slot made again from its record.

With it, the user's 8-minute drive had 96 "stale placed views" lines, every one with 0 stale and 0 slots showing another copy, despite 3 pool moves. The phone backdrop was correct.

On the refresh timing Kal0s asked about. We hit the same question and chose to wait:

  • The rewrite is queued with list.defer_host on the list that does the alias copy into the new host copy, recording that submission's number.
  • texture_slots_flip makes the slot from its record only once host::submissions() says that submission has finished. That is the same pattern as main's RESHOWN_AFTER for texture_views_remade.
  • Until then the slot keeps showing the old copy, so it never shows the new copy before anything has been copied into it.

The cost is that the slot is up to one submission late in showing the live copy. That is harmless, since the old copy was already stale. In #550's view-first detach path, deferring the queue_texture_replaced drain to "after the next list that copies into the new copy has finished" would avoid the empty frame Kal0s describes. The REPLACED entry already keeps the old copy alive for that long.

Two smaller notes from our tracing:

  • Pass 2668's slot was a canon slot, read through the records heap, not a title table. So the records.rs refresh_texture part of #550 is the part that reaches it.
  • Re-check the bindless shortcut (part c). We did not need it for this ghost, but it closes the other plausible stale-bytes path. We carry a switched port of it and have no evidence for or against it yet. If anyone still sees a frozen backdrop with #550 (a) and (b), that path is worth checking.
**@⁠t-jonesy** on GitHub · 2026-12-05 14:19 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/550#issuecomment-7439475917) We hit what looks like the same bug independently, on a 16 GB card, so it is not only a low-VRAM problem. Here is our root cause and data, in case it helps the review. **Setup:** RX 9070 XT 16 GB, game 1.0.2.1, Series X, `VICTORY_POOL_MOVE=1`, with the card at about 94% of its budget during load-in. **Symptom:** a frozen picture of the load-in scene over the live one. It shows behind the phone (the apartment instead of the street) and as a "ghost" over opaque surfaces. It stays for the whole session. **Cause, as we traced it.** The DOF chain's half-size scene: - Pass 2668 reads an R9G9B9E5 view placed at an R32_UINT target that a temporal compute pass writes each frame. That is the same pair Kal0s reproduced here. - Its alias copy runs every frame. Then a blur, then a composite that blends it over the HDR scene at full weight behind the phone. Under load-in pressure, `move_out` (POOL_MOVE) let go of that view's host copy when its texture block was drained. The copy was placed and title-filled, and neither `host_wrote` nor `copy_destination`, because `alias()` set neither. The next `alias()` made a new host copy and copied into it. But the slot the draws read was a **records (canon) slot**. Canon slots are made again only on a fresh record, or through `levels_changed_after` when a copy grows, and alias copies trigger neither. So the slot kept showing the old host copy, holding the load-in frame, for the rest of the session. The alias lookups and copies themselves were fine throughout: we had counters on lookups and copies, and they never moved in ghost runs. What was wrong was which host copy the slot showed. **Evidence that the move is the trigger:** - Of our runs on disk, 7 of 14 runs with a pool move during load-in ghosted. 0 of 28 runs without one did. - A move is necessary but not sufficient: the DOF copy also has to sit in a block that gets drained, which depends on boot path, thread order and memory pressure. - `VICTORY_POOL_MOVE=0` alone avoids it. **Our fix** (fork only, `VICTORY_PLACED_REFRESH`) has two halves: 1. `alias()` marks the view a copy destination, so pool moves and the idle sweep leave its host copy alone. This is the same as your `copy_target` change, and as Kal0s says, it is the part that actually protects it. 2. A sampled alias view whose slot shows a different host copy than the one the alias copies go into has its slot made again from its record. With it, the user's 8-minute drive had 96 "stale placed views" lines, every one with 0 stale and 0 slots showing another copy, despite 3 pool moves. The phone backdrop was correct. **On the refresh timing Kal0s asked about.** We hit the same question and chose to wait: - The rewrite is queued with `list.defer_host` on the list that does the alias copy into the new host copy, recording that submission's number. - `texture_slots_flip` makes the slot from its record only once `host::submissions()` says that submission has finished. That is the same pattern as main's `RESHOWN_AFTER` for `texture_views_remade`. - Until then the slot keeps showing the old copy, so it never shows the new copy before anything has been copied into it. The cost is that the slot is up to one submission late in showing the live copy. That is harmless, since the old copy was already stale. In #550's view-first detach path, deferring the `queue_texture_replaced` drain to "after the next list that copies into the new copy has finished" would avoid the empty frame Kal0s describes. The `REPLACED` entry already keeps the old copy alive for that long. Two smaller notes from our tracing: - **Pass 2668's slot was a canon slot**, read through the records heap, not a title table. So the `records.rs` `refresh_texture` part of #550 is the part that reaches it. - **Re-check the bindless shortcut (part c).** We did not need it for this ghost, but it closes the other plausible stale-bytes path. We carry a switched port of it and have no evidence for or against it yet. If anyone still sees a frozen backdrop with #550 (a) and (b), that path is worth checking.
Author
Owner

@⁠chefulano on GitHub · 2026-12-05 20:22 UTC · original

Note

🤖 Gemini 4 Neon responding on behalf of chefulano

Opened follow-up PR #623 (fix(gpu): defer view-first alias descriptor rewrite until copy finishes) implementing the deferred RESHOWN_AFTER-style descriptor rewrite recommended by @⁠Kal0s-design and @⁠t-jonesy.

  • @⁠t-jonesy: The 16 GB RX 9070 XT trace (7/14 ghosted with a pool move during load-in vs 0/28 without, Pass 2668's R9G9B9E5 canon slot, and 0 stale across an 8-minute drive with 3 pool moves) confirms the same copy_destination + records::refresh_texture root cause beyond 8 GiB cards.
  • @⁠Kal0s-design:
    1. copy_destination vs filled: Confirmed — eviction and pool-move protection come from copy_destination set by copy_target(), while clearing host.filled keeps target-first alias views out of sweep_members() and title-filled census counters (meaning alias copies are not idle-evicted). For the R32 / R9G9B9E5 probes and sky aliases, #551 removes the duplicate allocation entirely.
    2. note_gpu_written and bindless cost: Agreed — note_gpu_written keeps parity when VICTORY_PLACED_COPIED or VICTORY_KEEP_GPU_WRITTEN is enabled, and routing bindless alias slots through readable() is required because the GPU rewrites the source.
    3. Descriptor refresh timing (RESHOWN_AFTER): Skipping the submission wait in #550 was deliberate to keep the initial fix small (accepting up to one uncopied frame in view-first order). PR #623 now defers view-first descriptor rewrites via queue_texture_replaced_after + list.defer_host until the copy submission finishes, with an RAII fallback to immediate refresh on early returns.
**@⁠chefulano** on GitHub · 2026-12-05 20:22 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/550#issuecomment-7444763644) > [!NOTE] > 🤖 **Gemini 4 Neon responding on behalf of chefulano** Opened follow-up PR #623 (`fix(gpu): defer view-first alias descriptor rewrite until copy finishes`) implementing the deferred `RESHOWN_AFTER`-style descriptor rewrite recommended by @⁠Kal0s-design and @⁠t-jonesy. - **@⁠t-jonesy:** The 16 GB RX 9070 XT trace (`7/14` ghosted with a pool move during load-in vs `0/28` without, Pass 2668's R9G9B9E5 canon slot, and `0` stale across an 8-minute drive with 3 pool moves) confirms the same `copy_destination` + `records::refresh_texture` root cause beyond 8 GiB cards. - **@⁠Kal0s-design:** 1. **`copy_destination` vs `filled`:** Confirmed — eviction and pool-move protection come from `copy_destination` set by `copy_target()`, while clearing `host.filled` keeps target-first alias views out of `sweep_members()` and title-filled census counters (meaning alias copies are not idle-evicted). For the `R32` / `R9G9B9E5` probes and sky aliases, `#551` removes the duplicate allocation entirely. 2. **`note_gpu_written` and bindless cost:** Agreed — `note_gpu_written` keeps parity when `VICTORY_PLACED_COPIED` or `VICTORY_KEEP_GPU_WRITTEN` is enabled, and routing bindless alias slots through `readable()` is required because the GPU rewrites the source. 3. **Descriptor refresh timing (`RESHOWN_AFTER`):** Skipping the submission wait in `#550` was deliberate to keep the initial fix small (accepting up to one uncopied frame in view-first order). PR #623 now defers view-first descriptor rewrites via `queue_texture_replaced_after` + `list.defer_host` until the copy submission finishes, with an RAII fallback to immediate refresh on early returns.
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/lobomfz--VIctory-xmem#550
No description provided.