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

Open
github-bot wants to merge 2 commits from github-bot/gh-2626 into main AGit
Owner

@⁠moe-miau on GitHub · 2026-11-25 17:07 UTC · original
moe-miau:port/fmt → main · +494 −42 · 9 files · 2 commits · open

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

**@⁠moe-miau** on GitHub · 2026-11-25 17:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626) `moe-miau:port/fmt` → `main` · +494 −42 · 9 files · 2 commits · open ## 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)
B5G5R5A1_UNORM and B4G4R4A4_UNORM have no typed unordered access on
NVIDIA, and B4G4R4A4 is not a render-target format there. Upstream drops
the texture the host refuses, and the next submission removes the device:
on an RTX 4070 SUPER, `main` dies 30 s in, 0.2 s after "no host texture"
for the title's 2560x1440 format-115 target (#1952, #1781, #2024).

When the device lacks render-target or typed-UAV support for one of these
formats, its 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 and
readbacks to title memory convert texels between the packed layout and
RGBA8; a GPU copy or resolve between a stand-in and a texture in the packed
layout is skipped with a one-time warning. Devices that support the
formats are unchanged.

Ported from Zettrox/ztrx (commit 578d459), based on fxceless/victory-fork.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:10:38 +00:00
Author
Owner

@⁠moe-miau on GitHub · 2026-11-25 17:15 UTC · original

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.

**@⁠moe-miau** on GitHub · 2026-11-25 17:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7169236887) 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.
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 17:49 UTC · original

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.

**@⁠kotekompotek** on GitHub · 2026-11-25 17:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7170062157) 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.
Author
Owner

@⁠Machad3x on GitHub · 2026-11-25 18:26 UTC · original

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.

**@⁠Machad3x** on GitHub · 2026-11-25 18:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7170914612) 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.
Author
Owner

@⁠moe-miau on GitHub · 2026-11-25 19:04 UTC · original

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.

**@⁠moe-miau** on GitHub · 2026-11-25 19:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7171789544) 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.
Author
Owner

@⁠KainanP on GitHub · 2026-11-25 19:36 UTC · original

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: #1753. Tested with the help of an AI assistant (Claude Code).

**@⁠KainanP** on GitHub · 2026-11-25 19:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7172525110) 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://git.gtahub.st/github/Marvisak--VIctory/issues/1753. Tested with the help of an AI assistant (Claude Code).
Author
Owner

@⁠regiumlepidi on GitHub · 2026-11-25 21:37 UTC · original

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.

**@⁠regiumlepidi** on GitHub · 2026-11-25 21:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7175326492) 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._
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:15 UTC · original · edited 2026-11-26 03:24 UTC

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

**@⁠Marvisak** on GitHub · 2026-11-25 22:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7176139297) · edited 2026-11-26 03:24 UTC <!-- 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)_
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-26 01:34 UTC · original · edited 2026-11-26 01:37 UTC

@⁠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.

**@⁠steven-seagull27** on GitHub · 2026-11-26 01:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7179902830) · edited 2026-11-26 01:37 UTC @⁠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.
Author
Owner

@⁠moe-miau on GitHub · 2026-11-26 01:50 UTC · original

@⁠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.

**@⁠moe-miau** on GitHub · 2026-11-26 01:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7180199162) @⁠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.
Author
Owner

@⁠walterwallaceson on GitHub · 2026-11-26 03:02 UTC · original

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.

**@⁠walterwallaceson** on GitHub · 2026-11-26 03:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7181347208) **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.
Author
Owner

@⁠TheGrayOrange on GitHub · 2026-11-26 04:46 UTC · original

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.

**@⁠TheGrayOrange** on GitHub · 2026-11-26 04:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7182889554) 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.
Author
Owner

@⁠evan-kolberg on GitHub · 2026-11-26 08:55 UTC · original

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.

**@⁠evan-kolberg** on GitHub · 2026-11-26 08:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7187188823) 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.
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 05:09 UTC · original · approved these changes

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).

**@⁠Dukestar69** on GitHub · 2026-11-26 05:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#pullrequestreview-6068850327) · **approved these changes** 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).
Author
Owner

@⁠loren2000vlort-cmd on GitHub · 2026-11-26 10:55 UTC · original

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.

**@⁠loren2000vlort-cmd** on GitHub · 2026-11-26 10:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7190030197) **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.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 11:15 UTC · original · approved these changes

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.
**@⁠fuzeofficlal** on GitHub · 2026-11-26 11:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#pullrequestreview-6073184353) · **approved these changes** 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.
Author
Owner

@⁠ChenmouXu on GitHub · 2026-11-26 12:57 UTC · original

问题

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.

**@⁠ChenmouXu** on GitHub · 2026-11-26 12:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7192684415) > ## 问题 > `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://git.gtahub.st/github/Marvisak--VIctory/pulls/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.
Author
Owner

@⁠ChenmouXu on GitHub · 2026-11-26 14:34 UTC · original

问题

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.

**@⁠ChenmouXu** on GitHub · 2026-11-26 14:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7195014964) > ## 问题 > `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://git.gtahub.st/github/Marvisak--VIctory/pulls/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.
Author
Owner

@⁠ChenmouXu on GitHub · 2026-11-26 16:17 UTC · original

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.

**@⁠ChenmouXu** on GitHub · 2026-11-26 16:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7197436168) 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`.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 17:42 UTC · original

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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 17:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7199493999) 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.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 20:07 UTC · original

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.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 20:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/2626#issuecomment-7202327939) 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://git.gtahub.st/github/Marvisak--VIctory/pulls/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.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2626/head:github-bot/gh-2626'
git switch 'github-bot/gh-2626'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2626'
git switch 'github-bot/gh-2626'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2626'
git switch 'github-bot/gh-2626'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2626'
git switch 'main'
git merge --squash 'github-bot/gh-2626'
git switch 'main'
git merge --ff-only 'github-bot/gh-2626'
git switch 'main'
git merge 'github-bot/gh-2626'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2626
No description provided.