Alias copies: the buffer's layouts are made again when the view's source texture changed (a copy the host refuses at Close) #3776

Manually merged
github merged 1 commit from github-bot/gh-3776 into main 2026-11-30 14:14:28 +00:00 AGit
Owner

@⁠Lyrnc on GitHub · 2026-11-30 06:45 UTC · original
Lyrnc:fix/late-did-not-close → main · +142 −13 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC

Scope: this fixes one invalid-copy path I found while tracing the late "did not close" reports below. It is a real bug with a unit test, but nothing yet shows it is the command in those reports. The bench run under NOT tested is how to find out. Related: #3488 (CubeB) names the culprit command after a failed Close.

Problem

a host command list did not close (0x80070057): a command recorded into it was invalid, late in a session and under texture pressure:

  • #3135 and #3254 (Huanhuanna917, RTX 4070 Ti SUPER 16 GB, .02, .03, .04 and .05). Crashes came after 6.7, 12, 21, 23, 38 and 49 minutes, and at the chapter 2 load every time. Each time the last lines were a first host texture was admitted just over the room line (black face fix) and/or a texture already on the card is brought up to date although the card has no room for new ones. VICTORY_TEXTURE_ROOM_PERCENT=70 crashed sooner. The Series S profile got through the steady scene but not the chapter load. One crash came with the card at 80 % and 3 GB free.
  • #3079 (RTX 4090 at room 89 %; RTX 3080 Ti on .03 after 10 min; sailcat's RTX 5090 on .01 and .02). #3152 (RTX 5080 on .03, details only in an attachment).

Root cause: what the code says (vnv/main 41adb551)

  1. The over-line admission records nothing of its own. draw.rs, the heap texture pass, around lines 4320-4373: when room is false and the slot has no host texture, room_for_first_upload + first_upload_reserve decide first_upload. An admitted slot then goes the way every first upload under the line goes: host.mirror → readable → texture::upload_from → record_upload. first_upload is read once more, at around 4618, only to sample the budget again. The two log lines are the pass's only frequent info lines while resource::room says no room (they print at n = 1 and every 250th or 500th). So during a streaming burst they are the last lines before any failure. Skipping the admission or flushing before it would bring back the black faces and remove no command.
  2. The three guesses in the task:
    • A view of an evicted or placeholder resource. Views are descriptors, not commands. slot_evict runs only with VICTORY_SLOT_EVICT=1 or a flush, and it nulls the slots before it lets the copy go. Gone slots show the neutral texture or a null view (descriptor/host.rs, gone_neutral_on). A view of a released resource faults on the card (0x887A0006, the other ending sailcat saw), and does not fail Close.
    • A barrier on a resource in the wrong state. The runtime keeps no states (the debug layer does). A wrong StateBefore does not fail Close. What does fail it is a state the resource cannot take: buffer bits alone on a texture, a write state on an upload buffer (measured in #3488). #3487 handles those. Our pressure paths add no new state.
    • A copy into a released heap. A pooled piece comes back only when the texture's last COM reference goes (pool.rs::give_back_to, a private-data object), and then rests 2.5 s (REST). Lists hold their copies by Arc (slot_evict and let_go_idle check strong_count, and host::references). A use after free would fault or remove the device. It would not give a clean E_INVALIDARG.
  3. What fails Close with E_INVALIDARG is a command the runtime checks when it is recorded: copies (format family, subresource index, box), barriers (state legality), and root arguments without the right root signature. The open PRs for this error:
    • #2305: root signature skipped on a fresh host list. It fires at the first bind of a new list, whatever the textures. Merges cleanly with main and with #3488.
    • #3043: cross-family copies into placed twins. On .03 the debug layer named this one (#3079, sailcat: BC3 → BC6H / BC7 from placed_twins), and a 10-line patch gave 45 min clean.
    • #3062: title copies indexed by the title's levels into a host copy made of the levels views show ("source box right 784 on a 736x538 level"). Conflicts with #3488 in list.rs.
    • #2862: seed_pending counted a volume's slices as layers, so its subresource indices went past the texture's.
    • #3487: illegal texture states made legal before a barrier.
    • #3488 (CubeB, on #3043): every CopyTextureRegion, CopyBufferRegion, Resolve* and ResourceBarrier is judged against measured rules (466 cases, checked against WARP). A refused one is logged (close guard: a command D3D12 would refuse) and left out. A failed Close replays a ring of the list's commands and names the culprit. The run goes on without the list. Not play-tested.
  4. Which one T07 is cannot be read from the text. The text fits a copy better than the root signature: the failures come with streaming bursts (the chapter load) and scale with the texture volume (Series S lowers it). #2305 cannot be ruled out, because it is also "the same scene every time". The bench run names it.
  5. Found while tracing, and fixed here: texture.rs::alias. This is a view the title placed, in another format, in the memory of a texture the host writes, read through a buffer. It keeps the buffer and both sides' copy layouts in THROUGH, by the view alone. The source is the newest texture the host writes at the view's memory (resource::alias_of → TARGETS_AT, newest at an address wins). alias_with only asks that it has the view's width, height, levels and layers, and a one-texel element of the same bytes. So a target the title makes at that address later (a scene or chapter change that makes its targets again) can be of another format of the same width, for example R16G16_FLOAT where R32_UINT was. The entry is not dropped then: texture::forget of the old target removes only an entry keyed by it. Its layouts still name the old format, and the copy of the new texture into them is a texture ↔ footprint copy between formats that do not copy into each other. The host refuses that at Close (#3488's read_back_repaired exists for the same rule). The same happens if the view's host copy has fewer levels than when the entry was made (one want_level keeps as the host wrote it): the copies then name subresources it does not have.

Fix

crates/victory-gpu/src/texture.rs:

  • through_fits(parts, buffered, written, read): the layouts still fit if both sides have as many parts as the entry, each side's format is the one its layouts name, and there is a buffer exactly when the formats do not copy straight across (direct). alias_parts is the old count closure, as a function.
  • alias: reads both host descriptions before the lookup. An entry that does not fit is removed and made again as a new one would be. The info line an alias copy's layouts were made for other textures: made again (first 8, then powers of two) names the view, the source, the formats it was made for and the formats now. THROUGH_STALE counts them.
  • Dimensions are not compared. alias_with already asks for the same size, and #3138's block alias (VICTORY_ALIAS_BLOCKS) has footprints of other widths on purpose. An entry that fits costs two GetDesc calls more than before.

Verification

On 2a637617, target dir C:\pt-close, each under the shared heavy lock:

  • cargo check -p victory-gpu --locked -j 6: finished, no errors. 18 warnings in victory-gpu, none in texture.rs (main's own).
  • cargo test -p victory-gpu --lib --locked -j 6 -- alias_layout_tests texture::: 14 passed, 0 failed, 4 ignored (measurements).
    • New: texture::alias_layout_tests::alias_layouts_are_made_again_for_other_textures. Layouts made for R32_UINT → R9G9B9E5_SHAREDEXP (3 levels, buffered) fit those textures. They do not fit an R16G16_FLOAT source of the same size, a source or view with fewer levels, a missing buffer, or no parts.
    • Existing, passing: alias_copy_tests::a_direct_alias_copy_keeps_every_bit (D3D12, on the 5080) and the other texture:: tests.
  • cargo clippy -p victory-gpu --lib --tests --locked -j 6 --no-deps: finished. 32 warnings, none in texture.rs (they are in pipeline.rs, host/font.rs, streamline.rs, shadow.rs, resource.rs, host.rs and others: main's).
  • git merge-tree: clean on vnv/main + #3488 + #2305 (the bench's R1), and on vnv/main + #3138.

NOT tested: in-game check pending

Nothing was run in the title. Steps for the bench agent (RTX 5080 16 GB, 9800X3D, 32 GB). The goal is to name T07's command, not just to test this branch.

  1. Builds, each with its own target dir, release (cargo build --release --locked -p victory):
  2. Same for every run: warm shader cache (preloaded), Discord and Firefox closed, no other GPU load, Series X, 2560x1440, DLSS Quality, frame generation 2X, ray tracing off. Texture pressure: VICTORY_TEXTURE_ROOM_PERCENT=40. If R0 does not fail in 15 min, use VICTORY_VRAM_BUDGET_MB=9000 (as #3050 did) instead. Forced pressure can take 8 GB-card paths that are not this bug. Note which setting gave the failure.
  3. Route: a save in the open city. Drive fast for 10 minutes through areas not seen in that session (a streaming burst every few seconds). Then, if we have a save just before a chapter end, play through the chapter load (Huanhuanna917's reliable crash point).
  4. R0 first, 2 runs of at most 15 min. Record the minute of a host command list did not close and the 30 log lines before it. If neither run fails at either pressure setting, stop: "not reproduced on the 5080". Report the room lines (textures picked by index: ... uploaded so far, memory now: ...) so the pressure can be compared with #3254's (card 12.0 / 14.3 GB, shared 12.2 GB).
  5. R1 with VICTORY_CLOSE_GUARD=log (commands are judged and logged, still recorded), same route and pressure, 2 runs. Grep the log for:
    • close guard: a command D3D12 would refuse: method, why, command (formats, box, subresources, states) name the command before Close fails.
    • close failure: ... and the replay's line the list's copies, resolves and barriers in the ring were each recorded alone and closed (culprits named), or no command in the ring fails Close alone. The latter means the command is of a kind the guard does not judge (root arguments, a draw, a state call).
    • an alias copy's layouts were made for other textures: made again (this branch).
  6. Read the result:
    • CopyTextureRegion, formats of two families, a twin (from placed_twins in list.rs): #3043's case. R1 carries #3043, so seeing it means #3043 is incomplete. Report it on #3043 (Selim's call).
    • A box past a level's edges or a subresource past the count, in list.rs title copies: #3062's case. Then build R2 = main + #3062 alone (+ #2305) and repeat step 5 without the guard. Expect no failure.
    • ResourceBarrier refused for its states: #3487's case.
    • A texture ↔ footprint copy in texture.rs::alias (the ring shows a buffer footprint and the source's format), or the "made again" line just before the failure: this branch. R1 should then not fail at all, so also run main + this branch alone without #3488 and expect it clean.
    • no command in the ring fails Close alone: not a copy or barrier. R1 has #2305, so it is a further root-argument or state case. Next: a diagnostics build of R1 (cargo build --profile diag -p victory --features diagnostics, which compiles on main since 41adb551) with VICTORY_D3D12_DEBUG=1. The debug layer can hide a race (#3222), so also VICTORY_D3D12_DRED=light.
    • No failure in R1 with log: one of #2305 / #3043 fixed it. Bisect by dropping #2305 (R1 without it).
  7. R1 with the guard on (default), 1 run: it must get through the route. Count close guard lines. They are copies left out, which may show as a texture wrong for a frame. Look at faces and signs after the chapter load.

Overlap

  • gh pr list --state open (782 open, 2026-11-30 morning), searched for "did not close", 0x80070057, E_INVALIDARG, THROUGH, fn alias(, alias copy. Then the diffs of the 38 open PRs that touch texture.rs were read for alias / THROUGH:
    • None changes how THROUGH entries are found or kept. None names the stale-source case.
    • #3488 changes the three CopyTextureRegion calls further down in alias to checked::copy_texture: no textual conflict with this hunk. With #3488 alone, the stale copy would be refused and left out (the view shows title memory for that frame). With this branch, the copy is made right.
    • #3138 changes the footprint checks inside the build of a new entry (counts, sizes, VICTORY_ALIAS_BLOCKS) right below the lines changed here. git merge-tree of main + #3138 + this branch is clean, and the meaning does not conflict: through_fits compares no sizes.
    • #3502, #1994, #1890 and #1967 change the barrier lines or the copy lines of alias, not the lookup.
    • #3739, #3503 and #2226 change texture::forget's locks, which this branch does not touch.
    • #2862 (seed_pending for volumes) is another path to the same error. It is a different function, with no overlap.
  • The T07 hypotheses map onto #2305, #3043, #3062, #2862, #3487 and #3488 as above. None of them claims T07 by name.

AI use

Claude Code (Claude Opus 5.5) read the issues' text (not the attachments), the code and the open PRs, wrote the change and its test, ran the checks listed above, and wrote this note. Nothing was run in game.

🤖 Generated with Claude Code

**@⁠Lyrnc** on GitHub · 2026-11-30 06:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3776) `Lyrnc:fix/late-did-not-close` → `main` · +142 −13 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC > **Scope:** this fixes one invalid-copy path I found while tracing the late "did not close" reports below. It is a real bug with a unit test, but nothing yet shows it is the command in those reports. The bench run under *NOT tested* is how to find out. Related: #3488 (CubeB) names the culprit command after a failed `Close`. ## Problem `a host command list did not close (0x80070057): a command recorded into it was invalid`, late in a session and under texture pressure: - #3135 and #3254 (Huanhuanna917, RTX 4070 Ti SUPER 16 GB, .02, .03, .04 and .05). Crashes came after 6.7, 12, 21, 23, 38 and 49 minutes, and at the chapter 2 load every time. Each time the last lines were `a first host texture was admitted just over the room line (black face fix)` and/or `a texture already on the card is brought up to date although the card has no room for new ones`. `VICTORY_TEXTURE_ROOM_PERCENT=70` crashed sooner. The Series S profile got through the steady scene but not the chapter load. One crash came with the card at 80 % and 3 GB free. - #3079 (RTX 4090 at room 89 %; RTX 3080 Ti on .03 after 10 min; sailcat's RTX 5090 on .01 and .02). #3152 (RTX 5080 on .03, details only in an attachment). ## Root cause: what the code says (vnv/main 41adb551) 1. **The over-line admission records nothing of its own.** `draw.rs`, the heap texture pass, around lines 4320-4373: when `room` is false and the slot has no host texture, `room_for_first_upload` + `first_upload_reserve` decide `first_upload`. An admitted slot then goes the way every first upload under the line goes: `host.mirror` → `readable` → `texture::upload_from` → `record_upload`. `first_upload` is read once more, at around 4618, only to sample the budget again. The two log lines are the pass's only frequent info lines while `resource::room` says no room (they print at n = 1 and every 250th or 500th). So during a streaming burst they are the last lines before *any* failure. Skipping the admission or flushing before it would bring back the black faces and remove no command. 2. **The three guesses in the task:** - *A view of an evicted or placeholder resource.* Views are descriptors, not commands. `slot_evict` runs only with `VICTORY_SLOT_EVICT=1` or a flush, and it nulls the slots before it lets the copy go. Gone slots show the neutral texture or a null view (`descriptor/host.rs`, `gone_neutral_on`). A view of a released resource faults on the card (0x887A0006, the other ending sailcat saw), and does not fail `Close`. - *A barrier on a resource in the wrong state.* The runtime keeps no states (the debug layer does). A wrong `StateBefore` does not fail `Close`. What does fail it is a state the resource cannot take: buffer bits alone on a texture, a write state on an upload buffer (measured in #3488). #3487 handles those. Our pressure paths add no new state. - *A copy into a released heap.* A pooled piece comes back only when the texture's last COM reference goes (`pool.rs::give_back_to`, a private-data object), and then rests 2.5 s (`REST`). Lists hold their copies by `Arc` (`slot_evict` and `let_go_idle` check `strong_count`, and `host::references`). A use after free would fault or remove the device. It would not give a clean E_INVALIDARG. 3. **What fails `Close` with E_INVALIDARG** is a command the runtime checks when it is recorded: copies (format family, subresource index, box), barriers (state legality), and root arguments without the right root signature. The open PRs for this error: - #2305: root signature skipped on a fresh host list. It fires at the first bind of a new list, whatever the textures. Merges cleanly with main and with #3488. - #3043: cross-family copies into placed twins. On .03 the debug layer named this one (#3079, sailcat: BC3 → BC6H / BC7 from `placed_twins`), and a 10-line patch gave 45 min clean. - #3062: title copies indexed by the title's levels into a host copy made of the levels views show ("source box right 784 on a 736x538 level"). Conflicts with #3488 in `list.rs`. - #2862: `seed_pending` counted a volume's slices as layers, so its subresource indices went past the texture's. - #3487: illegal texture states made legal before a barrier. - #3488 (CubeB, on #3043): every `CopyTextureRegion`, `CopyBufferRegion`, `Resolve*` and `ResourceBarrier` is judged against measured rules (466 cases, checked against WARP). A refused one is logged (`close guard: a command D3D12 would refuse`) and left out. A failed `Close` replays a ring of the list's commands and names the culprit. The run goes on without the list. Not play-tested. 4. **Which one T07 is cannot be read from the text.** The text fits a copy better than the root signature: the failures come with streaming bursts (the chapter load) and scale with the texture volume (Series S lowers it). #2305 cannot be ruled out, because it is also "the same scene every time". The bench run names it. 5. **Found while tracing, and fixed here:** `texture.rs::alias`. This is a view the title placed, in another format, in the memory of a texture the host writes, read through a buffer. It keeps the buffer and both sides' copy layouts in `THROUGH`, by the view alone. The source is the newest texture the host writes at the view's memory (`resource::alias_of` → `TARGETS_AT`, newest at an address wins). `alias_with` only asks that it has the view's width, height, levels and layers, and a one-texel element of the same bytes. So a target the title makes at that address later (a scene or chapter change that makes its targets again) can be of another format of the same width, for example R16G16_FLOAT where R32_UINT was. The entry is not dropped then: `texture::forget` of the old target removes only an entry *keyed* by it. Its layouts still name the old format, and the copy of the new texture into them is a texture ↔ footprint copy between formats that do not copy into each other. The host refuses that at `Close` (#3488's `read_back_repaired` exists for the same rule). The same happens if the view's host copy has fewer levels than when the entry was made (one `want_level` keeps as the host wrote it): the copies then name subresources it does not have. ## Fix `crates/victory-gpu/src/texture.rs`: - `through_fits(parts, buffered, written, read)`: the layouts still fit if both sides have as many parts as the entry, each side's format is the one its layouts name, and there is a buffer exactly when the formats do not copy straight across (`direct`). `alias_parts` is the old `count` closure, as a function. - `alias`: reads both host descriptions before the lookup. An entry that does not fit is removed and made again as a new one would be. The info line `an alias copy's layouts were made for other textures: made again` (first 8, then powers of two) names the view, the source, the formats it was made for and the formats now. `THROUGH_STALE` counts them. - Dimensions are not compared. `alias_with` already asks for the same size, and #3138's block alias (`VICTORY_ALIAS_BLOCKS`) has footprints of other widths on purpose. An entry that fits costs two `GetDesc` calls more than before. ## Verification On 2a637617, target dir C:\pt-close, each under the shared heavy lock: - `cargo check -p victory-gpu --locked -j 6`: finished, no errors. 18 warnings in victory-gpu, none in `texture.rs` (main's own). - `cargo test -p victory-gpu --lib --locked -j 6 -- alias_layout_tests texture::`: 14 passed, 0 failed, 4 ignored (measurements). - New: `texture::alias_layout_tests::alias_layouts_are_made_again_for_other_textures`. Layouts made for R32_UINT → R9G9B9E5_SHAREDEXP (3 levels, buffered) fit those textures. They do not fit an R16G16_FLOAT source of the same size, a source or view with fewer levels, a missing buffer, or no parts. - Existing, passing: `alias_copy_tests::a_direct_alias_copy_keeps_every_bit` (D3D12, on the 5080) and the other `texture::` tests. - `cargo clippy -p victory-gpu --lib --tests --locked -j 6 --no-deps`: finished. 32 warnings, none in `texture.rs` (they are in pipeline.rs, host/font.rs, streamline.rs, shadow.rs, resource.rs, host.rs and others: main's). - `git merge-tree`: clean on vnv/main + #3488 + #2305 (the bench's R1), and on vnv/main + #3138. ## NOT tested: in-game check pending Nothing was run in the title. Steps for the bench agent (RTX 5080 16 GB, 9800X3D, 32 GB). The goal is to name T07's command, not just to test this branch. 1. Builds, each with its own target dir, release (`cargo build --release --locked -p victory`): - **R0**: vnv/main 41adb551 as it is. - **R1**: vnv/main + `refs/pull/3488/head` (7f63dc99, which carries #3043) + `refs/pull/2305/head` (deee533a) + this branch. `git merge-tree` shows main + #3488, then + #2305, then + this branch, all clean (checked 2026-11-30 on 7f63dc99, deee533a and 2a637617). Do not add #3062 here (it conflicts with #3488 in `list.rs`). 2. Same for every run: warm shader cache (preloaded), Discord and Firefox closed, no other GPU load, Series X, 2560x1440, DLSS Quality, frame generation 2X, ray tracing off. Texture pressure: `VICTORY_TEXTURE_ROOM_PERCENT=40`. If R0 does not fail in 15 min, use `VICTORY_VRAM_BUDGET_MB=9000` (as #3050 did) instead. Forced pressure can take 8 GB-card paths that are not this bug. Note which setting gave the failure. 3. Route: a save in the open city. Drive fast for 10 minutes through areas not seen in that session (a streaming burst every few seconds). Then, if we have a save just before a chapter end, play through the chapter load (Huanhuanna917's reliable crash point). 4. **R0 first**, 2 runs of at most 15 min. Record the minute of `a host command list did not close` and the 30 log lines before it. If neither run fails at either pressure setting, stop: "not reproduced on the 5080". Report the room lines (`textures picked by index: ... uploaded so far`, `memory now: ...`) so the pressure can be compared with #3254's (card 12.0 / 14.3 GB, shared 12.2 GB). 5. **R1 with `VICTORY_CLOSE_GUARD=log`** (commands are judged and logged, still recorded), same route and pressure, 2 runs. Grep the log for: - `close guard: a command D3D12 would refuse`: `method`, `why`, `command` (formats, box, subresources, states) name the command before `Close` fails. - `close failure: ...` and the replay's line `the list's copies, resolves and barriers in the ring were each recorded alone and closed` (culprits named), or `no command in the ring fails Close alone`. The latter means the command is of a kind the guard does not judge (root arguments, a draw, a state call). - `an alias copy's layouts were made for other textures: made again` (this branch). 6. Read the result: - `CopyTextureRegion`, formats of two families, a twin (from `placed_twins` in `list.rs`): #3043's case. R1 carries #3043, so seeing it means #3043 is incomplete. Report it on #3043 (Selim's call). - A box past a level's edges or a subresource past the count, in `list.rs` title copies: #3062's case. Then build R2 = main + #3062 alone (+ #2305) and repeat step 5 without the guard. Expect no failure. - `ResourceBarrier` refused for its states: #3487's case. - A texture ↔ footprint copy in `texture.rs::alias` (the ring shows a buffer footprint and the source's format), or the "made again" line just before the failure: this branch. R1 should then not fail at all, so also run main + this branch alone without #3488 and expect it clean. - `no command in the ring fails Close alone`: not a copy or barrier. R1 has #2305, so it is a further root-argument or state case. Next: a diagnostics build of R1 (`cargo build --profile diag -p victory --features diagnostics`, which compiles on main since 41adb551) with `VICTORY_D3D12_DEBUG=1`. The debug layer can hide a race (#3222), so also `VICTORY_D3D12_DRED=light`. - No failure in R1 with `log`: one of #2305 / #3043 fixed it. Bisect by dropping #2305 (R1 without it). 7. **R1 with the guard on (default)**, 1 run: it must get through the route. Count `close guard` lines. They are copies left out, which may show as a texture wrong for a frame. Look at faces and signs after the chapter load. ## Overlap - `gh pr list --state open` (782 open, 2026-11-30 morning), searched for "did not close", 0x80070057, E_INVALIDARG, THROUGH, `fn alias(`, alias copy. Then the diffs of the 38 open PRs that touch `texture.rs` were read for `alias` / `THROUGH`: - None changes how `THROUGH` entries are found or kept. None names the stale-source case. - #3488 changes the three `CopyTextureRegion` calls further down in `alias` to `checked::copy_texture`: no textual conflict with this hunk. With #3488 alone, the stale copy would be refused and left out (the view shows title memory for that frame). With this branch, the copy is made right. - #3138 changes the footprint checks inside the build of a new entry (`counts`, `sizes`, `VICTORY_ALIAS_BLOCKS`) right below the lines changed here. `git merge-tree` of main + #3138 + this branch is clean, and the meaning does not conflict: `through_fits` compares no sizes. - #3502, #1994, #1890 and #1967 change the barrier lines or the copy lines of `alias`, not the lookup. - #3739, #3503 and #2226 change `texture::forget`'s locks, which this branch does not touch. - #2862 (`seed_pending` for volumes) is another path to the same error. It is a different function, with no overlap. - The T07 hypotheses map onto #2305, #3043, #3062, #2862, #3487 and #3488 as above. None of them claims T07 by name. ## AI use Claude Code (Claude Opus 5.5) read the issues' text (not the attachments), the code and the open PRs, wrote the change and its test, ran the checks listed above, and wrote this note. Nothing was run in game. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
texture::alias keeps the buffer and both sides' copy layouts of a view the
title placed, in another format, in the memory of a texture the host writes
(THROUGH), by the view alone. The source is the newest such texture at the
view's memory (resource::alias_of), and alias_with asks only for the view's
size and a texel of the same bytes. A target the title makes there later
can be of another format of that width (R16G16_FLOAT where R32_UINT was):
the kept layouts still named the old format, and the copy of the new
texture into them is one the host refuses, so the list does not close
(0x80070057). The same held for a view's host copy with fewer levels than
when the layouts were made.

through_fits checks the part count of both sides, each side's format and
whether a buffer is wanted (direct); an entry that does not fit is made
again, with an info line ("an alias copy's layouts were made for other
textures: made again"). Found while tracing the late "did not close" under
texture pressure (#3135, #3254); not shown to be that one's command.

Test: texture::alias_layout_tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 06:46:36 +00:00
github manually merged commit db3b72064d into main 2026-11-30 14:14:28 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/trustno1-coder--VIctory-NVIDIA!3776
No description provided.