GPU capture: decode R32G32_UINT targets #2527

Open
github-bot wants to merge 1 commit from github-bot/gh-2527 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 15:19 UTC · original
andrewpozdnakov7-jpg:codex2/capture-rg32-uint → main · +15 −0 · 1 files · 1 commits · open

VICTORY_DUMP_TARGETS can read back an R32G32_UINT texture, but the PNG conversion has no decoder for the format. As a result, it logs target not dumped: format even if the readback succeeded.

Decode both 32-bit channels as unsigned integers, with blue set to zero, then apply the existing diagnostic scaling.

The same two synthetic rows are unsupported on 940d32f and produce [255, 127, 0, 255] and [0, 255, 0, 255] with the change. Both rows contain values at or above the signed 32-bit boundary and unused padding with u32::MAX, so the test also checks unsigned interpretation and row pitch. All three capture tests, strict GPU diagnostics Clippy, and staged asset policy passed on Windows.

Coordination claim

Please retain the Git author when cherry-picking or rebasing. If you fold the change into another commit, please add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

AI-assisted with Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 15:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/2527) `andrewpozdnakov7-jpg:codex2/capture-rg32-uint` → `main` · +15 −0 · 1 files · 1 commits · open `VICTORY_DUMP_TARGETS` can read back an `R32G32_UINT` texture, but the PNG conversion has no decoder for the format. As a result, it logs `target not dumped: format` even if the readback succeeded. Decode both 32-bit channels as unsigned integers, with blue set to zero, then apply the existing diagnostic scaling. The same two synthetic rows are unsupported on `940d32f` and produce `[255, 127, 0, 255]` and `[0, 255, 0, 255]` with the change. Both rows contain values at or above the signed 32-bit boundary and unused padding with `u32::MAX`, so the test also checks unsigned interpretation and row pitch. All three capture tests, strict GPU diagnostics Clippy, and staged asset policy passed on Windows. [Coordination claim](https://git.gtahub.st/github/Marvisak--VIctory/issues/1633) Please retain the Git author when cherry-picking or rebasing. If you fold the change into another commit, please add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`. AI-assisted with Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:08:18 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 18:32 UTC · original

Automated triage for the maintainers.

Merge candidate (small). In capture::to_rgba (crates/victory-gpu/src/capture.rs), this adds format 17 (R32G32_UINT). Its two channels are read as unsigned integers with an 8-byte stride, next to the existing R32G32_FLOAT arm (15..=16), so diagnostic captures of such targets are no longer skipped. I checked the new test's expected bytes by hand against the 99th-percentile scaling and the row pitch: they match. It only affects diagnostic captures. CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 18:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/2527#issuecomment-7171048799) <!-- victory-triage v1 head=557650c49285fbf690c344e4d82ada9b14b6c5e5 verdict=merge-candidate at=2026-11-25T18:32:20Z --> Automated triage for the maintainers. **Merge candidate (small).** In `capture::to_rgba` (`crates/victory-gpu/src/capture.rs`), this adds format 17 (`R32G32_UINT`). Its two channels are read as unsigned integers with an 8-byte stride, next to the existing `R32G32_FLOAT` arm (15..=16), so diagnostic captures of such targets are no longer skipped. I checked the new test's expected bytes by hand against the 99th-percentile scaling and the row pitch: they match. It only affects diagnostic captures. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 01:02 UTC · original

Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 557650c (on its base 940d32f).

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: 696 passed, 0 failed, 10 ignored.
  • rg32_uint_channels_are_unsigned_and_skip_padding only builds with the diagnostics feature, so the run above doesn't include it; it passes 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 01:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/2527#issuecomment-7179368318) Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `557650c` (on its base `940d32f`). **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`: **696 passed, 0 failed, 10 ignored**. - `rg32_uint_channels_are_unsigned_and_skip_padding` only builds with the `diagnostics` feature, so the run above doesn't include it; it passes 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.
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/2527/head:github-bot/gh-2527'
git switch 'github-bot/gh-2527'

Merge

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