GPU: packed 16-bit colour targets the host cannot write are RGBA8 there #2624

Open
moe-miau wants to merge 3 commits from upstream-pr/2626 into main
moe-miau commented 2026-11-25 17:07:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by moe-miau on 2026-11-25T17:07:03Z.


Problem

B5G5R5A1_UNORM (86) and B4G4R4A4_UNORM (115) have no typed unordered access on NVIDIA, and B4G4R4A4 is not a render-target format there. main drops the texture the host refuses, and the next submission removes the device. This is the crash of #1952, #1781 and #2024 (RTX 3060, 3070, 4090).

On an RTX 4070 SUPER, main 67e8ae1 + #1906 + #2098 dies 30 s after start with 0x887A0004, 0.2 s after:

no host texture error=The parameter is incorrect. (0x80070057) desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, ..., format: 115, ...

Change

When the device lacks render-target or typed-UAV support for one of these two formats (CheckFeatureSupport), their writable textures are made as R8G8B8A8_UNORM, and their views and pipeline render-target formats follow.

  • The stand-in is keyed by the guest format, so the two layouts never share a texture.
  • Uploads from title memory and readbacks to it convert texels between the packed layout and RGBA8 (texture::expand_row / pack_row).
  • A GPU copy or resolve between a stand-in and a texture still in the packed layout is skipped, with a one-time warning (shortcut).
  • Devices that support the formats are unchanged.

Ported from Zettrox/ztrx (commit 578d459), which is based on fxceless/victory-fork. Both are GPL-3.0-or-later. Compared with the fork, this adds the texel conversion on upload and readback, and per-format keys.

Tested

RTX 4070 SUPER, driver 32.0.16.1742, Windows 11 26300. Title 1.0.2.1, Series X profile, diag build. Scripted Enter presses reach the intro cutscene; 6-minute runs.

result
67e8ae1 + #1906 + #2098 device removed at 30 s (0x887A0004) after the format-115 target is refused
same + this PR (and the heap clamp PR) no removal in 6 min, the world is reached

With the fixes from review folded in (head d1dc7ad), a second 6-minute run: no device removal, no host texture 0 (the base had 1, the format-115 target), 141 compute pipelines refused (the WaveSize(64) programs #189 is about). The world stays black at about 8 s a frame on this stack because it leaves out #2178 (structured views as raw), which no longer merges with main.

  • cargo test -p victory-gpu --locked: 197 passed. 2 failed: dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views, the same as main on this card. New tests cover the format decision and the texel conversion of both formats, in both directions, including alpha.
  • cargo clippy --workspace --all-targets --locked -- -D warnings, also with --all-features: clean. cargo xtask policy: ok.

AI-assisted (Claude Code, with a review pass by Codex). Runs done on my machine.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:5495711302 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626). Originally posted by [moe-miau](https://github.com/moe-miau) on 2026-11-25T17:07:03Z. --- ## Problem `B5G5R5A1_UNORM` (86) and `B4G4R4A4_UNORM` (115) have no typed unordered access on NVIDIA, and `B4G4R4A4` is not a render-target format there. `main` drops the texture the host refuses, and the next submission removes the device. This is the crash of #1952, #1781 and #2024 (RTX 3060, 3070, 4090). On an RTX 4070 SUPER, `main` `67e8ae1` + #1906 + #2098 dies 30 s after start with `0x887A0004`, 0.2 s after: ``` no host texture error=The parameter is incorrect. (0x80070057) desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, ..., format: 115, ... ``` ## Change When the device lacks render-target or typed-UAV support for one of these two formats (`CheckFeatureSupport`), their writable textures are made as `R8G8B8A8_UNORM`, and their views and pipeline render-target formats follow. - The stand-in is keyed by the guest format, so the two layouts never share a texture. - Uploads from title memory and readbacks to it convert texels between the packed layout and RGBA8 (`texture::expand_row` / `pack_row`). - A GPU copy or resolve between a stand-in and a texture still in the packed layout is skipped, with a one-time warning (shortcut). - Devices that support the formats are unchanged. Ported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx) (commit `578d459`), which is based on [fxceless/victory-fork](https://github.com/fxceless/victory-fork). Both are GPL-3.0-or-later. Compared with the fork, this adds the texel conversion on upload and readback, and per-format keys. ## Tested RTX 4070 SUPER, driver 32.0.16.1742, Windows 11 26300. Title 1.0.2.1, Series X profile, diag build. Scripted Enter presses reach the intro cutscene; 6-minute runs. | | result | |---|---| | `67e8ae1` + #1906 + #2098 | device removed at 30 s (`0x887A0004`) after the format-115 target is refused | | same + this PR (and the heap clamp PR) | no removal in 6 min, the world is reached | With the fixes from review folded in (head `d1dc7ad`), a second 6-minute run: no device removal, `no host texture` 0 (the base had 1, the format-115 target), 141 compute pipelines refused (the `WaveSize(64)` programs #189 is about). The world stays black at about 8 s a frame on this stack because it leaves out #2178 (structured views as raw), which no longer merges with `main`. - `cargo test -p victory-gpu --locked`: 197 passed. 2 failed: `dynamic_slots_are_held_until_released` and `lists_share_a_table_and_copies_keep_their_views`, the same as `main` on this card. New tests cover the format decision and the texel conversion of both formats, in both directions, including alpha. - `cargo clippy --workspace --all-targets --locked -- -D warnings`, also with `--all-features`: clean. `cargo xtask policy`: ok. AI-assisted (Claude Code, with a review pass by Codex). Runs done on my machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
moe-miau commented 2026-11-25 18:02:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by moe-miau on 2026-11-25T17:15:27Z.


Related: #2462 (no typed UAV in a format the host cannot store to). The two cover different cases and don't conflict:

  • #2462 leaves the UAV slot null, so a typed UAV in B5G5R5A1 no longer removes the device. The texture stays in the packed format and those writes are dropped.
  • This PR makes the texture itself R8G8B8A8_UNORM when the host can't render or store to the packed format. That also covers the case #2462 doesn't reach: the 2560x1440 B4G4R4A4 (115) render target that NVIDIA refuses to create at all (no host texture ... format: 115), which is what removed the device here 30 s in. The title's writes to it are kept.

With this PR applied, #2462's check no longer fires for these two formats on NVIDIA, because the textures and their views are RGBA8.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7169236887 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7169236887). Originally posted by [moe-miau](https://github.com/moe-miau) on 2026-11-25T17:15:27Z. --- Related: #2462 (no typed UAV in a format the host cannot store to). The two cover different cases and don't conflict: - #2462 leaves the UAV slot null, so a typed UAV in `B5G5R5A1` no longer removes the device. The texture stays in the packed format and those writes are dropped. - This PR makes the texture itself `R8G8B8A8_UNORM` when the host can't render or store to the packed format. That also covers the case #2462 doesn't reach: the 2560x1440 `B4G4R4A4` (115) render target that NVIDIA refuses to create at all (`no host texture ... format: 115`), which is what removed the device here 30 s in. The title's writes to it are kept. With this PR applied, #2462's check no longer fires for these two formats on NVIDIA, because the textures and their views are RGBA8.
kotekompotek commented 2026-11-25 18:02:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T17:49:58Z.


Reviewed: the three pieces fit together — (1) seen() now also treats a View::Unordered on a packed texture (or any written shader view) as a texture needing copy-back, (2) fits() short-circuits when target_format(view) == own so the RGBA8 host stand-in passes family checks, (3) copies guard with incompatible_copy/host_footprint so packed≠unpacked copies don't blit garbage. Moving the typed-UAV probe into shared resource::format_support also converges with what #2442/#2462 did elsewhere — good dedup. CI green.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170062157 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7170062157). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T17:49:58Z. --- Reviewed: the three pieces fit together — (1) `seen()` now also treats a `View::Unordered` on a packed texture (or any written shader view) as a texture needing copy-back, (2) `fits()` short-circuits when `target_format(view) == own` so the RGBA8 host stand-in passes family checks, (3) copies guard with `incompatible_copy`/`host_footprint` so packed≠unpacked copies don't blit garbage. Moving the typed-UAV probe into shared `resource::format_support` also converges with what #2442/#2462 did elsewhere — good dedup. CI green.
Machad3x commented 2026-11-25 19:06:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Machad3x on 2026-11-25T18:26:39Z.


Setup: RTX 3080 Ti (driver 621.24), Windows 11, a local stack of open PRs merged with main 67e8ae1.

Tested on an RTX 3080 Ti (driver 621.24, Windows 11). Format support reported:
no render target for B4G4R4A4_UNORM (115), and no typed UAV store for it or for
B5G5R5A1_UNORM (86), so both take the RGBA8 path as intended.
It conflicts with a tree that carries #2332: the 115 to 86 mapping in
pc_format has to go (and its test), or the targets never reach the RGBA8 path.
With that, one 10-minute game run (together with #2601, #2598, #2576, #2611)
had no device removal.

Written with Claude Code; tested locally.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170914612 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7170914612). Originally posted by [Machad3x](https://github.com/Machad3x) on 2026-11-25T18:26:39Z. --- Setup: RTX 3080 Ti (driver 621.24), Windows 11, a local stack of open PRs merged with main 67e8ae1. Tested on an RTX 3080 Ti (driver 621.24, Windows 11). Format support reported: no render target for B4G4R4A4_UNORM (115), and no typed UAV store for it or for B5G5R5A1_UNORM (86), so both take the RGBA8 path as intended. It conflicts with a tree that carries #2332: the 115 to 86 mapping in `pc_format` has to go (and its test), or the targets never reach the RGBA8 path. With that, one 10-minute game run (together with #2601, #2598, #2576, #2611) had no device removal. Written with Claude Code; tested locally.
moe-miau commented 2026-11-25 19:06:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by moe-miau on 2026-11-25T19:04:42Z.


Thanks @Machad3x. Right: #2332 and this PR are alternatives for the format-115 target. #2332 remaps 115 to B5G5R5A1 (86) in pc_format, which still has no typed UAV store on NVIDIA. This PR keeps the guest format and makes the host texture RGBA8 wherever the device lacks render-target or typed-UAV support for 86 or 115, with texel conversion on upload and readback. If this one lands, #2332's 115-to-86 mapping (and its test) should go, as you found. Otherwise, a 115 target never reaches the RGBA8 path.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7171789544 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7171789544). Originally posted by [moe-miau](https://github.com/moe-miau) on 2026-11-25T19:04:42Z. --- Thanks @Machad3x. Right: #2332 and this PR are alternatives for the format-115 target. #2332 remaps 115 to `B5G5R5A1` (86) in `pc_format`, which still has no typed UAV store on NVIDIA. This PR keeps the guest format and makes the host texture RGBA8 wherever the device lacks render-target or typed-UAV support for 86 or 115, with texel conversion on upload and readback. If this one lands, #2332's 115-to-86 mapping (and its test) should go, as you found. Otherwise, a 115 target never reaches the RGBA8 path.
KainanP commented 2026-11-25 20:06:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-25T19:36:16Z.


RTX 4060 Laptop (610.47), merged onto main 13f91cae: both halves fixed (R8G8B8A8 host textures; the UAVs and the RTV are real views), on Intel UHD too, and a no-op on WARP; no new failures in cargo test -p victory-gpu on any of the three. This is the only one of the #1753 PRs that does this. Details and the side-by-side table with the other #1753 PRs: https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7172510623. Tested with the help of an AI assistant (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7172525110 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7172525110). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-25T19:36:16Z. --- RTX 4060 Laptop (610.47), merged onto main 13f91cae: **both halves fixed** (R8G8B8A8 host textures; the UAVs and the RTV are real views), on Intel UHD too, and a no-op on WARP; no new failures in `cargo test -p victory-gpu` on any of the three. This is the only one of the #1753 PRs that does this. Details and the side-by-side table with the other #1753 PRs: https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7172510623. Tested with the help of an AI assistant (Claude Code).
regiumlepidi commented 2026-11-25 22:04:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by regiumlepidi on 2026-11-25T21:37:31Z.


Run report: RTX 5070 Ti (16 GB, driver 617.42), Windows 11 26300, Ryzen 7 9800X3D. Retail Series 1.0.2.1. Release builds, default switches, full translate --cache --pipelines beforehand (27,160 pipelines: 23,127 made, 3,609 found in the library).

Build Result
main 13f91ca device removed about 6 s after start (frame ~64), 0.2 s after no host texture error=0x80070057 desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, ..., format: 115, flags: 1 } → 0x887A0001
main 13f91ca + #2626 (d1dc7ad) + #1763 (73a602b) no no host texture line and no 0x887A0001. Menus ran for ~2 min at 30 fps (frame 2048, 12,937 draws / 1,026 dispatches in the last log interval)

So on this card #2626 removes the B4G4R4A4 start-up crash.

Merge note: #1763 conflicts with #2626 in fits() (descriptor/host.rs). On top of #2626, typed_store no longer exists. I resolved it with #1763's target logic and a typed_store(format) that wraps crate::resource::format_support(format).contains(D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW).

cargo test -p victory-gpu --lib -- --test-threads=1 gives the same 2 failures with and without the two PRs on this card (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views; frame::waits_end_on_ticks_and_count_frames fails only when run in parallel). So the merge adds no regressions.

The run with the fixes then ended on a different failure: 0x887A0006 (hung) after a 4,820 ms submission of 25 lists, 135 distinct compute pipelines refused with 0x80070057 before it (wave64 compute on a 32-lane host, cf. #2688 / #1216). I'll report that separately once I have a diagnostics run.

AI use: run, merge and report by Claude Code (Claude Opus 5.5) on the reporter's machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7175326492 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7175326492). Originally posted by [regiumlepidi](https://github.com/regiumlepidi) on 2026-11-25T21:37:31Z. --- Run report: RTX 5070 Ti (16 GB, driver 617.42), Windows 11 26300, Ryzen 7 9800X3D. Retail Series 1.0.2.1. Release builds, default switches, full `translate --cache --pipelines` beforehand (27,160 pipelines: 23,127 made, 3,609 found in the library). | Build | Result | |---|---| | `main` `13f91ca` | device removed about 6 s after start (frame ~64), 0.2 s after `no host texture error=0x80070057 desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, ..., format: 115, flags: 1 }` → `0x887A0001` | | `main` `13f91ca` + #2626 (`d1dc7ad`) + #1763 (`73a602b`) | no `no host texture` line and no `0x887A0001`. Menus ran for ~2 min at 30 fps (frame 2048, 12,937 draws / 1,026 dispatches in the last log interval) | So on this card #2626 removes the B4G4R4A4 start-up crash. Merge note: #1763 conflicts with #2626 in `fits()` (`descriptor/host.rs`). On top of #2626, `typed_store` no longer exists. I resolved it with #1763's `target` logic and a `typed_store(format)` that wraps `crate::resource::format_support(format).contains(D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW)`. `cargo test -p victory-gpu --lib -- --test-threads=1` gives the same 2 failures with and without the two PRs on this card (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`; `frame::waits_end_on_ticks_and_count_frames` fails only when run in parallel). So the merge adds no regressions. The run with the fixes then ended on a different failure: `0x887A0006` (hung) after a 4,820 ms submission of 25 lists, 135 distinct compute pipelines refused with `0x80070057` before it (wave64 compute on a 32-lane host, cf. #2688 / #1216). I'll report that separately once I have a diagnostics run. _AI use: run, merge and report by Claude Code (Claude Opus 5.5) on the reporter's machine._
Marvisak commented 2026-11-25 23:06:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:15:43Z.


Automated triage for the maintainers.

Verdict: merge candidate. Thanks for the rebase, and to @steven-seagull27 for the readback tests. At c8cc83e, resource::target_format makes writable B5G5R5A1 (86) and B4G4R4A4 (115) textures R8G8B8A8_UNORM when CheckFeatureSupport reports no render-target or no typed-UAV support. The format is applied in host_desc, shared_texture, clear values, RtvRecord, pipeline RT formats and descriptor::host::fits.

This PR also handles the copy paths that held back #2767:

  • list.rs read_back repacks through texture::pack_row with a doubled footprint (host_footprint).
  • Buffer-to-texture uploads expand with expand_row.
  • Staging detile expands the texels.
  • alias_copy, copy_resource and resolve skip mixed layouts behind a one-time shortcut warning.

The conversions round-trip all 65,536 words in packed_colors_round_trip_with_their_alpha, and devices that support the formats are unchanged. The evidence is hardware runs on an RTX 3070 and an RTX 4070 SUPER, plus a WARP and RTX 5080 run of the new tests.

For the maintainers: this overlaps #89, #2767 and #2936, which widen the same formats, and #2773, which drops the refused uses instead. Only one direction should land.

CI: passing (check). Merges cleanly.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176139297 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7176139297). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:15:43Z. --- <!-- victory-triage v1 head=c8cc83e22702aa46dc1855c0f9df890fc5496238 verdict=merge-candidate at=2026-11-26T03:24:40Z --> Automated triage for the maintainers. **Verdict: merge candidate.** Thanks for the rebase, and to @steven-seagull27 for the readback tests. At `c8cc83e`, `resource::target_format` makes writable B5G5R5A1 (86) and B4G4R4A4 (115) textures R8G8B8A8_UNORM when `CheckFeatureSupport` reports no render-target or no typed-UAV support. The format is applied in `host_desc`, `shared_texture`, clear values, `RtvRecord`, pipeline RT formats and `descriptor::host::fits`. This PR also handles the copy paths that held back #2767: - `list.rs` `read_back` repacks through `texture::pack_row` with a doubled footprint (`host_footprint`). - Buffer-to-texture uploads expand with `expand_row`. - `Staging` detile expands the texels. - `alias_copy`, `copy_resource` and `resolve` skip mixed layouts behind a one-time `shortcut` warning. The conversions round-trip all 65,536 words in `packed_colors_round_trip_with_their_alpha`, and devices that support the formats are unchanged. The evidence is hardware runs on an RTX 3070 and an RTX 4070 SUPER, plus a WARP and RTX 5080 run of the new tests. For the maintainers: this overlaps #89, #2767 and #2936, which widen the same formats, and #2773, which drops the refused uses instead. Only one direction should land. CI: passing (`check`). Merges cleanly. --- _Generated by [Claude Code](https://claude.ai/code)_
steven-seagull27 commented 2026-11-26 02:07:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by steven-seagull27 on 2026-11-26T01:34:08Z.


@moe-miau I rebased your commit onto upstream 63bcca43 for the conflict reported by triage. The conflict was between adjacent tests in resource.rs. Both sides' tests are present, and git range-diff shows only the change in surrounding context. Your commit keeps its original author. Rebased commit

I also put two optional GPU readback tests in a separate commit. They upload a 7×4 packed texture from a padded guest buffer, clear one texel to transparent red, then copy a 4×3 rectangle back to an offset inside a different footprint. They check all 4,096 bytes, including untouched texels and row padding. The clear has an independent expected guest value, 0x0f00 for B4G4R4A4 and 0x7c00 for B5G5R5A1. Regression tests

D3D12 adapter Current main + tests Rebased PR + tests
RTX 5080, driver 621.40 Both fail before the copy. The chosen native formats lack the requested combination of render-target and typed-UAV support. Both use RGBA8 and match every byte, 3/3 runs each.
Windows built-in WARP Both pass with the native packed formats. Both retain their native formats and match every byte, 3/3 runs each.

Both adapters ran with the D3D12 debug layer. The all-feature GPU library suite, excluding the new tests and one presentation test that terminated the process on both revisions, went from 243 to 247 passes on RTX and 245 to 249 passes on WARP. The same two existing descriptor/memory tests failed on RTX on both revisions. Strict GPU Clippy and the asset-policy check passed.

To try the tested combination on a fresh local branch:

git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2626-packed-readback
git switch -c verify-2626 FETCH_HEAD
cargo test -p victory-gpu --all-features --lib packed_copy_tests -- --nocapture

The branch codex/pr2626-packed-forward contains just your rebased change. This was a synthetic D3D12 check. The in-game evidence remains the runs already posted above.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7179902830 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7179902830). Originally posted by [steven-seagull27](https://github.com/steven-seagull27) on 2026-11-26T01:34:08Z. --- @moe-miau I rebased your commit onto upstream `63bcca43` for the conflict reported by triage. The conflict was between adjacent tests in `resource.rs`. Both sides' tests are present, and `git range-diff` shows only the change in surrounding context. Your commit keeps its original author. [Rebased commit](https://github.com/steven-seagull27/VIctory/commit/6796b742126806f446722d6641b8ac2eb0ecc48b) I also put two optional GPU readback tests in a separate commit. They upload a 7×4 packed texture from a padded guest buffer, clear one texel to transparent red, then copy a 4×3 rectangle back to an offset inside a different footprint. They check all 4,096 bytes, including untouched texels and row padding. The clear has an independent expected guest value, `0x0f00` for B4G4R4A4 and `0x7c00` for B5G5R5A1. [Regression tests](https://github.com/steven-seagull27/VIctory/commit/c8cc83e22702aa46dc1855c0f9df890fc5496238) | D3D12 adapter | Current main + tests | Rebased PR + tests | |---|---|---| | RTX 5080, driver 621.40 | Both fail before the copy. The chosen native formats lack the requested combination of render-target and typed-UAV support. | Both use RGBA8 and match every byte, 3/3 runs each. | | Windows built-in WARP | Both pass with the native packed formats. | Both retain their native formats and match every byte, 3/3 runs each. | Both adapters ran with the D3D12 debug layer. The all-feature GPU library suite, excluding the new tests and one presentation test that terminated the process on both revisions, went from 243 to 247 passes on RTX and 245 to 249 passes on WARP. The same two existing descriptor/memory tests failed on RTX on both revisions. Strict GPU Clippy and the asset-policy check passed. To try the tested combination on a fresh local branch: ```sh git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2626-packed-readback git switch -c verify-2626 FETCH_HEAD cargo test -p victory-gpu --all-features --lib packed_copy_tests -- --nocapture ``` The branch `codex/pr2626-packed-forward` contains just your rebased change. This was a synthetic D3D12 check. The in-game evidence remains the runs already posted above. AI-assisted with Codex.
moe-miau commented 2026-11-26 02:07:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by moe-miau on 2026-11-26T01:50:53Z.


@steven-seagull27 Thanks, taken as is: 6796b74 (rebased onto 63bcca4) and your tests c8cc83e, now the head of this PR. On an RTX 4070 SUPER: cargo test -p victory-gpu --all-features --lib packed_copy_tests 2 passed; cargo test -p victory-gpu --lib 235 passed, 2 failed (the two heap-cap tests #2628 fixes, failing on main here too); strict clippy and the asset policy clean.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180199162 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7180199162). Originally posted by [moe-miau](https://github.com/moe-miau) on 2026-11-26T01:50:53Z. --- @steven-seagull27 Thanks, taken as is: `6796b74` (rebased onto `63bcca4`) and your tests `c8cc83e`, now the head of this PR. On an RTX 4070 SUPER: `cargo test -p victory-gpu --all-features --lib packed_copy_tests` 2 passed; `cargo test -p victory-gpu --lib` 235 passed, 2 failed (the two heap-cap tests #2628 fixes, failing on `main` here too); strict clippy and the asset policy clean.
walterwallaceson commented 2026-11-26 03:05:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by walterwallaceson on 2026-11-26T03:02:50Z.


RTX 3070 on Windows 10, main 63bcca4 + #463: the fix holds on c8cc83e. The format 115 target (2560x1440) is created, and the no host texture refusal is gone. On this card the refusal never removed the device, so without the PR nothing crashes, and the target is simply missing.

Setup: RTX 3070 8 GB, driver 621.14, Windows 10 22H2 (19045). main 63bcca4 + #463 (Agility SDK runtime, needed on Windows 10), then + this PR at c8cc83e (a clean merge). Diag build, scripted Enter at 17, 30 and 60 s, nothing skipped, 15-minute runs, one run each.

main + #463 + this PR
no host texture ... format: 115 (2560x1440) once, at start none
end 15 min, no removal 15 min, no removal
world reached (draws/frame over 1,000) ~1.5 min ~1.5 min
world speed, end 0.9 fps (max 1.2) 1.8 fps (max 2)
copies/frame, end 228 ms 41 ms
slow submissions 2, slowest 1,011 ms 1, slowest 1,346 ms

A correction to what I saw earlier: in one earlier run without the PR the title stayed on its first screen, but that was a missed key press, not this bug. With the extra presses, both builds reach the world. The speed and copy differences come from one run each, so I wouldn't read much into them yet.

Not tested: a second run of each; whether the picture differs. The recordings are mostly dark on this setup either way.

No game data attached. I'm testing with Claude's help, and Claude drafted this comment.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7181347208 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7181347208). Originally posted by [walterwallaceson](https://github.com/walterwallaceson) on 2026-11-26T03:02:50Z. --- **RTX 3070 on Windows 10, `main` `63bcca4` + #463: the fix holds on `c8cc83e`. The format 115 target (2560x1440) is created, and the `no host texture` refusal is gone. On this card the refusal never removed the device, so without the PR nothing crashes, and the target is simply missing.** **Setup:** RTX 3070 8 GB, driver 621.14, Windows 10 22H2 (19045). `main` `63bcca4` + #463 (Agility SDK runtime, needed on Windows 10), then + this PR at `c8cc83e` (a clean merge). Diag build, scripted Enter at 17, 30 and 60 s, nothing skipped, 15-minute runs, one run each. | | `main` + #463 | + this PR | |---|---|---| | `no host texture ... format: 115` (2560x1440) | once, at start | none | | end | 15 min, no removal | 15 min, no removal | | world reached (draws/frame over 1,000) | ~1.5 min | ~1.5 min | | world speed, end | 0.9 fps (max 1.2) | 1.8 fps (max 2) | | copies/frame, end | 228 ms | 41 ms | | slow submissions | 2, slowest 1,011 ms | 1, slowest 1,346 ms | A correction to what I saw earlier: in one earlier run without the PR the title stayed on its first screen, but that was a missed key press, not this bug. With the extra presses, both builds reach the world. The speed and copy differences come from one run each, so I wouldn't read much into them yet. Not tested: a second run of each; whether the picture differs. The recordings are mostly dark on this setup either way. No game data attached. I'm testing with Claude's help, and Claude drafted this comment.
TheGrayOrange commented 2026-11-26 05:04:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TheGrayOrange on 2026-11-26T04:46:23Z.


Tested c8cc83e on RTX 4070 Ti SUPER, driver 621.24, with D3D12 validation enabled.

Both existing packed_copy_tests passed. Confirmed formats 115 and 86 used RGBA8 backing, with exact packed readback across all 4,096 guest bytes per test, including untouched padding. Zero D3D12 validation errors.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7182889554 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7182889554). Originally posted by [TheGrayOrange](https://github.com/TheGrayOrange) on 2026-11-26T04:46:23Z. --- Tested `c8cc83e` on RTX 4070 Ti SUPER, driver 621.24, with D3D12 validation enabled. Both existing `packed_copy_tests` passed. Confirmed formats 115 and 86 used RGBA8 backing, with exact packed readback across all 4,096 guest bytes per test, including untouched padding. Zero D3D12 validation errors.
Dukestar69 commented 2026-11-26 05:09:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T05:09:42Z.

Review: APPROVED


Tested merged onto origin/main (63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP):

  • cargo test -p victory-gpu --lib list::packed_copy_tests: 2 passed, 0 failed on RTX 5090 hardware (b5g5r5a1_partial_copy_preserves_guest_texels_and_padding and b4g4r4a4_partial_copy_preserves_guest_texels_and_padding).
  • VICTORY_WARP=1 cargo test -p victory-gpu --lib list::packed_copy_tests: 2 passed, 0 failed.
  • cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.
  • cargo xtask policy: 192 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6068850327 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#pullrequestreview-6068850327). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T05:09:42Z. **Review:** APPROVED --- Tested merged onto `origin/main` (`63bcca4`) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP): - `cargo test -p victory-gpu --lib list::packed_copy_tests`: **2 passed, 0 failed** on RTX 5090 hardware (`b5g5r5a1_partial_copy_preserves_guest_texels_and_padding` and `b4g4r4a4_partial_copy_preserves_guest_texels_and_padding`). - `VICTORY_WARP=1 cargo test -p victory-gpu --lib list::packed_copy_tests`: **2 passed, 0 failed**. - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 192 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
evan-kolberg commented 2026-11-26 09:06:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by evan-kolberg on 2026-11-26T08:55:27Z.


An Apple GPU result for c8cc83e. I adapted the production patch and the two existing packed_copy_tests to VIctory-macOS 08f76ef and ran them on an M4 Pro with CrossOver 26.3.0.39832 and D3DMetal 4.0 beta 3. The guest process mapped that D3DMetal build.

  • Formats 86 and 115 both selected host format 28. Each test matched all 4,096 guest bytes after the partial upload, independent RTV clear, and cropped readback, including padding.
  • A generated placed format-86 resource reached a real host descriptor with both explicit view format 86 and inferred format 0. D3DMetal reported Support1=0x1e4d3ff for 86 and 0x3ecd3ff for the selected format 28.
  • I also dispatched a generated compute shader through both placed UAV slots and used VIctory's production texture readback. All 16 texels in the explicit view returned guest word 0x7c00. All 16 in the inferred view returned 0x83ff. The padded 2,048-byte buffer matched exactly.

This covers the widened typed shader write as well as the existing transfer regression on a separate backend. All three test invocations used generated inputs. An in-game comparison of the patched runner is still pending. Tested and summarized with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7187188823 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7187188823). Originally posted by [evan-kolberg](https://github.com/evan-kolberg) on 2026-11-26T08:55:27Z. --- An Apple GPU result for `c8cc83e`. I adapted the production patch and the two existing `packed_copy_tests` to VIctory-macOS `08f76ef` and ran them on an M4 Pro with CrossOver 26.3.0.39832 and D3DMetal 4.0 beta 3. The guest process mapped that D3DMetal build. - Formats 86 and 115 both selected host format 28. Each test matched all 4,096 guest bytes after the partial upload, independent RTV clear, and cropped readback, including padding. - A generated placed format-86 resource reached a real host descriptor with both explicit view format 86 and inferred format 0. D3DMetal reported `Support1=0x1e4d3ff` for 86 and `0x3ecd3ff` for the selected format 28. - I also dispatched a generated compute shader through both placed UAV slots and used VIctory's production texture readback. All 16 texels in the explicit view returned guest word `0x7c00`. All 16 in the inferred view returned `0x83ff`. The padded 2,048-byte buffer matched exactly. This covers the widened typed shader write as well as the existing transfer regression on a separate backend. All three test invocations used generated inputs. An in-game comparison of the patched runner is still pending. Tested and summarized with Codex.
loren2000vlort-cmd commented 2026-11-26 11:04:05 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by loren2000vlort-cmd on 2026-11-26T10:55:55Z.


Independent test report: RTX 3060 (Ampere, GA106), unit tests only, no game files.

The #1952 reporter has the same card model. Nothing below was run in the title.

Setup

  • NVIDIA GeForce RTX 3060 12 GB, driver 621.40. It is the only adapter in this machine.
  • Windows 11 Pro 25H2 (build 26200.9974), Ryzen 5 5600X, 16 GB RAM.
  • Rust 1.98.1 (cargo +stable, which is the pinned 1.98.1), MSVC, Windows SDK 10.0.26100.0.
  • This PR at c8cc83e, and upstream main at 63bcca4 (this PR's base) as the control. Each was in its own worktree.
  • All commands below were run in Git Bash on Windows.

1. This PR's six tests (c8cc83e)

Run Result
CPU only 3 passed, 0 failed
WARP 7 passed, 0 failed
RTX 3060 7 passed, 0 failed

CPU only:

cargo +stable test -p victory-gpu --lib --locked -j 6 -- packed_targets_require_both_writable_uses only_expanded_packed_texels_use_the_stand_in packed_colors_round_trip_with_their_alpha

WARP:

VICTORY_D3D12_WARP=1 cargo +stable test -p victory-gpu --all-features --lib --locked -j 6 -- packed_ --test-threads=1 --nocapture

Real RTX 3060:

env -u VICTORY_D3D12_WARP cargo +stable test -p victory-gpu --all-features --lib --locked -j 6 -- packed_ --test-threads=1 --nocapture
  • All six of the PR's tests passed on WARP and on the card:
    • list::packed_copy_tests::b4g4r4a4_partial_copy_preserves_guest_texels_and_padding
    • list::packed_copy_tests::b5g5r5a1_partial_copy_preserves_guest_texels_and_padding
    • resource::tests::packed_textures_keep_the_guest_layout_until_writable
    • resource::tests::packed_targets_require_both_writable_uses
    • resource::tests::only_expanded_packed_texels_use_the_stand_in
    • texture::tests::packed_colors_round_trip_with_their_alpha
  • The packed_ filter also matched capture::tests::packed_float_classifies_special_and_finite_values, which is already on main. That is the seventh test.
  • With --nocapture, no "skipping … (no D3D12 device)" line was printed, so the device-dependent tests did run.

2. Regression check: full victory-gpu library suite on the RTX 3060

cargo +stable test -p victory-gpu --lib --locked -j 6 -- --test-threads=1, the same command on both trees:

main 63bcca4 this PR c8cc83e
tests in suite (including ignored) 232 238
passed / failed / ignored 229 / 2 / 1 235 / 2 / 1
exit code 101 101
  • Comparing by test name: all 232 tests that exist on both sides have the same outcome. The only additions are this PR's six tests, and all six pass. No test disappeared.
  • The ignored test is object::tests::benchmark_private_data_release on both sides (#[ignore]).
  • The same two tests fail on both sides, with the same messages:
    • descriptor::host::tests::dynamic_slots_are_held_until_released: assertion failed: heap.heap.GetDesc().NumDescriptors >= victory_shader::emit::HEAP_VIEWS. The assertion is at descriptor/host.rs:2226 on main and :2210 here, because this PR removes lines above it in that file.
    • memory::tests::lists_share_a_table_and_copies_keep_their_views: past the dynamic slots (memory.rs:1030 on both).
  • git diff 63bcca4 c8cc83e does not touch memory.rs, HostHeap::new, the dynamic-slot sizing, or these two tests. They are the capped-view-heap failures already reported on other NVIDIA cards (#1744, #747), not caused by this PR.
  • No device removal in any run. The System event log showed no nvlddmkm, Display, dxgkrnl or TDR events during the runs.

Not measured

  • The title: no run in game, so this does not show whether the #1952 crash is gone on this card.
  • The raw CheckFeatureSupport flags for formats 86 and 115 on this GPU. The tests do not print them. b4g4r4a4_partial_copy_… only asserts that the format the host ends up using supports both render-target and typed-UAV access, and that check passed.
  • The exact size of the view heap the host created. The failing assertion shows only that it is smaller than HEAP_VIEWS.

AI-assisted (Claude Code). The runs are mine, on my machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7190030197 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7190030197). Originally posted by [loren2000vlort-cmd](https://github.com/loren2000vlort-cmd) on 2026-11-26T10:55:55Z. --- **Independent test report: RTX 3060 (Ampere, GA106), unit tests only, no game files.** The #1952 reporter has the same card model. Nothing below was run in the title. **Setup** - NVIDIA GeForce RTX 3060 12 GB, driver 621.40. It is the only adapter in this machine. - Windows 11 Pro 25H2 (build 26200.9974), Ryzen 5 5600X, 16 GB RAM. - Rust 1.98.1 (`cargo +stable`, which is the pinned 1.98.1), MSVC, Windows SDK 10.0.26100.0. - This PR at `c8cc83e`, and upstream `main` at `63bcca4` (this PR's base) as the control. Each was in its own worktree. - All commands below were run in Git Bash on Windows. **1. This PR's six tests (`c8cc83e`)** | Run | Result | |---|---| | CPU only | 3 passed, 0 failed | | WARP | 7 passed, 0 failed | | RTX 3060 | 7 passed, 0 failed | CPU only: ```bash cargo +stable test -p victory-gpu --lib --locked -j 6 -- packed_targets_require_both_writable_uses only_expanded_packed_texels_use_the_stand_in packed_colors_round_trip_with_their_alpha ``` WARP: ```bash VICTORY_D3D12_WARP=1 cargo +stable test -p victory-gpu --all-features --lib --locked -j 6 -- packed_ --test-threads=1 --nocapture ``` Real RTX 3060: ```bash env -u VICTORY_D3D12_WARP cargo +stable test -p victory-gpu --all-features --lib --locked -j 6 -- packed_ --test-threads=1 --nocapture ``` - All six of the PR's tests passed on WARP and on the card: - `list::packed_copy_tests::b4g4r4a4_partial_copy_preserves_guest_texels_and_padding` - `list::packed_copy_tests::b5g5r5a1_partial_copy_preserves_guest_texels_and_padding` - `resource::tests::packed_textures_keep_the_guest_layout_until_writable` - `resource::tests::packed_targets_require_both_writable_uses` - `resource::tests::only_expanded_packed_texels_use_the_stand_in` - `texture::tests::packed_colors_round_trip_with_their_alpha` - The `packed_` filter also matched `capture::tests::packed_float_classifies_special_and_finite_values`, which is already on `main`. That is the seventh test. - With `--nocapture`, no "skipping … (no D3D12 device)" line was printed, so the device-dependent tests did run. **2. Regression check: full `victory-gpu` library suite on the RTX 3060** `cargo +stable test -p victory-gpu --lib --locked -j 6 -- --test-threads=1`, the same command on both trees: | | `main` `63bcca4` | this PR `c8cc83e` | |---|---|---| | tests in suite (including ignored) | 232 | 238 | | passed / failed / ignored | 229 / 2 / 1 | 235 / 2 / 1 | | exit code | 101 | 101 | - Comparing by test name: all 232 tests that exist on both sides have **the same outcome**. The only additions are this PR's six tests, and all six pass. No test disappeared. - The ignored test is `object::tests::benchmark_private_data_release` on both sides (`#[ignore]`). - The same two tests fail on both sides, with the same messages: - `descriptor::host::tests::dynamic_slots_are_held_until_released`: `assertion failed: heap.heap.GetDesc().NumDescriptors >= victory_shader::emit::HEAP_VIEWS`. The assertion is at `descriptor/host.rs:2226` on `main` and `:2210` here, because this PR removes lines above it in that file. - `memory::tests::lists_share_a_table_and_copies_keep_their_views`: `past the dynamic slots` (`memory.rs:1030` on both). - `git diff 63bcca4 c8cc83e` does not touch `memory.rs`, `HostHeap::new`, the dynamic-slot sizing, or these two tests. They are the capped-view-heap failures already reported on other NVIDIA cards (#1744, #747), not caused by this PR. - No device removal in any run. The System event log showed no `nvlddmkm`, `Display`, `dxgkrnl` or TDR events during the runs. **Not measured** - The title: no run in game, so this does not show whether the #1952 crash is gone on this card. - The raw `CheckFeatureSupport` flags for formats 86 and 115 on this GPU. The tests do not print them. `b4g4r4a4_partial_copy_…` only asserts that the format the host ends up using supports both render-target and typed-UAV access, and that check passed. - The exact size of the view heap the host created. The failing assertion shows only that it is smaller than `HEAP_VIEWS`. AI-assisted (Claude Code). The runs are mine, on my machine.
fuzeofficlal commented 2026-11-26 11:15:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T11:15:35Z.

Review: APPROVED


Reviewed the packed 16-bit writable colour target fallback across resource creation, footprints, staging/copy paths, views, and pipeline state at c8cc83e2.

  • packed_target_format only substitutes RGBA8_UNORM for B5G5R5A1_UNORM (86) and B4G4R4A4_UNORM (115) when the texture is writable (TARGET | UNORDERED) and the host lacks either RENDER_TARGET or TYPED_UNORDERED_ACCESS_VIEW, keeping read-only packed textures in their guest layout.
  • All copy, readback, and resolve entry points in list.rs materialize host_resource(...) before querying packed_format(...), and host_footprint / region copy scaling (at * 2, n * 2, doubled 256-byte-aligned row pitch) stay consistent with the expanded 4-byte texels.
  • expand_row / pack_row preserve channel order and alpha rounding across all 65,536 u16 values, Staging::detile handles the final unpadded row safely, Staging::maybe_changed avoids clobbering GPU-written stand-ins, and RtvRecord, fits, view_format, clear values, memory_key, and GraphicsState all match the stand-in format.

Verified locally on Windows 11 with both RTX 5090 and WARP (VICTORY_D3D12_WARP=1 + --features diagnostics) under VICTORY_D3D12_DEBUG=1:

  • cargo xtask policy (192 files ok) and cargo clippy -p victory-gpu --tests -- -D warnings (default and --all-features): clean.
  • RTX 5090 (default and Debug Layer): list::packed_copy_tests 2/2, texture:: 3/3, resource:: 21/21, draw::tests:: 20/20, descriptor:: 21/21 passed with no Debug Layer warnings.
  • WARP + Debug Layer: list::packed_copy_tests 2/2, texture:: 3/3, resource:: 21/21, draw::tests:: 20/20 passed.
<!-- greyfinch-sync:Marvisak/VIctory:review:6073184353 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#pullrequestreview-6073184353). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T11:15:35Z. **Review:** APPROVED --- Reviewed the packed 16-bit writable colour target fallback across resource creation, footprints, staging/copy paths, views, and pipeline state at `c8cc83e2`. - `packed_target_format` only substitutes `RGBA8_UNORM` for `B5G5R5A1_UNORM` (86) and `B4G4R4A4_UNORM` (115) when the texture is writable (`TARGET | UNORDERED`) and the host lacks either `RENDER_TARGET` or `TYPED_UNORDERED_ACCESS_VIEW`, keeping read-only packed textures in their guest layout. - All copy, readback, and resolve entry points in `list.rs` materialize `host_resource(...)` before querying `packed_format(...)`, and `host_footprint` / region copy scaling (`at * 2`, `n * 2`, doubled 256-byte-aligned row pitch) stay consistent with the expanded 4-byte texels. - `expand_row` / `pack_row` preserve channel order and alpha rounding across all 65,536 `u16` values, `Staging::detile` handles the final unpadded row safely, `Staging::maybe_changed` avoids clobbering GPU-written stand-ins, and `RtvRecord`, `fits`, `view_format`, clear values, `memory_key`, and `GraphicsState` all match the stand-in format. Verified locally on Windows 11 with both RTX 5090 and WARP (`VICTORY_D3D12_WARP=1` + `--features diagnostics`) under `VICTORY_D3D12_DEBUG=1`: - `cargo xtask policy` (`192 files ok`) and `cargo clippy -p victory-gpu --tests -- -D warnings` (default and `--all-features`): clean. - RTX 5090 (default and Debug Layer): `list::packed_copy_tests` 2/2, `texture::` 3/3, `resource::` 21/21, `draw::tests::` 20/20, `descriptor::` 21/21 passed with no Debug Layer warnings. - WARP + Debug Layer: `list::packed_copy_tests` 2/2, `texture::` 3/3, `resource::` 21/21, `draw::tests::` 20/20 passed.
ChenmouXu commented 2026-11-26 13:04:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-26T12:57:33Z.


问题

B5G5R5A1_UNORM(86) 和 (115) 在 NVIDIA 上没有输入的无序访问权限,也不是渲染目标格式。 移除主机拒绝的纹理,下一次提交时该设备被移除。这是 #1952、#1781 和 #2024(RTX 3060、3070、4090)的崩溃。B4G4R4A4_UNORM``B4G4R4A4``main

在 RTX 4070 SUPER 上,+ #1906 + #2098 在起始 30 秒后 0.2 秒后报废:main``67e8ae1``0x887A0004

no host texture error=The parameter is incorrect. (0x80070057) desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, ..., format: 115, ...

变化

当设备缺少对这两种格式之一的渲染目标或类型无人机支持时(),其可写入纹理将被制作为 ,其视图和流水线渲染目标格式随后出现。CheckFeatureSupport``R8G8B8A8_UNORM

  • 替身由客座格式为关键,因此两种布局从不共享纹理。
  • 从标题内存上传并回读到其上,会在打包布局和 RGBA8 之间转换纹素( /)。texture::expand_row``pack_row
  • 在已打包布局中,将临时与纹理之间的 GPU 复制或解析会被跳过,并带有一次性警告(快捷方式)。
  • 支持这些格式的设备保持不变。

由 Zettrox/ztrx(commit)移植而来,基于 fxceless/victory-fork。两者均为GPL-3.0或更高版本。与 fork 相比,这增加了上传和回读时的纹素转换,以及按格式键转换。578d459

经过测试

RTX 4070 SUPER,驱动 32.0.16.1742,Windows 11 26300。标题 1.0.2.1,Series X 配置文件,诊断版本。按脚本回车进入开场动画;每次6分钟跑步。

结果
67e8ae1 + #1906 + #2098 在 Format-115 目标被拒绝后,设备于 30 秒()时移除0x887A0004
相同 + 此 PR(及堆夹 PR) 6分钟内没有移除,世界抵达
在将评测中的修复内容整合进(head),进行了第二次6分钟运行:没有设备移除,0(基座有1个,目标格式为115),141条计算流水线被拒绝(关于程序#189)。在这个栈每帧大约 8 秒处,世界保持黑色,因为它省略了 #2178(结构化视图为原始视图),它不再与 合并。d1dc7ad``no host texture``WaveSize(64)``main

  • cargo test -p victory-gpu --locked:197已通过。2 失败:和 ,与这张卡上的相同。新的测试涵盖了两种格式的格式决策以及双向的纹素转换,包括 alpha 在内。dynamic_slots_are_held_until_released``lists_share_a_table_and_copies_keep_their_views``main
  • cargo clippy --workspace --all-targets --locked -- -D warnings,也与 : clean 一起。:好的。--all-features``cargo xtask policy

AI辅助(Claude Code,并由Codex审核)。运行都是在我的机器上完成的。

🤖 使用 Claude Code 生成

A stacked branch for 50-series: main + #2626 + #1763 + #2178 + #2098

The two 50-series recipes in this thread now differ by exactly one PR, and it is the one about the picture rather than the crash:

  • regiumlepidi (5070 Ti): 13f91ca + #2626 + #1763 + #1906 + #2098 -- 3.5 min into the intro cutscene, no removal.
  • JurajSimicevic (5080): main + #1763 + #2178, program A of #1968 skipped -- the targets move but the presented image does not (depth dumps differ by 57.9 between frames while the 2560x1440 lit target, the TAA output and the presented image differ by 10.8).

So the first set gets you in, and #2178 is what makes the picture actually follow. #2178's own description is the reason: on NVIDIA, rawBufferLoad against a StructuredBuffer descriptor multiplies the byte offset by StructureByteStride and returns zeros past width / stride. Zeros from a buffer read is exactly what a black or frozen frame looks like from the outside, and it would explain both reports above.

#1906 is merged now, so the set is #2626 + #1763 + #2178 + #2098 on current main. Three of the four are small (#1763, #2098 one file each; #2178 six files); #2626 is the nine-file one.

Would someone with all four in front of them push one branch? moe-miau has #2626 and #2098, n-romanovich has #2178, and both branches are based on main, so a linear stack should not need code decisions from me -- just order and a rebase.

I will run it here on an RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074): diag build, DRED on, full debug-layer log, and I will report frame times plus a per-frame luminance series, because the failure on this card is not only the removal but a picture that alternates black and drawn for seconds at a time. A branch name in this thread is enough.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7192684415 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7192684415). Originally posted by [ChenmouXu](https://github.com/ChenmouXu) on 2026-11-26T12:57:33Z. --- > ## 问题 > `B5G5R5A1_UNORM`(86) 和 (115) 在 NVIDIA 上没有输入的无序访问权限,也不是渲染目标格式。 移除主机拒绝的纹理,下一次提交时该设备被移除。这是 #1952、#1781 和 #2024(RTX 3060、3070、4090)的崩溃。`B4G4R4A4_UNORM``B4G4R4A4``main` > > 在 RTX 4070 SUPER 上,+ #1906 + #2098 在起始 30 秒后 0.2 秒后报废:`main``67e8ae1``0x887A0004` > > ``` > no host texture error=The parameter is incorrect. (0x80070057) desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, ..., format: 115, ... > ``` > > ## 变化 > 当设备缺少对这两种格式之一的渲染目标或类型无人机支持时(),其可写入纹理将被制作为 ,其视图和流水线渲染目标格式随后出现。`CheckFeatureSupport``R8G8B8A8_UNORM` > > * 替身由客座格式为关键,因此两种布局从不共享纹理。 > * 从标题内存上传并回读到其上,会在打包布局和 RGBA8 之间转换纹素( /)。`texture::expand_row``pack_row` > * 在已打包布局中,将临时与纹理之间的 GPU 复制或解析会被跳过,并带有一次性警告(快捷方式)。 > * 支持这些格式的设备保持不变。 > > 由 [Zettrox/ztrx](https://github.com/Zettrox/ztrx)(commit)移植而来,基于 [fxceless/victory-fork](https://github.com/fxceless/victory-fork)。两者均为GPL-3.0或更高版本。与 fork 相比,这增加了上传和回读时的纹素转换,以及按格式键转换。`578d459` > > ## 经过测试 > RTX 4070 SUPER,驱动 32.0.16.1742,Windows 11 26300。标题 1.0.2.1,Series X 配置文件,诊断版本。按脚本回车进入开场动画;每次6分钟跑步。 > > 结果 > `67e8ae1` + #1906 + #2098 在 Format-115 目标被拒绝后,设备于 30 秒()时移除`0x887A0004` > 相同 + 此 PR(及堆夹 PR) 6分钟内没有移除,世界抵达 > 在将评测中的修复内容整合进(head),进行了第二次6分钟运行:没有设备移除,0(基座有1个,目标格式为115),141条计算流水线被拒绝(关于[程序#189](https://github.com/Marvisak/VIctory/pull/189))。在这个栈每帧大约 8 秒处,世界保持黑色,因为它省略了 #2178(结构化视图为原始视图),它不再与 合并。`d1dc7ad``no host texture``WaveSize(64)``main` > > * `cargo test -p victory-gpu --locked`:197已通过。2 失败:和 ,与这张卡上的相同。新的测试涵盖了两种格式的格式决策以及双向的纹素转换,包括 alpha 在内。`dynamic_slots_are_held_until_released``lists_share_a_table_and_copies_keep_their_views``main` > * `cargo clippy --workspace --all-targets --locked -- -D warnings`,也与 : clean 一起。:好的。`--all-features``cargo xtask policy` > > AI辅助(Claude Code,并由Codex审核)。运行都是在我的机器上完成的。 > > 🤖 使用 [Claude Code](https://claude.com/claude-code) 生成 A stacked branch for 50-series: `main` + #2626 + #1763 + #2178 + #2098 The two 50-series recipes in this thread now differ by exactly one PR, and it is the one about the picture rather than the crash: - regiumlepidi (5070 Ti): `13f91ca + #2626 + #1763 + #1906 + #2098` -- 3.5 min into the intro cutscene, no removal. - JurajSimicevic (5080): `main + #1763 + #2178`, program A of #1968 skipped -- the targets move but the presented image does not (depth dumps differ by 57.9 between frames while the 2560x1440 lit target, the TAA output and the presented image differ by 10.8). So the first set gets you in, and #2178 is what makes the picture actually follow. #2178's own description is the reason: on NVIDIA, `rawBufferLoad` against a `StructuredBuffer` descriptor multiplies the byte offset by `StructureByteStride` and returns zeros past `width / stride`. Zeros from a buffer read is exactly what a black or frozen frame looks like from the outside, and it would explain both reports above. #1906 is merged now, so the set is #2626 + #1763 + #2178 + #2098 on current main. Three of the four are small (#1763, #2098 one file each; #2178 six files); #2626 is the nine-file one. Would someone with all four in front of them push one branch? `moe-miau` has #2626 and #2098, `n-romanovich` has #2178, and both branches are based on main, so a linear stack should not need code decisions from me -- just order and a rebase. I will run it here on an RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074): diag build, DRED on, full debug-layer log, and I will report frame times plus a per-frame luminance series, because the failure on this card is not only the removal but a picture that alternates black and drawn for seconds at a time. A branch name in this thread is enough.
ChenmouXu commented 2026-11-26 15:02:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-26T14:34:27Z.


问题

B5G5R5A1_UNORM(86) 和 (115) 在 NVIDIA 上没有输入的无序访问权限,也不是渲染目标格式。 移除主机拒绝的纹理,下一次提交时该设备被移除。这是 #1952、#1781 和 #2024(RTX 3060、3070、4090)的崩溃。B4G4R4A4_UNORM``B4G4R4A4``main

在 RTX 4070 SUPER 上,+ #1906 + #2098 在起始 30 秒后 0.2 秒后报废:main``67e8ae1``0x887A0004

no host texture error=The parameter is incorrect. (0x80070057) desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, ..., format: 115, ...

变化

当设备缺少对这两种格式之一的渲染目标或类型无人机支持时(),其可写入纹理将被制作为 ,其视图和流水线渲染目标格式随后出现。CheckFeatureSupport``R8G8B8A8_UNORM

  • 替身由客座格式为关键,因此两种布局从不共享纹理。
  • 从标题内存上传并回读到其上,会在打包布局和 RGBA8 之间转换纹素( /)。texture::expand_row``pack_row
  • 在已打包布局中,将临时与纹理之间的 GPU 复制或解析会被跳过,并带有一次性警告(快捷方式)。
  • 支持这些格式的设备保持不变。

由 Zettrox/ztrx(commit)移植而来,基于 fxceless/victory-fork。两者均为GPL-3.0或更高版本。与 fork 相比,这增加了上传和回读时的纹素转换,以及按格式键转换。578d459

经过测试

RTX 4070 SUPER,驱动 32.0.16.1742,Windows 11 26300。标题 1.0.2.1,Series X 配置文件,诊断版本。按脚本回车进入开场动画;每次6分钟跑步。

结果
67e8ae1 + #1906 + #2098 在 Format-115 目标被拒绝后,设备于 30 秒()时移除0x887A0004
相同 + 此 PR(及堆夹 PR) 6分钟内没有移除,世界抵达
在将评测中的修复内容整合进(head),进行了第二次6分钟运行:没有设备移除,0(基座有1个,目标格式为115),141条计算流水线被拒绝(关于程序#189)。在这个栈每帧大约 8 秒处,世界保持黑色,因为它省略了 #2178(结构化视图为原始视图),它不再与 合并。d1dc7ad``no host texture``WaveSize(64)``main

  • cargo test -p victory-gpu --locked:197已通过。2 失败:和 ,与这张卡上的相同。新的测试涵盖了两种格式的格式决策以及双向的纹素转换,包括 alpha 在内。dynamic_slots_are_held_until_released``lists_share_a_table_and_copies_keep_their_views``main
  • cargo clippy --workspace --all-targets --locked -- -D warnings,也与 : clean 一起。:好的。--all-features``cargo xtask policy

AI辅助(Claude Code,并由Codex审核)。运行都是在我的机器上完成的。

🤖 使用 Claude Code 生成

On current main (63bcca4) this looks like the single remaining blocker for a visible picture

Machine: RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200. Title 1.0.2.1, Series X profile. Release build, no patches applied by hand -- the first time that is true here.

What main does now, after #2462 + #2286 + #1906:

  • Boots, menus and the loading screen at 30 fps, and it stays up. No device removal over a 4-minute run, and no VICTORY_KEYS needed to get in.
  • Reaches the world: 2,610 draws/frame, about 2,900 ms/frame.
  • The picture is pure black, and it does not flicker -- a single black image, not the alternating one this machine showed on the page-mapped fork yesterday.

The log has exactly one relevant line:

WARN victory_gpu::resource: no host texture error=... (0x80070057)
  desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, depth_or_array_size: 1,
  mip_levels: 1, format: 115, sample_count: 1, sample_quality: 0, layout: 0, flags: 1 }

So the B4G4R4A4_UNORM 2560x1440 render target is still refused, and as potatoe0100 said it is no longer fatal -- but nothing is drawn into it, so the world's output is black while 2,610 draws are submitted. That matches the geometry #841 describes from the other direction (targets that move, presented image that does not).

The view heap is still capped too (host view heap capped at 1000000 ... count=1245184), and that is not fatal either.

So #2626 looks like the one that turns this from "runs, black" into "runs, visible" here: an RGBA8 stand-in for the packed target is enough for a 2560x1440 surface that is only ever rendered into and then scaled.

If there is a branch with #2626 on current main, I will run it now: diag build available, DRED on, and I can report frame times, a capture of the presented image, and whether the black frame count changes.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7195014964 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7195014964). Originally posted by [ChenmouXu](https://github.com/ChenmouXu) on 2026-11-26T14:34:27Z. --- > ## 问题 > `B5G5R5A1_UNORM`(86) 和 (115) 在 NVIDIA 上没有输入的无序访问权限,也不是渲染目标格式。 移除主机拒绝的纹理,下一次提交时该设备被移除。这是 #1952、#1781 和 #2024(RTX 3060、3070、4090)的崩溃。`B4G4R4A4_UNORM``B4G4R4A4``main` > > 在 RTX 4070 SUPER 上,+ #1906 + #2098 在起始 30 秒后 0.2 秒后报废:`main``67e8ae1``0x887A0004` > > ``` > no host texture error=The parameter is incorrect. (0x80070057) desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, ..., format: 115, ... > ``` > > ## 变化 > 当设备缺少对这两种格式之一的渲染目标或类型无人机支持时(),其可写入纹理将被制作为 ,其视图和流水线渲染目标格式随后出现。`CheckFeatureSupport``R8G8B8A8_UNORM` > > * 替身由客座格式为关键,因此两种布局从不共享纹理。 > * 从标题内存上传并回读到其上,会在打包布局和 RGBA8 之间转换纹素( /)。`texture::expand_row``pack_row` > * 在已打包布局中,将临时与纹理之间的 GPU 复制或解析会被跳过,并带有一次性警告(快捷方式)。 > * 支持这些格式的设备保持不变。 > > 由 [Zettrox/ztrx](https://github.com/Zettrox/ztrx)(commit)移植而来,基于 [fxceless/victory-fork](https://github.com/fxceless/victory-fork)。两者均为GPL-3.0或更高版本。与 fork 相比,这增加了上传和回读时的纹素转换,以及按格式键转换。`578d459` > > ## 经过测试 > RTX 4070 SUPER,驱动 32.0.16.1742,Windows 11 26300。标题 1.0.2.1,Series X 配置文件,诊断版本。按脚本回车进入开场动画;每次6分钟跑步。 > > 结果 > `67e8ae1` + #1906 + #2098 在 Format-115 目标被拒绝后,设备于 30 秒()时移除`0x887A0004` > 相同 + 此 PR(及堆夹 PR) 6分钟内没有移除,世界抵达 > 在将评测中的修复内容整合进(head),进行了第二次6分钟运行:没有设备移除,0(基座有1个,目标格式为115),141条计算流水线被拒绝(关于[程序#189](https://github.com/Marvisak/VIctory/pull/189))。在这个栈每帧大约 8 秒处,世界保持黑色,因为它省略了 #2178(结构化视图为原始视图),它不再与 合并。`d1dc7ad``no host texture``WaveSize(64)``main` > > * `cargo test -p victory-gpu --locked`:197已通过。2 失败:和 ,与这张卡上的相同。新的测试涵盖了两种格式的格式决策以及双向的纹素转换,包括 alpha 在内。`dynamic_slots_are_held_until_released``lists_share_a_table_and_copies_keep_their_views``main` > * `cargo clippy --workspace --all-targets --locked -- -D warnings`,也与 : clean 一起。:好的。`--all-features``cargo xtask policy` > > AI辅助(Claude Code,并由Codex审核)。运行都是在我的机器上完成的。 > > 🤖 使用 [Claude Code](https://claude.com/claude-code) 生成 On current main (`63bcca4`) this looks like the single remaining blocker for a visible picture Machine: RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200. Title 1.0.2.1, Series X profile. Release build, no patches applied by hand -- the first time that is true here. What main does now, after #2462 + #2286 + #1906: - Boots, menus and the loading screen at 30 fps, and it stays up. No device removal over a 4-minute run, and no `VICTORY_KEYS` needed to get in. - Reaches the world: 2,610 draws/frame, about 2,900 ms/frame. - The picture is **pure black**, and it does **not** flicker -- a single black image, not the alternating one this machine showed on the page-mapped fork yesterday. The log has exactly one relevant line: ``` WARN victory_gpu::resource: no host texture error=... (0x80070057) desc=ResourceDesc { dimension: 3, width: 2560, height: 1440, depth_or_array_size: 1, mip_levels: 1, format: 115, sample_count: 1, sample_quality: 0, layout: 0, flags: 1 } ``` So the `B4G4R4A4_UNORM` 2560x1440 render target is still refused, and as potatoe0100 said it is no longer fatal -- but nothing is drawn into it, so the world's output is black while 2,610 draws are submitted. That matches the geometry #841 describes from the other direction (targets that move, presented image that does not). The view heap is still capped too (`host view heap capped at 1000000 ... count=1245184`), and that is not fatal either. So #2626 looks like the one that turns this from "runs, black" into "runs, visible" here: an RGBA8 stand-in for the packed target is enough for a 2560x1440 surface that is only ever rendered into and then scaled. If there is a branch with #2626 on current main, I will run it now: diag build available, DRED on, and I can report frame times, a capture of the presented image, and whether the black frame count changes.
ChenmouXu commented 2026-11-26 16:17:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-26T16:17:02Z.


This one is clean and green -- is it held for a reason, or just not scheduled?

mergeable: true, mergeable_state: clean, CI success on c8cc83e, nine files. No conflicts with 63bcca4.

On current main (63bcca4), an RTX 5070 Ti runs the title to the world with no device removal and no flicker, 2,610 draws/frame, and the picture is pure black. The only relevant line in the log is the 2560x1440 B4G4R4A4_UNORM target being refused. As much as anything, this PR is the difference between "runs, black" and "runs, visible" on 50-series -- the rest of the chain already merged.

Happy to run it as soon as it is in main.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7197436168 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7197436168). Originally posted by [ChenmouXu](https://github.com/ChenmouXu) on 2026-11-26T16:17:02Z. --- This one is clean and green -- is it held for a reason, or just not scheduled? `mergeable: true`, `mergeable_state: clean`, CI `success` on `c8cc83e`, nine files. No conflicts with `63bcca4`. On current main (`63bcca4`), an RTX 5070 Ti runs the title to the world with no device removal and no flicker, 2,610 draws/frame, and the picture is pure black. The only relevant line in the log is the 2560x1440 `B4G4R4A4_UNORM` target being refused. As much as anything, this PR is the difference between "runs, black" and "runs, visible" on 50-series -- the rest of the chain already merged. Happy to run it as soon as it is in `main`.
andrewpozdnakov7-jpg commented 2026-11-26 17:42:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T17:42:25Z.


I extended the existing partial copy and clear test to mip 1 of a synthetic 14×8 texture. It uploads the 7×4 mip, clears one texel through an RTV for mip 1, then reads a cropped region into an offset guest footprint. All 4,096 bytes matched for each of B5G5R5A1 and B4G4R4A4, including the surrounding padding. Test commit on c8cc83e

App-local WARP 1.0.22 / Agility 1.620.2 supports both packed formats directly. The same mip-1 test passed on 63bcca4 and on this branch with those capabilities. I used a temporary test-only format-support override to exercise the fallback: D3D12 created RGBA8 backing for both formats, and the four mip-0/mip-1 cases still matched every byte. The branch contains the mip test extension.

All eight packed tests and the full native-capability GPU suite passed (253 passed, 1 ignored). Both Clippy configurations and the asset policy passed. If taking the test, please retain its Git author or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> when folding it into another commit. AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7199493999 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7199493999). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T17:42:25Z. --- I extended the existing partial copy and clear test to mip 1 of a synthetic 14×8 texture. It uploads the 7×4 mip, clears one texel through an RTV for mip 1, then reads a cropped region into an offset guest footprint. All 4,096 bytes matched for each of B5G5R5A1 and B4G4R4A4, including the surrounding padding. [Test commit on `c8cc83e`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/6c599511e58d440759be8cfbf7864ab0326b5445) App-local WARP 1.0.22 / Agility 1.620.2 supports both packed formats directly. The same mip-1 test passed on `63bcca4` and on this branch with those capabilities. I used a temporary test-only format-support override to exercise the fallback: D3D12 created RGBA8 backing for both formats, and the four mip-0/mip-1 cases still matched every byte. The branch contains the mip test extension. All eight packed tests and the full native-capability GPU suite passed (253 passed, 1 ignored). Both Clippy configurations and the asset policy passed. If taking the test, please retain its Git author or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` when folding it into another commit. AI-assisted with Codex.
andrewpozdnakov7-jpg commented 2026-11-26 20:07:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T20:07:35Z.


I checked this head with #3340’s target-format variants in 5581f9f. Its keys use the formats actually passed to D3D12. The new CPU regression compares the translated graphics-stream key and the key from the recorded RTV. They agree for formats 86 and 115 both with native support and in a synthetic capability configuration where both use RGBA8 (28). Details and the standalone fix are on #3340.

If the two PRs land separately, this is a tested reference for the key handling in the second. Please preserve the Git author or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if you fold the test or resolution into another commit.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7202327939 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7202327939). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T20:07:35Z. --- I checked this head with #3340’s target-format variants in [`5581f9f`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/5581f9f9ed80a38b334b624f4ac4e444f30b377f). Its keys use the formats actually passed to D3D12. The new CPU regression compares the translated graphics-stream key and the key from the recorded RTV. They agree for formats 86 and 115 both with native support and in a synthetic capability configuration where both use RGBA8 (28). Details and the standalone fix are on [#3340](https://github.com/Marvisak/VIctory/pull/3340#issuecomment-7202321026). If the two PRs land separately, this is a tested reference for the key handling in the second. Please preserve the Git author or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if you fold the test or resolution into another commit.
moe-miau commented 2026-11-27 02:36:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by moe-miau on 2026-11-27T02:36:25Z.


@andrewpozdnakov7-jpg thanks, I took your mip-1 test commit as is, with your authorship kept. The 7 packed tests pass here on an RTX 4070 SUPER. On the #3340 key handling: if #3340 lands first, I'll rebase onto it.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7208276830 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7208276830). Originally posted by [moe-miau](https://github.com/moe-miau) on 2026-11-27T02:36:25Z. --- @andrewpozdnakov7-jpg thanks, I took your mip-1 test commit as is, with your authorship kept. The 7 packed tests pass here on an RTX 4070 SUPER. On the #3340 key handling: if #3340 lands first, I'll rebase onto it.
ChenmouXu commented 2026-11-27 13:38:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T13:38:15Z.


On an RTX 5070 Ti, this PR is the one that turns main from black to visible -- and with #2098 and #2178 stacked it is also the fastest 50-series build I have run

Built by merging three PRs onto main 63bcca4 with git (all three merged cleanly, no manual edits): this PR, #2098, and #2178. Machine: RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200, title 1.0.2.1, release build.

build picture frame time in the world draws/frame
main alone pure black 2913 ms 2,610
+ #2626 + #2098 correct (title card, subtitles, credits) 3,670-5,252 ms 445-908
+ #2626 + #2098 + #2178 correct, same frames 1,038-1,748 ms 2,397-3,958

No device removal in any of the three, and no flicker. no host texture ... format 115 disappears as soon as this PR is in, which is the whole of the difference between the first row and the second: the 2560x1440 B4G4R4A4_UNORM target exists, so the 2,610 draws have somewhere to land instead of being discarded.

#2178 is worth ~3.5x on frame time here and roughly four times the draws per frame at the same settings, so the two stack rather than substitute: this one for the target, that one for the reads.

The remaining cost is CPU: a submission is 1.1-1.7 s and slow host submission ms=4532 appears while the world loads. That is not this PR's ground, just what is left.

If it helps, the merge is three commands (git fetch origin refs/pull/2626/head:pr2626, same for 2098 and 2178, then three git merge --no-edit), and I can rerun any combination on this card and report the same three rows.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7219744541 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7219744541). Originally posted by [ChenmouXu](https://github.com/ChenmouXu) on 2026-11-27T13:38:15Z. --- On an RTX 5070 Ti, this PR is the one that turns main from black to visible -- and with #2098 and #2178 stacked it is also the fastest 50-series build I have run Built by merging three PRs onto `main` `63bcca4` with git (all three merged cleanly, no manual edits): this PR, #2098, and #2178. Machine: RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200, title 1.0.2.1, release build. | build | picture | frame time in the world | draws/frame | |---|---|---|---| | `main` alone | **pure black** | 2913 ms | 2,610 | | + #2626 + #2098 | correct (title card, subtitles, credits) | 3,670-5,252 ms | 445-908 | | + #2626 + #2098 + #2178 | correct, same frames | **1,038-1,748 ms** | 2,397-3,958 | No device removal in any of the three, and no flicker. `no host texture ... format 115` disappears as soon as this PR is in, which is the whole of the difference between the first row and the second: the 2560x1440 `B4G4R4A4_UNORM` target exists, so the 2,610 draws have somewhere to land instead of being discarded. #2178 is worth ~3.5x on frame time here and roughly four times the draws per frame at the same settings, so the two stack rather than substitute: this one for the target, that one for the reads. The remaining cost is CPU: a submission is 1.1-1.7 s and `slow host submission ms=4532` appears while the world loads. That is not this PR's ground, just what is left. If it helps, the merge is three commands (`git fetch origin refs/pull/2626/head:pr2626`, same for 2098 and 2178, then three `git merge --no-edit`), and I can rerun any combination on this card and report the same three rows.
andrewpozdnakov7-jpg commented 2026-11-27 14:02:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T14:02:25Z.


I updated the target-variant check for the current #2626 (6092548) and #3340 (f8df6ee) heads on 63bcca4. The commits merge cleanly. On a device that needs the packed-format fallback, the combined code can send an RGBA8 RTV to D3D12 while using the original packed format as the bound-target pipeline key.

Follow-up e6b453f applies the same target_format mapping to the key. With a test-only capability override that reports no writable support for formats 86 and 115, the unchanged combination fails with key 86 and view 28. The follow-up passes the same check for both packed formats and the RGBA8 control. The capability override was removed before publishing.

The three packed-copy tests and the key test passed on the normal adapter path. The app-local WARP 1.0.22 run passed all 29 pipeline tests on repeat and the three copy tests. The first app-local suite failed to produce the synthetic placed-UAV pipeline, which passed in isolation and in the full repeat. The stock WARP depth-bounds test failed on both the original and patched combination. Strict GPU Clippy in both feature configurations and the asset check passed.

This updates the integration result from the earlier 5581f9f branch. The next step is for the PR authors to use the targeted commit when combining the changes. A physical fallback retest is still open. Please keep the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding it in. AI-assisted. Synthetic tests only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7220256243 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7220256243). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T14:02:25Z. --- I updated the target-variant check for the current #2626 (`6092548`) and #3340 (`f8df6ee`) heads on `63bcca4`. The commits merge cleanly. On a device that needs the packed-format fallback, the combined code can send an RGBA8 RTV to D3D12 while using the original packed format as the bound-target pipeline key. [Follow-up `e6b453f`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/e6b453f921e3616ef521769e40f51a77d9c12abe) applies the same `target_format` mapping to the key. With a test-only capability override that reports no writable support for formats 86 and 115, the unchanged combination fails with key 86 and view 28. The follow-up passes the same check for both packed formats and the RGBA8 control. The capability override was removed before publishing. The three packed-copy tests and the key test passed on the normal adapter path. The app-local WARP 1.0.22 run passed all 29 pipeline tests on repeat and the three copy tests. The first app-local suite failed to produce the synthetic placed-UAV pipeline, which passed in isolation and in the full repeat. The stock WARP depth-bounds test failed on both the original and patched combination. Strict GPU Clippy in both feature configurations and the asset check passed. This updates the integration result from the earlier 5581f9f branch. The next step is for the PR authors to use the targeted commit when combining the changes. A physical fallback retest is still open. Please keep the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding it in. AI-assisted. Synthetic tests only.
ChenmouXu commented 2026-11-27 15:24:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T15:24:31Z.


The physical retest you are waiting on has been done here, and the fallback path works on hardware as-is -- without #3340 or e6b453f

RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200, title 1.0.2.1, release build. Built by merging refs/pull/2626/head, refs/pull/2098/head and refs/pull/2178/head onto main 63bcca4; all three merged cleanly and nothing was edited by hand. So this is the plain PR head, not your key follow-up.

Result on the card that needs the fallback:

build picture frame time draws/frame
main alone pure black 2,913 ms 2,610
+ #2626 + #2098 correct 3,670-5,252 ms 445-908
+ #2626 + #2098 + #2178 correct 1,038-1,748 ms 2,397-3,958

"Correct" here means the opening title card, subtitle overlay and end credits all render, and no host texture ... format 115 is gone from the log. No device removal and no flicker in any of the three.

So on this machine the RTV/view mismatch your synthetic override describes did not surface at the API level: the D3D12 calls were accepted and the frames are right. Either the driver reports the format as writable here and no fallback was taken, or the fallback was taken with the original format still used as the pipeline key and it did not matter for these submissions. I cannot tell which from the log alone -- if there is a one-line way to log whether target_format actually substituted, I will run it and say.

Two things this does not cover: the frame rate is CPU-bound at ~1 s per submission, and the dark overlapping surfaces that #841 is chasing are still there.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7222019788 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7222019788). Originally posted by [ChenmouXu](https://github.com/ChenmouXu) on 2026-11-27T15:24:31Z. --- The physical retest you are waiting on has been done here, and the fallback path works on hardware as-is -- without #3340 or `e6b453f` RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200, title 1.0.2.1, release build. Built by merging `refs/pull/2626/head`, `refs/pull/2098/head` and `refs/pull/2178/head` onto `main` `63bcca4`; all three merged cleanly and nothing was edited by hand. So this is the plain PR head, not your key follow-up. Result on the card that needs the fallback: | build | picture | frame time | draws/frame | |---|---|---|---| | `main` alone | pure black | 2,913 ms | 2,610 | | + #2626 + #2098 | correct | 3,670-5,252 ms | 445-908 | | + #2626 + #2098 + #2178 | correct | 1,038-1,748 ms | 2,397-3,958 | "Correct" here means the opening title card, subtitle overlay and end credits all render, and `no host texture ... format 115` is gone from the log. No device removal and no flicker in any of the three. So on this machine the RTV/view mismatch your synthetic override describes did not surface at the API level: the D3D12 calls were accepted and the frames are right. Either the driver reports the format as writable here and no fallback was taken, or the fallback was taken with the original format still used as the pipeline key and it did not matter for these submissions. I cannot tell which from the log alone -- if there is a one-line way to log whether `target_format` actually substituted, I will run it and say. Two things this does not cover: the frame rate is CPU-bound at ~1 s per submission, and the dark overlapping surfaces that #841 is chasing are still there.
andrewpozdnakov7-jpg commented 2026-11-27 15:40:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T15:40:33Z.


@ChenmouXu Thanks for checking the plain #2626 head in your hardware stack. The prior pipeline-key check measured the combination of #2626 and #3340.

Diagnostic commit 76f8792 applies directly to #2626 6092548. It prints one packed target format INFO line per requested packed format, so the default release log is enough. For guest format 115 or 86, host_format=28 means target_format selected RGBA8. A matching guest and host number means it kept the packed format.

On app-local WARP 1.0.22 I got one line each for 86→86 and 115→115. Temporarily forcing the missing-capability case in the synthetic fixture produced exactly one line each for 86→28 and 115→28. The published commit adds only the diagnostic. All eight packed-format tests passed, along with strict GPU Clippy and the asset policy.

If you retest your current stack with this commit, please post the packed target format lines. Those console lines are enough to identify the selected formats. If you reuse the diagnostic in source, please retain the Git author on cherry-pick or rebase, or use Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding it into another commit.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7222345536 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7222345536). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T15:40:33Z. --- @ChenmouXu Thanks for checking the plain #2626 head in your hardware stack. The prior pipeline-key check measured the combination of #2626 and #3340. [Diagnostic commit `76f8792`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/76f879247671481f9ecb4b97b4fa0401cff10f9d) applies directly to #2626 `6092548`. It prints one `packed target format` INFO line per requested packed format, so the default release log is enough. For guest format 115 or 86, `host_format=28` means `target_format` selected RGBA8. A matching guest and host number means it kept the packed format. On app-local WARP 1.0.22 I got one line each for 86→86 and 115→115. Temporarily forcing the missing-capability case in the synthetic fixture produced exactly one line each for 86→28 and 115→28. The published commit adds only the diagnostic. All eight packed-format tests passed, along with strict GPU Clippy and the asset policy. If you retest your current stack with this commit, please post the `packed target format` lines. Those console lines are enough to identify the selected formats. If you reuse the diagnostic in source, please retain the Git author on cherry-pick or rebase, or use `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding it into another commit. AI-assisted with Codex.
ChenmouXu commented 2026-11-27 16:01:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T16:01:01Z.


Diagnostic output from the 5070 Ti -- the fallback is taken here, not the native path, and the frames are correct

Applied 76f8792 on top of the same stack (main 63bcca4 + #2626 + #2098 + #2178), release build, default log level. Two lines, nothing else:

INFO victory_gpu::resource: packed target format guest_format=86  host_format=28
INFO victory_gpu::resource: packed target format guest_format=115 host_format=28

So on this card both packed formats go to RGBA8 -- it does not report them as renderable targets -- and the substitution is what the picture comes from. That answers the question I could not settle from the log before: it is your fallback path, taken for real, not a native path that happened to work.

With that build the opening scene renders: Lucia at the window, the chain-link fence, the watchtower and the sunset behind it, with the subtitle line showing. ~888 ms/frame at that point, 3,688 draws/frame, no device removal. The first few frames come out washed out and settle once the exposure/TAA converges, which at 1 fps takes several seconds -- worth knowing before anyone reads a bright frame as a colour bug.

So for the earlier question about the pipeline key: the key still uses the packed format while the RTV is RGBA8 here, and nothing broke at the API level in a 20-minute run. If anything downstream of this wants the same diagnostic, 76f8792 prints one line per format and the default release log is enough.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7222754708 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7222754708). Originally posted by [ChenmouXu](https://github.com/ChenmouXu) on 2026-11-27T16:01:01Z. --- Diagnostic output from the 5070 Ti -- the fallback is taken here, not the native path, and the frames are correct Applied `76f8792` on top of the same stack (`main` `63bcca4` + #2626 + #2098 + #2178), release build, default log level. Two lines, nothing else: ``` INFO victory_gpu::resource: packed target format guest_format=86 host_format=28 INFO victory_gpu::resource: packed target format guest_format=115 host_format=28 ``` So on this card both packed formats go to RGBA8 -- it does not report them as renderable targets -- and the substitution is what the picture comes from. That answers the question I could not settle from the log before: it is your fallback path, taken for real, not a native path that happened to work. With that build the opening scene renders: Lucia at the window, the chain-link fence, the watchtower and the sunset behind it, with the subtitle line showing. ~888 ms/frame at that point, 3,688 draws/frame, no device removal. The first few frames come out washed out and settle once the exposure/TAA converges, which at 1 fps takes several seconds -- worth knowing before anyone reads a bright frame as a colour bug. So for the earlier question about the pipeline key: the key still uses the packed format while the RTV is RGBA8 here, and nothing broke at the API level in a 20-minute run. If anything downstream of this wants the same diagnostic, `76f8792` prints one line per format and the default release log is enough.
ChenmouXu commented 2026-11-27 18:24:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T18:24:43Z.


One more data point, on where the remaining time goes after this PR -- and a hint from a fork that submission-side work is the next lever

Same hardware, stacked build (main 63bcca4 + #2626 + #2098 + #2178), release, no debug layer. With the picture correct, the steady state in the opening room is ~888 ms/frame at 3,688 draws/frame, and during the world load the log has slow host submission ms=4532 lists=30. Nine cores are busy while that happens, so this is the CPU translating and submitting, not the card.

For scale, the same card on a fork that moves submission off the single thread (VIctory-NVIDIA, VICTORY_ASYNC_SUBMIT=1) goes from 355 ms to 294 ms at a similar draw count. Not a comparison between trees -- different code -- but it says the submission path is worth a few tens of percent on its own, before anything about shaders changes.

That is the only thing I would ask for after this PR: the frame is correct, the target exists, and what is left is that one thread. VICTORY_GPU_TIMING=1 already attributes a slow list to its slowest command if someone wants the shape of it; I can run that on this stack and post the result if it is useful.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7225460516 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7225460516). Originally posted by [ChenmouXu](https://github.com/ChenmouXu) on 2026-11-27T18:24:43Z. --- One more data point, on where the remaining time goes after this PR -- and a hint from a fork that submission-side work is the next lever Same hardware, stacked build (`main` `63bcca4` + #2626 + #2098 + #2178), release, no debug layer. With the picture correct, the steady state in the opening room is **~888 ms/frame at 3,688 draws/frame**, and during the world load the log has `slow host submission ms=4532 lists=30`. Nine cores are busy while that happens, so this is the CPU translating and submitting, not the card. For scale, the same card on a fork that moves submission off the single thread (`VIctory-NVIDIA`, `VICTORY_ASYNC_SUBMIT=1`) goes from **355 ms to 294 ms** at a similar draw count. Not a comparison between trees -- different code -- but it says the submission path is worth a few tens of percent on its own, before anything about shaders changes. That is the only thing I would ask for after this PR: the frame is correct, the target exists, and what is left is that one thread. `VICTORY_GPU_TIMING=1` already attributes a slow list to its slowest command if someone wants the shape of it; I can run that on this stack and post the result if it is useful.
andrewpozdnakov7-jpg commented 2026-11-27 18:27:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T18:27:50Z.


@ChenmouXu Yes, a short timing sample from the same stack would help. Could you share two or three of the regular ms/frame lines with the preparing, on the GPU and copying back values and the draw counts?

On the stated main baseline, slow host submission ms=4532 is measured after preparation. It covers the queue submission and the wait for its fence. The regular frame line includes the preparation time separately. Timer in host.rs

If you already have a VICTORY_GPU_TIMING=1 sample, the slowest command types and their durations would help locate the wait. That mode runs lists separately, so the ordinary frame lines are the baseline for comparing frame times. Aggregate timings are enough.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7225513811 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7225513811). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T18:27:50Z. --- @ChenmouXu Yes, a short timing sample from the same stack would help. Could you share two or three of the regular `ms/frame` lines with the `preparing`, `on the GPU` and `copying back` values and the draw counts? On the stated `main` baseline, `slow host submission ms=4532` is measured after preparation. It covers the queue submission and the wait for its fence. The regular frame line includes the preparation time separately. [Timer in host.rs](https://github.com/Marvisak/VIctory/blob/63bcca43c6a00a758510398fa43096ce7e4f7df0/crates/victory-gpu/src/host.rs#L1253-L1323) If you already have a `VICTORY_GPU_TIMING=1` sample, the slowest command types and their durations would help locate the wait. That mode runs lists separately, so the ordinary frame lines are the baseline for comparing frame times. Aggregate timings are enough.
ChenmouXu commented 2026-11-27 19:19:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T19:19:06Z.


Timing samples from the 5070 Ti, from the stack you asked about -- and the shape is not what "slow submission" suggests

Same machine (RTX 5070 Ti Laptop, Blackwell, driver 32.0.16.1074), main 63bcca4 + #2626 + #2098 + #2178 + your diagnostic commit 76f8792, release build, Series S profile, DLSS Quality (0.667), 4,611 draws/frame.

Regular frame line:

4.8 fps, 210.0 ms/frame (125.5 preparing: copies 39.8 ms 68.5 MB,
textures 8.3 ms 7.8 MB; 76.2 on the GPU; 100.0 copying back 27.8 MB),
4611 draws/frame, dropped 271 without a host pipeline (0 being made) and 591 indirect

The submitting thread's own breakdown for that frame:

preparing per frame, the submitting thread: 206.1 ms in its submissions:
  7.4 asking the write watch, 0.9 putting the title's bytes under flights' writes,
  55.2 in the lists' steps (refreshes 32.8 in 46 flushes of 5750, 4843 of them known
  to copy nothing, 5416 on several threads, 7.4 one at a time in 373 before shader writes;
  copies and fills 9.3), 46.0 snapshots, 14.1 for copies in the card's memory,
  3.2 sending the lists; ahead of these 0.1 waiting for the submission lock,
  0.0 planning steps done on the card, 77.1 waiting for flights,
  0.3 the heaps' records; after the sending 1.6

Two things stand out, and neither is the submission itself:

Sending the lists is 3.2 ms of the 206. The time is waiting for flights (77.1 ms), snapshots (46.0), the lists' steps (55.2) and copying back (100.0 ms, for 27.8 MB). So the queue submission and its fence wait are not where the frame goes here -- if slow host submission ms=4532 on your baseline is the same measurement I am looking at, it may be measuring the wait rather than the send.

Copying back 27.8 MB costs 100 ms. That is ~280 MB/s effective, which looks like per-range stalls rather than bandwidth. #2428 ("a submission refreshes a copy's ranges disjoint, not their span") sounds like it might be the same ground; I do not know if it is in 63bcca4.

Also visible in that line: 271 draws dropped for want of a host pipeline and 591 indirect ones left out on purpose. The pipeline coverage is still incomplete at this point, which is worth knowing before reading the frame rate as a rendering limit.

If it helps, I can run VICTORY_GPU_TIMING=1 on the same save and post the slowest command types with their durations -- say the word and which limit you want.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7226407492 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7226407492). Originally posted by [ChenmouXu](https://github.com/ChenmouXu) on 2026-11-27T19:19:06Z. --- Timing samples from the 5070 Ti, from the stack you asked about -- and the shape is not what "slow submission" suggests Same machine (RTX 5070 Ti Laptop, Blackwell, driver 32.0.16.1074), `main` `63bcca4` + #2626 + #2098 + #2178 + your diagnostic commit `76f8792`, release build, Series S profile, DLSS Quality (0.667), 4,611 draws/frame. Regular frame line: ``` 4.8 fps, 210.0 ms/frame (125.5 preparing: copies 39.8 ms 68.5 MB, textures 8.3 ms 7.8 MB; 76.2 on the GPU; 100.0 copying back 27.8 MB), 4611 draws/frame, dropped 271 without a host pipeline (0 being made) and 591 indirect ``` The submitting thread's own breakdown for that frame: ``` preparing per frame, the submitting thread: 206.1 ms in its submissions: 7.4 asking the write watch, 0.9 putting the title's bytes under flights' writes, 55.2 in the lists' steps (refreshes 32.8 in 46 flushes of 5750, 4843 of them known to copy nothing, 5416 on several threads, 7.4 one at a time in 373 before shader writes; copies and fills 9.3), 46.0 snapshots, 14.1 for copies in the card's memory, 3.2 sending the lists; ahead of these 0.1 waiting for the submission lock, 0.0 planning steps done on the card, 77.1 waiting for flights, 0.3 the heaps' records; after the sending 1.6 ``` Two things stand out, and neither is the submission itself: **Sending the lists is 3.2 ms of the 206.** The time is `waiting for flights` (77.1 ms), `snapshots` (46.0), the lists' steps (55.2) and `copying back` (100.0 ms, for 27.8 MB). So the queue submission and its fence wait are not where the frame goes here -- if `slow host submission ms=4532` on your baseline is the same measurement I am looking at, it may be measuring the wait rather than the send. **Copying back 27.8 MB costs 100 ms.** That is ~280 MB/s effective, which looks like per-range stalls rather than bandwidth. #2428 ("a submission refreshes a copy's ranges disjoint, not their span") sounds like it might be the same ground; I do not know if it is in `63bcca4`. Also visible in that line: **271 draws dropped for want of a host pipeline** and 591 indirect ones left out on purpose. The pipeline coverage is still incomplete at this point, which is worth knowing before reading the frame rate as a rendering limit. If it helps, I can run `VICTORY_GPU_TIMING=1` on the same save and post the slowest command types with their durations -- say the word and which limit you want.
andrewpozdnakov7-jpg commented 2026-11-27 19:25:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T19:25:06Z.


Thanks, @ChenmouXu. The sample separates the 3.2 ms spent sending lists from 77.1 ms waiting for flights and 100.0 ms copying back 27.8 MB. On main at 63bcca4, slow host submission ms measures from the end of CPU preparation through submission and the fence wait, ending before the copy-back. The 4,532 ms warning and this stack's per-frame send column cover different intervals.

#2428 is still open and 63bcca4 still combines refresh requests into a span. That patch works on refreshes into the host copy, so its relevant comparison would be the refresh and copy portion of preparation. The 100 ms result is the separate copy-back path.

You've already confirmed both packed-format substitutions on this adapter. These timings give us enough context for the #2626 review. No additional timing run is needed from you for this PR.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7226506587 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7226506587). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T19:25:06Z. --- Thanks, @ChenmouXu. The sample separates the 3.2 ms spent sending lists from 77.1 ms waiting for flights and 100.0 ms copying back 27.8 MB. On main at `63bcca4`, `slow host submission ms` measures from the end of CPU preparation through submission and the fence wait, ending before the copy-back. The 4,532 ms warning and this stack's per-frame send column cover different intervals. #2428 is still open and `63bcca4` still combines refresh requests into a span. That patch works on refreshes into the host copy, so its relevant comparison would be the refresh and copy portion of preparation. The 100 ms result is the separate copy-back path. You've already confirmed both packed-format substitutions on this adapter. These timings give us enough context for the #2626 review. No additional timing run is needed from you for this PR.
ChenmouXu commented 2026-11-27 20:26:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChenmouXu on 2026-11-27T20:26:54Z.


Series S still comes out black on this stack, and the reason is a third packed format this PR does not cover -- maybe the substitution should follow the host's answer rather than a list of formats

Same machine and stack as before (main 63bcca4 + this PR + #2098 + #2178, diagnostics build), only the console profile changed:

--console series-s
WARN victory_gpu::resource: no host texture error=... (0x80070057)
  desc=ResourceDesc { dimension: 3, width: 1920, height: 1080, depth_or_array_size: 1,
  mip_levels: 1, format: 67, sample_count: 1, sample_quality: 0, layout: 0, flags: 5 }

format 67 is R9G9B9E5_SHAREDEXP requested as render target and unordered access (flags: 5). This PR redirects 86 and 115, and both of those report packed target format guest_format=86/115 host_format=28 here, so the substitution works for them -- but 67 goes to the host unchanged and the target is refused, so the picture is black in Series S where Series X is fine. The difference is only the profile: Series X asks for 2560x1440, Series S for 1920x1080.

Suggestion, if it is cheap: drive the substitution off CheckFeatureSupport for the requested format and flags (as #1832 does for typed UAVs) rather than a table of packed formats, so the same path covers 67, 86, 115 and whatever a later title asks for. A table will keep catching these one at a time, and each one looks exactly like this: a target that silently does not exist and a black picture.

Happy to run whatever build tests it -- the Series S case is a one-flag change here, and the log line above is the check.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7227515984 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7227515984). Originally posted by [ChenmouXu](https://github.com/ChenmouXu) on 2026-11-27T20:26:54Z. --- Series S still comes out black on this stack, and the reason is a third packed format this PR does not cover -- maybe the substitution should follow the host's answer rather than a list of formats Same machine and stack as before (`main` `63bcca4` + this PR + #2098 + #2178, diagnostics build), only the console profile changed: ``` --console series-s WARN victory_gpu::resource: no host texture error=... (0x80070057) desc=ResourceDesc { dimension: 3, width: 1920, height: 1080, depth_or_array_size: 1, mip_levels: 1, format: 67, sample_count: 1, sample_quality: 0, layout: 0, flags: 5 } ``` `format 67` is `R9G9B9E5_SHAREDEXP` requested as render target **and** unordered access (`flags: 5`). This PR redirects 86 and 115, and both of those report `packed target format guest_format=86/115 host_format=28` here, so the substitution works for them -- but 67 goes to the host unchanged and the target is refused, so the picture is black in Series S where Series X is fine. The difference is only the profile: Series X asks for 2560x1440, Series S for 1920x1080. Suggestion, if it is cheap: drive the substitution off `CheckFeatureSupport` for the requested format and flags (as #1832 does for typed UAVs) rather than a table of packed formats, so the same path covers 67, 86, 115 and whatever a later title asks for. A table will keep catching these one at a time, and each one looks exactly like this: a target that silently does not exist and a black picture. Happy to run whatever build tests it -- the Series S case is a one-flag change here, and the log line above is the check.
andrewpozdnakov7-jpg commented 2026-11-27 20:45:32 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T20:45:32Z.


@ChenmouXu I tested a combination for the format-67 creation error in your Series S run. It keeps the packed 86/115 handling from #2626 and includes @Yaekai's RGB9E5 capability check and RGBA16F fallback from #492. The two exact PR heads are the parents of the test branch. Combined commit 8ba4fa4

On local Windows WARP, I forced the capability answers for formats 67, 86 and 115 to exercise the fallback paths. The RT+UAV texture, explicit RTV and pipeline target agreed on RGBA16F for 67. A real RTV clear read back (2.0, 3.5, 0.5, 1.0) in both test pixels. Formats 86 and 115 still used RGBA8, and their partial copy/readback tests retained the original packed texels and padding. Sampled-only format 67 still used native RGB9E5. The regular diagnostics run passed 263 project GPU tests and the SDK/WARP identity check, with one ignored test. Both strict GPU Clippy configurations and the asset policy check passed.

I used synthetic textures. This branch still has the RGB9E5 mixed-format alias and cross-family copy limits described in #492. If you can do the Series S rerun you offered, could you keep your previous stack/settings, add the combined #492 path and check whether the format-67 E_INVALIDARG line is gone and whether a picture appears? Test branch

If you reuse the merge resolution or the added regression tests, please retain the original Git author when cherry-picking or rebasing. If folded into another commit, please add the trailer below.

Co-authored-by: andrewpozdnakov7-jpg [email protected]

<!-- greyfinch-sync:Marvisak/VIctory:comment:7227812151 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7227812151). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T20:45:32Z. --- @ChenmouXu I tested a combination for the format-67 creation error in your Series S run. It keeps the packed 86/115 handling from #2626 and includes @Yaekai's RGB9E5 capability check and RGBA16F fallback from #492. The two exact PR heads are the parents of the test branch. [Combined commit 8ba4fa4](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/8ba4fa44a2917732f241fac408dc53103a61132b) On local Windows WARP, I forced the capability answers for formats 67, 86 and 115 to exercise the fallback paths. The RT+UAV texture, explicit RTV and pipeline target agreed on RGBA16F for 67. A real RTV clear read back (2.0, 3.5, 0.5, 1.0) in both test pixels. Formats 86 and 115 still used RGBA8, and their partial copy/readback tests retained the original packed texels and padding. Sampled-only format 67 still used native RGB9E5. The regular diagnostics run passed 263 project GPU tests and the SDK/WARP identity check, with one ignored test. Both strict GPU Clippy configurations and the asset policy check passed. I used synthetic textures. This branch still has the RGB9E5 mixed-format alias and cross-family copy limits described in #492. If you can do the Series S rerun you offered, could you keep your previous stack/settings, add the combined #492 path and check whether the format-67 E_INVALIDARG line is gone and whether a picture appears? [Test branch](https://github.com/andrewpozdnakov7-jpg/VIctory/tree/codex2/pr2626-rgb9e5) If you reuse the merge resolution or the added regression tests, please retain the original Git author when cherry-picking or rebasing. If folded into another commit, please add the trailer below. Co-authored-by: andrewpozdnakov7-jpg <[email protected]>
lhnizdo commented 2026-11-27 21:27:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by lhnizdo on 2026-11-27T21:27:51Z.


RTX 2080, Windows 10 (19045): the stand-in works, and frames got faster.

Tree: my game stack (main 63bcca4 plus #2920, #3584, #2958 and diagnostics) with this PR's head 6092548 merged. It merged cleanly. Diagnostics build, warm caches. Each run is 6 minutes in the opening prison cell, with the BVH builder running.

Without this PR, the first frames log:

WARN victory_gpu::resource: the host refuses castable formats … format: 115, … flags: 1 }   (2560×1440)
WARN victory_gpu::resource: no host texture error=The parameter is incorrect. (0x80070057) … format: 115 …
WARN victory_gpu::descriptor::host: an unordered view in a format the host cannot store view=86

With it, none of these three lines appears, and the run has no device loss.

Frame time, medians of the last 15 frame lines of each run:

frame preparing on the GPU copying back draws/frame
without 2,905 ms 820 1,158 802 4,994
with 2,378 ms 579 827 684 5,116

That's one run each, so take the 18% as indicative. Draw counts are similar.

What it doesn't change here: the cell's green cast is the same in both runs, so that comes from elsewhere.

AI-assisted (Claude Code). No game data attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7228466607 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7228466607). Originally posted by [lhnizdo](https://github.com/lhnizdo) on 2026-11-27T21:27:51Z. --- **RTX 2080, Windows 10 (19045): the stand-in works, and frames got faster.** **Tree:** my game stack (`main` `63bcca4` plus #2920, #3584, #2958 and diagnostics) with this PR's head `6092548` merged. It merged cleanly. Diagnostics build, warm caches. Each run is 6 minutes in the opening prison cell, with the BVH builder running. **Without this PR**, the first frames log: ``` WARN victory_gpu::resource: the host refuses castable formats … format: 115, … flags: 1 } (2560×1440) WARN victory_gpu::resource: no host texture error=The parameter is incorrect. (0x80070057) … format: 115 … WARN victory_gpu::descriptor::host: an unordered view in a format the host cannot store view=86 ``` **With it**, none of these three lines appears, and the run has no device loss. **Frame time**, medians of the last 15 frame lines of each run: | | frame | preparing | on the GPU | copying back | draws/frame | |---|---|---|---|---|---| | without | 2,905 ms | 820 | 1,158 | 802 | 4,994 | | with | 2,378 ms | 579 | 827 | 684 | 5,116 | That's one run each, so take the 18% as indicative. Draw counts are similar. **What it doesn't change here:** the cell's green cast is the same in both runs, so that comes from elsewhere. AI-assisted (Claude Code). No game data attached.
andrewpozdnakov7-jpg commented 2026-11-27 21:37:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T21:37:34Z.


@lhnizdo Thanks for the RTX 2080 comparison. The missing 86/115 warnings after 6092548 are the device check this fallback needed.

I tested one more capability case on that exact head. Direct3D 12 reports typed UAV view support in Support1 and typed stores separately in Support2. With a synthetic answer that offered an RTV, a typed UAV and typed loads, the original policy kept format 86 even without stores. The follow-up requires the store bit when choosing writable formats 86 and 115. D3D12 format support · Follow-up commit

On local WARP, a test-only override cleared just that store capability for the packed formats while exposing the other required flags. Both writable textures used RGBA8. Partial copies preserved their guest texels and padding at mips 0 and 1. The normal capability suite passed 253 project GPU tests and the SDK identity check, with one ignored test. Both strict GPU Clippy configurations and the asset policy check passed.

The persistent green cast has a separate Series X data point from the ambient fallback investigation. RTX 4070 SUPER report in #3414

If reusing the change or test, please retain the Git author when cherry-picking or rebasing. If folding them into another commit, please add the trailer below.

Co-authored-by: andrewpozdnakov7-jpg [email protected]

<!-- greyfinch-sync:Marvisak/VIctory:comment:7228612444 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7228612444). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-27T21:37:34Z. --- @lhnizdo Thanks for the RTX 2080 comparison. The missing 86/115 warnings after `6092548` are the device check this fallback needed. I tested one more capability case on that exact head. Direct3D 12 reports typed UAV view support in Support1 and typed stores separately in Support2. With a synthetic answer that offered an RTV, a typed UAV and typed loads, the original policy kept format 86 even without stores. The follow-up requires the store bit when choosing writable formats 86 and 115. [D3D12 format support](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_format_support2) · [Follow-up commit](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/df2630feca7d2a88a32cb1128af5e2be279cccb1) On local WARP, a test-only override cleared just that store capability for the packed formats while exposing the other required flags. Both writable textures used RGBA8. Partial copies preserved their guest texels and padding at mips 0 and 1. The normal capability suite passed 253 project GPU tests and the SDK identity check, with one ignored test. Both strict GPU Clippy configurations and the asset policy check passed. The persistent green cast has a separate Series X data point from the ambient fallback investigation. [RTX 4070 SUPER report in #3414](https://github.com/Marvisak/VIctory/pull/3414#issuecomment-7209234641) If reusing the change or test, please retain the Git author when cherry-picking or rebasing. If folding them into another commit, please add the trailer below. Co-authored-by: andrewpozdnakov7-jpg <[email protected]>
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2626:upstream-pr/2626'
git switch 'upstream-pr/2626'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2626'
git switch 'upstream-pr/2626'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2626'
git switch 'upstream-pr/2626'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2626'
git switch 'main'
git merge --squash 'upstream-pr/2626'
git switch 'main'
git merge --ff-only 'upstream-pr/2626'
git switch 'main'
git merge 'upstream-pr/2626'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!2624
No description provided.