Diagnostics: decode signed 32-bit color captures #2607

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

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 16:43 UTC · original
andrewpozdnakov7-jpg:codex2/capture-signed-32-bit-colors → main · +26 −0 · 1 files · 2 commits · open

Diagnostic PNG dumps skip R32G32_SINT and R32G32B32A32_SINT because the converter has no entries for these formats. Decode the color components as signed 32-bit integers and use the existing diagnostic scaling. DXGI format definitions

With the same two pitched rows for each format, 67e8ae1 returns None for both images. The patch emits the expected red, green and blue samples, including negative inputs that clamp to zero. The RGBA fixture carries sentinel source alpha and both fixtures carry sentinel row padding.

The three diagnostics capture tests, strict GPU Clippy, and staged asset policy pass.

Coordination claim

If you cherry-pick or rebase this commit, please retain its Git author. If you fold the change into another commit, please add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

AI-assisted. Verification used synthetic readback data.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 16:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/2607) `andrewpozdnakov7-jpg:codex2/capture-signed-32-bit-colors` → `main` · +26 −0 · 1 files · 2 commits · open Diagnostic PNG dumps skip `R32G32_SINT` and `R32G32B32A32_SINT` because the converter has no entries for these formats. Decode the color components as signed 32-bit integers and use the existing diagnostic scaling. [DXGI format definitions](https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format) With the same two pitched rows for each format, `67e8ae1` returns `None` for both images. The patch emits the expected red, green and blue samples, including negative inputs that clamp to zero. The RGBA fixture carries sentinel source alpha and both fixtures carry sentinel row padding. The three diagnostics capture tests, strict GPU Clippy, and staged asset policy pass. [Coordination claim](https://git.gtahub.st/github/Marvisak--VIctory/issues/1633) If you cherry-pick or rebase this commit, please retain its Git author. If you fold the change into another commit, please add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`. AI-assisted. Verification used synthetic readback data.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:10:12 +00:00
Author
Owner

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

Reviewed: format ids check out (4 = R32G32B32A32_SINT / 16 B, 18 = R32G32_SINT / 8 B) and u32_at as i32 as f32 is the right reinterpret. Test covers negative extremes and the pitch path. CI green.

**@⁠kotekompotek** on GitHub · 2026-11-25 17:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/2607#issuecomment-7169945915) Reviewed: format ids check out (4 = R32G32B32A32_SINT / 16 B, 18 = R32G32_SINT / 8 B) and `u32_at as i32 as f32` is the right reinterpret. Test covers negative extremes and the pitch path. CI green.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 23:20 UTC · original

Automated triage for the maintainers.

This adds R32G32B32A32_SINT (4, 16 bytes) and R32G32_SINT (18, 8 bytes) to the channel decoders in to_rgba (crates/victory-gpu/src/capture.rs), reinterpreting each word as i32 before the existing colour scaling, so these targets are dumped instead of returning None. I checked the format numbers and texel sizes against the DXGI enum and worked through the test's expected bytes against the p99 scaling (negatives clamp to 0, 2^29 of 2^30 gives 127); the matching UINT formats (3, 17) are still unhandled and could follow separately. CI: check passing.

This is a recommendation for a maintainer to look, not an approval.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 23:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2607#issuecomment-7177426657) <!-- victory-triage v1 head=19b16029a990c67e2468699120e575016703ca5a verdict=merge-candidate at=2026-11-25T23:20:12Z --> Automated triage for the maintainers. This adds `R32G32B32A32_SINT` (4, 16 bytes) and `R32G32_SINT` (18, 8 bytes) to the channel decoders in `to_rgba` (crates/victory-gpu/src/capture.rs), reinterpreting each word as `i32` before the existing colour scaling, so these targets are dumped instead of returning `None`. I checked the format numbers and texel sizes against the DXGI enum and worked through the test's expected bytes against the p99 scaling (negatives clamp to 0, 2^29 of 2^30 gives 127); the matching UINT formats (3, 17) are still unhandled and could follow separately. CI: `check` passing. This is a recommendation for a maintainer to look, not an approval. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 00:53 UTC · original

Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 19b1602 (on its base f3578e3).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 863 passed, 0 failed, 10 ignored.
  • signed_32_bit_color_captures_decode_negative_components only build with the diagnostics feature, so the run above doesn't include them; they pass in cargo test -p victory-gpu --lib --locked --features diagnostics (same skips).
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-26 00:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/2607#issuecomment-7179220952) Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `19b1602` (on its base `f3578e3`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **863 passed, 0 failed, 10 ignored**. - `signed_32_bit_color_captures_decode_negative_components` only build with the `diagnostics` feature, so the run above doesn't include them; they pass in `cargo test -p victory-gpu --lib --locked --features diagnostics` (same skips). - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

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

Tested locally merged onto origin/main (63bcca4) on Windows 11 x64:

  • Diff review: Adding explicit DXGI_FORMAT_R32G32B32A32_SINT (4) and DXGI_FORMAT_R32G32_SINT (18) arms in capture::to_rgba using u32_at(b, i) as i32 as f32 cleanly decodes signed 32-bit multi-channel integer color targets instead of misinterpreting negative values.
  • cargo test -p victory-gpu --features diagnostics capture::: 12 passed, 0 failed (including signed_32_bit_color_captures_decode_negative_components).
  • cargo clippy -p victory-gpu --features diagnostics --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

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

**@⁠Dukestar69** on GitHub · 2026-11-26 05:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/2607#pullrequestreview-6068905442) · **approved these changes** Tested locally merged onto `origin/main` (`63bcca4`) on Windows 11 x64: - Diff review: Adding explicit `DXGI_FORMAT_R32G32B32A32_SINT` (`4`) and `DXGI_FORMAT_R32G32_SINT` (`18`) arms in `capture::to_rgba` using `u32_at(b, i) as i32 as f32` cleanly decodes signed 32-bit multi-channel integer color targets instead of misinterpreting negative values. - `cargo test -p victory-gpu --features diagnostics capture::`: 12 passed, 0 failed (including `signed_32_bit_color_captures_decode_negative_components`). - `cargo clippy -p victory-gpu --features diagnostics --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

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

Verified 19b16029a990c67e2468699120e575016703ca5a merged cleanly onto 63bcca43 on Windows 11 with both an RTX 5090 and WARP (--features diagnostics, VICTORY_D3D12_DEBUG=1).

Code review

  • crates/victory-gpu/src/capture.rs:670-674 adds 4 (DXGI_FORMAT_R32G32B32A32_SINT, 16 bytes/texel, decoding [R, G, B] and dropping alpha) and 18 (DXGI_FORMAT_R32G32_SINT, 8 bytes/texel, decoding [R, G, 0.0]), reinterpreting each 32-bit word via u32_at(b, i) as i32 as f32.
  • Edge values behave cleanly through the existing scaling path: i32::MIN converts exactly to -2147483648.0f32 without overflow or NaN, negative components clamp to 0, all-negative and all-zero targets render opaque black, and the change also merges cleanly alongside #2636 with no conflict in capture.rs.

Verification

  • cargo xtask policy: 191 files ok.
  • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings (default and --all-features): clean.
  • RTX 5090 & WARP (--features diagnostics, VICTORY_D3D12_DEBUG=1): capture:: 12 passed, 0 failed on both adapters (including signed_32_bit_color_captures_decode_negative_components at capture.rs:771).
  • Co-merged with #2636 plus an extra edge probe covering i32::MIN, i32::MAX, all-negative RGBA32_SINT, all-zero targets, and sentinel alpha words: 14 passed, 0 failed on both RTX 5090 and WARP.
**@⁠fuzeofficlal** on GitHub · 2026-11-26 16:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/2607#pullrequestreview-6077868232) · **approved these changes** Verified `19b16029a990c67e2468699120e575016703ca5a` merged cleanly onto `63bcca43` on Windows 11 with both an RTX 5090 and WARP (`--features diagnostics`, `VICTORY_D3D12_DEBUG=1`). ### Code review - `crates/victory-gpu/src/capture.rs:670-674` adds `4` (`DXGI_FORMAT_R32G32B32A32_SINT`, 16 bytes/texel, decoding `[R, G, B]` and dropping alpha) and `18` (`DXGI_FORMAT_R32G32_SINT`, 8 bytes/texel, decoding `[R, G, 0.0]`), reinterpreting each 32-bit word via `u32_at(b, i) as i32 as f32`. - Edge values behave cleanly through the existing scaling path: `i32::MIN` converts exactly to `-2147483648.0f32` without overflow or NaN, negative components clamp to `0`, all-negative and all-zero targets render opaque black, and the change also merges cleanly alongside `#2636` with no conflict in `capture.rs`. ### Verification - `cargo xtask policy`: `191 files ok`. - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` (default and `--all-features`): clean. - RTX 5090 & WARP (`--features diagnostics`, `VICTORY_D3D12_DEBUG=1`): `capture::` **12 passed, 0 failed** on both adapters (including `signed_32_bit_color_captures_decode_negative_components` at `capture.rs:771`). - Co-merged with `#2636` plus an extra edge probe covering `i32::MIN`, `i32::MAX`, all-negative `RGBA32_SINT`, all-zero targets, and sentinel alpha words: **14 passed, 0 failed** on both RTX 5090 and WARP.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/2607/head:github-bot/gh-2607'
git switch 'github-bot/gh-2607'

Merge

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