GPU: target dumps refuse a footprint the host could not give #3388

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

@⁠neonbyte1 on GitHub · 2026-11-26 21:23 UTC · original
neonbyte1:fix/capture-invalid-format → main · +266 −8 · 1 files · 2 commits · open

What is wrong

A diagnostics run with VICTORY_DUMP_TARGETS=1 / VICTORY_DUMP_WRITERS aborted GTA VI (RTX 5090, Wine + vkd3d-proton) with memory allocation of 103079215080 bytes failed, right after vkd3d_get_format: Invalid format -1. It happened while dumping the fourth target written by one compute pass.

dump_one/read_back trusted whatever GetCopyableFootprints left in the footprint. For a subresource it can't describe, vkd3d-proton fills the layout with 0xFF bytes (memset(layouts, 0xff, …), total = ~0), so the footprint reads Format = Width = Height = Depth = RowPitch = 0xFFFFFFFF. Then:

  • f.Width * f.Height wraps to 1 in u32, so the dump takes the "tiny target" path;
  • that path builds a Vec<String> whose size hint is f.Height: 24 bytes × 0xFFFFFFFF = 103,079,215,080 bytes, the failed allocation;
  • the same footprint format goes to CopyTextureRegion, which is the Invalid format -1 line.

capture.rs is the same on main, so any capture of such a target aborts there too.

What changes

  • footprint_fits(desc, footprint) (pure): the footprint's format has a known element size, its extent equals the resource's block-aligned mip-0 extent, the depth matches, the texel count is under a cap, and the row pitch holds a row. All with checked arithmetic.
  • read_back also asks for the row count and row size, recomputes the bytes it needs, and refuses a short or implausible total (over 1 GiB) before it sizes any buffer.
  • dump_one checks again before mapping, tests "tiny" in u64, and to_rgba refuses extents over 128 Mi texels.
  • Each refusal logs one line with the resource, format, extent, pitch and total, and the dump continues with the next target.
  • Typeless formats now decode as their typed twin with the same bytes (R32_TYPELESS → R32_FLOAT, R24G8_TYPELESS → D24_UNORM_S8, R16_TYPELESS → R16_FLOAT, BGRA typeless → sRGB), and planar depth uses the plane footprint's own format. R32G32B32_FLOAT is added.

#601 also touches dump_one (one line, slice bounds for mips) but fixes a different bug; whichever lands second needs a trivial rebase.

Tested

  • 3 new device-free unit tests for footprint_fits (including the all-0xFF footprint), plus the existing capture::tests (8/8) and r32_tests (6/6), under Wine.
  • clippy -D warnings for x86_64-pc-windows-msvc, default and --all-features; formatting clean.
  • In game: the same capture with this fix applied to my test build is running now; I'll add the result here.

AI-assisted (Claude); measured on my machine, no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-26 21:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/3388) `neonbyte1:fix/capture-invalid-format` → `main` · +266 −8 · 1 files · 2 commits · open ### What is wrong A diagnostics run with `VICTORY_DUMP_TARGETS=1` / `VICTORY_DUMP_WRITERS` aborted GTA VI (RTX 5090, Wine + vkd3d-proton) with `memory allocation of 103079215080 bytes failed`, right after `vkd3d_get_format: Invalid format -1`. It happened while dumping the fourth target written by one compute pass. `dump_one`/`read_back` trusted whatever `GetCopyableFootprints` left in the footprint. For a subresource it can't describe, vkd3d-proton fills the layout with `0xFF` bytes (`memset(layouts, 0xff, …)`, `total = ~0`), so the footprint reads `Format = Width = Height = Depth = RowPitch = 0xFFFFFFFF`. Then: - `f.Width * f.Height` wraps to 1 in `u32`, so the dump takes the "tiny target" path; - that path builds a `Vec<String>` whose size hint is `f.Height`: 24 bytes × `0xFFFFFFFF` = 103,079,215,080 bytes, the failed allocation; - the same footprint format goes to `CopyTextureRegion`, which is the `Invalid format -1` line. `capture.rs` is the same on `main`, so any capture of such a target aborts there too. ### What changes - `footprint_fits(desc, footprint)` (pure): the footprint's format has a known element size, its extent equals the resource's block-aligned mip-0 extent, the depth matches, the texel count is under a cap, and the row pitch holds a row. All with checked arithmetic. - `read_back` also asks for the row count and row size, recomputes the bytes it needs, and refuses a short or implausible total (over 1 GiB) before it sizes any buffer. - `dump_one` checks again before mapping, tests "tiny" in `u64`, and `to_rgba` refuses extents over 128 Mi texels. - Each refusal logs one line with the resource, format, extent, pitch and total, and the dump continues with the next target. - Typeless formats now decode as their typed twin with the same bytes (`R32_TYPELESS` → `R32_FLOAT`, `R24G8_TYPELESS` → `D24_UNORM_S8`, `R16_TYPELESS` → `R16_FLOAT`, BGRA typeless → sRGB), and planar depth uses the plane footprint's own format. `R32G32B32_FLOAT` is added. #601 also touches `dump_one` (one line, slice bounds for mips) but fixes a different bug; whichever lands second needs a trivial rebase. ### Tested - 3 new device-free unit tests for `footprint_fits` (including the all-`0xFF` footprint), plus the existing `capture::tests` (8/8) and `r32_tests` (6/6), under Wine. - clippy `-D warnings` for `x86_64-pc-windows-msvc`, default and `--all-features`; formatting clean. - In game: the same capture with this fix applied to my test build is running now; I'll add the result here. _AI-assisted (Claude); measured on my machine, no game data shared._
A capture run aborted at frame 1301, the first frame VICTORY_CAPTURE_WORLD
lists: after three targets of the shadow-clear pass were saved, vkd3d-proton
logged "Invalid format -1" and the title died in
"memory allocation of 103079215080 bytes failed".

The host leaves a footprint it cannot give (invalid format, invalid
sub-resource range) filled with 0xFF and its total meaningless: 0xFFFFFFFF
in the format, the extent and the row pitch. The dump trusted that
footprint. `f.Width * f.Height` overflows to 1 for it, so the target took
the "tiny target" branch, whose `Vec<String>` takes the footprint's height
(0xFFFFFFFF) as its capacity: 24 x 0xFFFFFFFF bytes, the abort.

Refuse a footprint that does not name mip 0 of the description it was asked
for (known element, block-aligned extent, a pitch holding a row, a plausible
texel count), both where the read-back buffer takes its size from the total
and before the dump maps and decodes it, with one line naming the resource
and what the host gave. Refuse an extent no dump sizes in `to_rgba` too, so
no arithmetic below it can size an allocation from a footprint (the
`Vec<String>` of a "tiny" target included).

Decode typeless formats as the value their bits hold (their family's typed
twin: R32_TYPELESS as R32_FLOAT, R24G8 as D24_UNORM_S8, R16_TYPELESS as
R16_FLOAT) instead of refusing them, and R32G32B32 float targets.
Review follow-up on the footprint guards.

- The constant assertion in the footprint test moves into a const block: the
  reviewer's `clippy --features diagnostics --all-targets -- -D warnings`
  rejects it as an assertion of a constant value.
- `dump_one` sized its mapping `RowPitch * Height`, past the read-back
  buffer's own bytes: the last row a copy writes stops at its own size (a
  1x1 target fills 4 bytes of a 256-byte pitch) and a block-compressed
  footprint's height is texels, not rows of blocks (D24 64x64: 32,512
  bytes, BC7 64x64: 4,096). The mapping now spans `row_bytes` of the
  footprint's own rows, refused unless it is within the buffer's
  `GetDesc().Width`; formats whose rows are rows of blocks are refused as
  undecoded, as before. `to_rgba`'s reads stay inside it: its widest index
  is the last row's own size.
- `read_back` refuses a footprint that names no row, or no bytes in a row,
  by name through the same `row_bytes` (not by `rows.saturating_sub(1)`),
  and `footprint_fits` requires a single-sample description, so a caller
  that did not filter multi-sampled resources is safe too.

`row_bytes` is a pure function; a device-free test covers the row spans a
live matrix measured (1x1 R8G8B8A8, 2560x1440 R8, D24 64x64, BC7 64x64)
and the empty cases. Two open changes bound the same slice in other places;
this one stays minimal and is the only change to `dump_one` here.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:06:17 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 21:27 UTC · original · reviewed

Tested on Windows against origin/main (63bcca4).

  • cargo test -p victory-gpu --lib --features diagnostics capture:: -- --test-threads=1: 14 passed, 0 failed (footprints_of_failed_copies_are_refused, an_implausible_extent_is_not_allocated_for, typeless_formats_read_as_the_value_they_hold).
  • One minor clippy error under cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings:
error: this assertion has a constant value
    --> crates\victory-gpu\src\capture.rs:1143:9
     |
1143 |         assert!(MAX_READBACK >= 2560 * 1440);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = help: consider moving this into a const block: `const { assert!(..) }`

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

**@⁠Dukestar69** on GitHub · 2026-11-26 21:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/3388#pullrequestreview-6080630178) · **reviewed** Tested on Windows against `origin/main` (`63bcca4`). - `cargo test -p victory-gpu --lib --features diagnostics capture:: -- --test-threads=1`: 14 passed, 0 failed (`footprints_of_failed_copies_are_refused`, `an_implausible_extent_is_not_allocated_for`, `typeless_formats_read_as_the_value_they_hold`). - One minor clippy error under `cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings`: ``` error: this assertion has a constant value --> crates\victory-gpu\src\capture.rs:1143:9 | 1143 | assert!(MAX_READBACK >= 2560 * 1440); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: consider moving this into a const block: `const { assert!(..) }` ``` Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-26 21:33 UTC · original

In game, on the same build and capture settings that aborted before (VICTORY_DUMP_TARGETS=1, VICTORY_DUMP_WRITERS=<21 hashes>, VICTORY_CAPTURE_WORLD=0,60,300), with this commit applied:

  • Without the fix: the game aborted at frame 1301 after 3 target dumps (memory allocation of 103079215080 bytes failed).
  • With it: the 10-minute run completes (to frame 1566) with 1,465 target dumps (125 MB).
  • What gets refused: the log has 21 lines target not read back: the host gives no copyable footprint. All are one resource, format=86 (B5G5R5A1_UNORM), where vkd3d-proton returns the all-0xFF footprint (width=height=depth=pitch=4294967295). That's the case this PR refuses instead of sizing a buffer from it.

AI-assisted (Claude); measured on my machine, no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-26 21:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/3388#issuecomment-7203846081) **In game,** on the same build and capture settings that aborted before (`VICTORY_DUMP_TARGETS=1`, `VICTORY_DUMP_WRITERS=<21 hashes>`, `VICTORY_CAPTURE_WORLD=0,60,300`), with this commit applied: - **Without the fix:** the game aborted at frame 1301 after 3 target dumps (`memory allocation of 103079215080 bytes failed`). - **With it:** the 10-minute run completes (to frame 1566) with 1,465 target dumps (125 MB). - **What gets refused:** the log has 21 lines `target not read back: the host gives no copyable footprint`. All are one resource, `format=86` (`B5G5R5A1_UNORM`), where vkd3d-proton returns the all-`0xFF` footprint (`width=height=depth=pitch=4294967295`). That's the case this PR refuses instead of sizing a buffer from it. _AI-assisted (Claude); measured on my machine, no game data shared._
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 21:51 UTC · original · requested changes

The footprint validation (footprint_fits), read_back bounds checks, and typeless format decoding look solid — all 14 capture:: unit tests and a live 10-format D3D12 read_back matrix (R8G8B8A8_UNORM 64x64 and 1x1, R16G16B16A16_FLOAT, R32_TYPELESS, D24_UNORM_S8_UINT, R24G8_TYPELESS, D32_FLOAT_S8X24_UINT, B5G5R5A1_UNORM, BC7_UNORM, and TEXTURE3D 16x16x4) pass on both RTX 5090 and WARP with VICTORY_D3D12_DEBUG=1 and zero debug layer errors.

One blocking lint failure needs fixing before merge:

Blocking: clippy --features diagnostics --all-targets -- -D warnings fails on capture.rs:1143

  • crates/victory-gpu/src/capture.rs:1143
error: this assertion has a constant value
    --> crates\victory-gpu\src\capture.rs:1143:9
     |
1143 |         assert!(MAX_READBACK >= 2560 * 1440);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = help: consider moving this into a const block: `const { assert!(..) }`

Changing this line to const { assert!(MAX_READBACK >= 2560 * 1440); } clears cargo clippy --locked -p victory-gpu --features diagnostics --all-targets -- -D warnings.

Additional hardening notes (non-blocking)

  • crates/victory-gpu/src/capture.rs:629: dump_one creates std::slice::from_raw_parts(data.cast::<u8>(), pitch * f.Height as usize), which exceeds the total-byte readback buffer whenever the final row is shorter than RowPitch or the format is block-compressed (observed on both RTX 5090 and WARP: e.g., R8G8B8A8_UNORM 1x1 allocates 4 bytes vs 256; D24_UNORM_S8_UINT 64x64 allocates 32,512 vs 32,768; BC7_UNORM 64x64 allocates 4,096 vs 16,384). Sizing the mapped slice to the actual readback buffer length (buffer.GetDesc().Width as usize) avoids creating an out-of-bounds slice.
  • crates/victory-gpu/src/capture.rs:140, 199: Checking rows == 0 || row == 0 explicitly (rather than relying on rows.saturating_sub(1) in expected) and d.SampleDesc.Count == 1 in footprint_fits makes pub(crate) fn read_back safe even if called without the caller's MSAA filter (capture.rs:351, 376).
**@⁠fuzeofficlal** on GitHub · 2026-11-26 21:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/3388#pullrequestreview-6080875474) · **requested changes** The footprint validation (`footprint_fits`), `read_back` bounds checks, and typeless format decoding look solid — all 14 `capture::` unit tests and a live 10-format D3D12 `read_back` matrix (`R8G8B8A8_UNORM` 64x64 and 1x1, `R16G16B16A16_FLOAT`, `R32_TYPELESS`, `D24_UNORM_S8_UINT`, `R24G8_TYPELESS`, `D32_FLOAT_S8X24_UINT`, `B5G5R5A1_UNORM`, `BC7_UNORM`, and `TEXTURE3D` 16x16x4) pass on both RTX 5090 and WARP with `VICTORY_D3D12_DEBUG=1` and zero debug layer errors. One blocking lint failure needs fixing before merge: ### Blocking: `clippy --features diagnostics --all-targets -- -D warnings` fails on `capture.rs:1143` - `crates/victory-gpu/src/capture.rs:1143` ``` error: this assertion has a constant value --> crates\victory-gpu\src\capture.rs:1143:9 | 1143 | assert!(MAX_READBACK >= 2560 * 1440); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: consider moving this into a const block: `const { assert!(..) }` ``` Changing this line to `const { assert!(MAX_READBACK >= 2560 * 1440); }` clears `cargo clippy --locked -p victory-gpu --features diagnostics --all-targets -- -D warnings`. ### Additional hardening notes (non-blocking) - `crates/victory-gpu/src/capture.rs:629`: `dump_one` creates `std::slice::from_raw_parts(data.cast::<u8>(), pitch * f.Height as usize)`, which exceeds the `total`-byte readback buffer whenever the final row is shorter than `RowPitch` or the format is block-compressed (observed on both RTX 5090 and WARP: e.g., `R8G8B8A8_UNORM` 1x1 allocates `4` bytes vs `256`; `D24_UNORM_S8_UINT` 64x64 allocates `32,512` vs `32,768`; `BC7_UNORM` 64x64 allocates `4,096` vs `16,384`). Sizing the mapped slice to the actual readback buffer length (`buffer.GetDesc().Width as usize`) avoids creating an out-of-bounds slice. - `crates/victory-gpu/src/capture.rs:140, 199`: Checking `rows == 0 || row == 0` explicitly (rather than relying on `rows.saturating_sub(1)` in `expected`) and `d.SampleDesc.Count == 1` in `footprint_fits` makes `pub(crate) fn read_back` safe even if called without the caller's MSAA filter (`capture.rs:351, 376`).
Author
Owner

@⁠neonbyte1 on GitHub · 2026-11-26 22:14 UTC · original

Pushed a follow-up commit 27a3b6d3 ("GPU: dumps map their rows, not their
pitch, and refuse no rows at all") on top of ecb0e7ec; the reviewed commit
is unchanged. Thanks for the live matrix — the buffer-vs-pitch numbers are
exactly what item 2 needed.

1. Blocking lint (capture.rs:1143). Fixed: the assertion is now a const
block,

const {
    assert!(MAX_READBACK >= 2560 * 1440);
}

(one per line, as rustfmt wants it). Why my earlier check missed it: I ran
cargo clippy -p victory-gpu [--all-features] -- -D warnings without
--all-targets
, so the #[cfg(test)] module was never compiled and no lint
in it could fire — not a toolchain difference; the pinned toolchain
(rust-toolchain.toml, 1.98.1) is the one I was already using, and the
reviewer's command reproduces on it. Now run, all clean with -D warnings:

  • cargo clippy --locked -p victory-gpu --features diagnostics --all-targets --target x86_64-pc-windows-msvc
    (the reviewer's exact command),
  • the same with default features and with --all-features,
  • the CI forms cargo clippy --locked --workspace --all-targets and
    --all-features.

2. The mapped slice in dump_one. It is now sized to the read-back
buffer's own bytes, buffer.GetDesc().Width (bounded by MAX_READBACK), and
the span within it is row_bytes(pitch, rows, last_row) — a new pure function
(pitch * (rows - 1) + row, every row pitched but the last). Everything that
reads the mapping stays inside it: to_rgba's widest index is the last row's
own size, and the "tiny target" window uses the same row size instead of
width * texel. Block-compressed footprints are refused as undecoded (as
before — to_rgba never decoded them, and their height is texels, not rows of
blocks), so a BC height no longer sizes a slice.

The new test tests::a_mapping_spans_its_rows_and_not_its_pitch pins the
numbers from your matrix: 1×1 R8G8B8A8_UNORM → 4 (not 256), D24_UNORM_S8_UINT
64×64 → 32,512 (not 32,768), BC7_UNORM 64×64 → 4,096 (not 16,384), plus
2560×1440 R8_UNORM and the empty cases (no rows, no row, row > pitch).

On #601: this stays minimal and complementary — the only change to dump_one
is the length of the mapped slice and the row window inside it; nothing else
in that function moves, so the two changes should not conflict textually or
semantically (both bound the same slice).

3. read_back / footprint_fits. read_back now refuses a footprint that
names no rows, or no bytes in a row, by name (the same row_bytes, so
rows.saturating_sub(1) no longer carries the check), and footprint_fits
requires d.SampleDesc.Count == 1, so a caller that did not pre-filter
multi-sampled resources is safe too. Both cases are in the tests: the
multi-sampled description is refused in
tests::footprints_of_failed_copies_are_refused, and the zero-row/zero-row-size/
row-longer-than-pitch cases in tests::a_mapping_spans_its_rows_and_not_its_pitch.

Checks. CPU-only (no device): capture::tests 9/9 and capture::r32_tests
6/6 under Wine in a headless gamescope. Clippy as listed above, all three
feature configs plus the two workspace forms, -D warnings, clean.
Formatting of the changed lines is clean for both commits.

AI-assisted (Claude); no game data shared.

**@⁠neonbyte1** on GitHub · 2026-11-26 22:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/3388#issuecomment-7204486751) Pushed a follow-up commit `27a3b6d3` ("GPU: dumps map their rows, not their pitch, and refuse no rows at all") on top of `ecb0e7ec`; the reviewed commit is unchanged. Thanks for the live matrix — the buffer-vs-pitch numbers are exactly what item 2 needed. **1. Blocking lint (`capture.rs:1143`).** Fixed: the assertion is now a const block, ```rust const { assert!(MAX_READBACK >= 2560 * 1440); } ``` (one per line, as `rustfmt` wants it). Why my earlier check missed it: I ran `cargo clippy -p victory-gpu [--all-features] -- -D warnings` **without `--all-targets`**, so the `#[cfg(test)]` module was never compiled and no lint in it could fire — not a toolchain difference; the pinned toolchain (`rust-toolchain.toml`, 1.98.1) is the one I was already using, and the reviewer's command reproduces on it. Now run, all clean with `-D warnings`: * `cargo clippy --locked -p victory-gpu --features diagnostics --all-targets --target x86_64-pc-windows-msvc` (the reviewer's exact command), * the same with default features and with `--all-features`, * the CI forms `cargo clippy --locked --workspace --all-targets` and `--all-features`. **2. The mapped slice in `dump_one`.** It is now sized to the read-back buffer's own bytes, `buffer.GetDesc().Width` (bounded by `MAX_READBACK`), and the span within it is `row_bytes(pitch, rows, last_row)` — a new pure function (`pitch * (rows - 1) + row`, every row pitched but the last). Everything that reads the mapping stays inside it: `to_rgba`'s widest index is the last row's own size, and the "tiny target" window uses the same row size instead of `width * texel`. Block-compressed footprints are refused as undecoded (as before — `to_rgba` never decoded them, and their height is texels, not rows of blocks), so a BC height no longer sizes a slice. The new test `tests::a_mapping_spans_its_rows_and_not_its_pitch` pins the numbers from your matrix: 1×1 `R8G8B8A8_UNORM` → 4 (not 256), `D24_UNORM_S8_UINT` 64×64 → 32,512 (not 32,768), `BC7_UNORM` 64×64 → 4,096 (not 16,384), plus 2560×1440 `R8_UNORM` and the empty cases (no rows, no row, row > pitch). On #601: this stays minimal and complementary — the only change to `dump_one` is the length of the mapped slice and the row window inside it; nothing else in that function moves, so the two changes should not conflict textually or semantically (both bound the same slice). **3. `read_back` / `footprint_fits`.** `read_back` now refuses a footprint that names no rows, or no bytes in a row, by name (the same `row_bytes`, so `rows.saturating_sub(1)` no longer carries the check), and `footprint_fits` requires `d.SampleDesc.Count == 1`, so a caller that did not pre-filter multi-sampled resources is safe too. Both cases are in the tests: the multi-sampled description is refused in `tests::footprints_of_failed_copies_are_refused`, and the zero-row/zero-row-size/ row-longer-than-pitch cases in `tests::a_mapping_spans_its_rows_and_not_its_pitch`. **Checks.** CPU-only (no device): `capture::tests` 9/9 and `capture::r32_tests` 6/6 under Wine in a headless gamescope. Clippy as listed above, all three feature configs plus the two workspace forms, `-D warnings`, clean. Formatting of the changed lines is clean for both commits. _AI-assisted (Claude); no game data shared._
Author
Owner

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

Verified the updated head (27a3b6d3) merged cleanly onto main (63bcca43) — all items from the previous review are resolved.

Verification

  • cargo xtask policy: 191 files ok.
  • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings (both default and --features diagnostics): 0 warnings; the const { assert!(MAX_READBACK >= 2560 * 1440); } block (crates/victory-gpu/src/capture.rs:1194-1196) resolves the diagnostics clippy failure.
  • capture::tests:: (9/9) passed on both a discrete NVIDIA RTX 5090 and WARP with --features diagnostics and VICTORY_D3D12_DEBUG=1.
  • Ran a 12-case live D3D12 readback matrix on both RTX 5090 and WARP with VICTORY_D3D12_DEBUG=1 (1x1 R8G8B8A8_UNORM, 64x64 R8G8B8A8_UNORM / R8G8B8A8_TYPELESS / R32_TYPELESS / R24G8_TYPELESS / BC7_UNORM, 16x16 R32_FLOAT / R32_UINT / R32G32B32_FLOAT / R32G32B32A32_FLOAT, 32x32 R16G16B16A16_FLOAT, and 4x MSAA R8G8B8A8_UNORM): all 12 cases passed with 0 Debug Layer errors, confirming exact span bounds in dump_one (capture.rs:651-672), row_bytes handling (capture.rs:137-140), BC block skipping, and clean MSAA refusal in read_back (capture.rs:171).

LGTM.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 22:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/3388#pullrequestreview-6081219279) · **approved these changes** Verified the updated head (`27a3b6d3`) merged cleanly onto `main` (`63bcca43`) — all items from the previous review are resolved. ### Verification - `cargo xtask policy`: 191 files ok. - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` (both default and `--features diagnostics`): 0 warnings; the `const { assert!(MAX_READBACK >= 2560 * 1440); }` block (`crates/victory-gpu/src/capture.rs:1194-1196`) resolves the diagnostics clippy failure. - `capture::tests::` (9/9) passed on both a discrete NVIDIA RTX 5090 and WARP with `--features diagnostics` and `VICTORY_D3D12_DEBUG=1`. - Ran a 12-case live D3D12 readback matrix on both RTX 5090 and WARP with `VICTORY_D3D12_DEBUG=1` (`1x1` `R8G8B8A8_UNORM`, `64x64` `R8G8B8A8_UNORM` / `R8G8B8A8_TYPELESS` / `R32_TYPELESS` / `R24G8_TYPELESS` / `BC7_UNORM`, `16x16` `R32_FLOAT` / `R32_UINT` / `R32G32B32_FLOAT` / `R32G32B32A32_FLOAT`, `32x32` `R16G16B16A16_FLOAT`, and `4x` MSAA `R8G8B8A8_UNORM`): all 12 cases passed with 0 Debug Layer errors, confirming exact `span` bounds in `dump_one` (`capture.rs:651-672`), `row_bytes` handling (`capture.rs:137-140`), BC block skipping, and clean MSAA refusal in `read_back` (`capture.rs:171`). LGTM.
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/3388/head:github-bot/gh-3388'
git switch 'github-bot/gh-3388'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3388'
git switch 'github-bot/gh-3388'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3388'
git switch 'github-bot/gh-3388'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3388'
git switch 'main'
git merge --squash 'github-bot/gh-3388'
git switch 'main'
git merge --ff-only 'github-bot/gh-3388'
git switch 'main'
git merge 'github-bot/gh-3388'
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!3388
No description provided.