Capture: preserve short words in tiny target logs #2817

Open
andrewpozdnakov7-jpg wants to merge 2 commits from upstream-pr/2819 into main
andrewpozdnakov7-jpg commented 2026-11-25 21:26:22 +00:00 (Migrated from github.com)

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


The tiny target log groups each row into four-byte words. If the row ends in a shorter group, converting that slice directly to a four-byte array fails and the log prints zero. A 1x1 R8 or R16 target can therefore have nonzero bytes while its entire raw-value line shows zero.

Keep the existing hexadecimal and float descriptions for complete words. Print a short group as little-endian hex with two digits per byte, without including the row pitch padding in that group.

The same synthetic test checks one-, two-, and three-byte remainders, two separately padded rows, and an unchanged complete word. The base prints 0x0=0 in place of 0x3c00 and 0x0001 on the two R16 rows. On the patch all three capture unit tests pass. No game data used. AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6614078845 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2819). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-25T21:26:22Z. --- The tiny target log groups each row into four-byte words. If the row ends in a shorter group, converting that slice directly to a four-byte array fails and the log prints zero. A 1x1 R8 or R16 target can therefore have nonzero bytes while its entire raw-value line shows zero. Keep the existing hexadecimal and float descriptions for complete words. Print a short group as little-endian hex with two digits per byte, without including the row pitch padding in that group. The same synthetic test checks one-, two-, and three-byte remainders, two separately padded rows, and an unchanged complete word. The base prints `0x0=0` in place of `0x3c00` and `0x0001` on the two R16 rows. On the patch all three capture unit tests pass. No game data used. AI-assisted.
kotekompotek commented 2026-11-25 22:04:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T21:51:35Z.

Review: COMMENTED


Good fix: the old try_into().unwrap_or_default() printed a short tail chunk zero-padded as a full f32 word, misleadingly. Width-aware hex for partial words preserves the distinction. Test covers both. LGTM.

<!-- greyfinch-sync:Marvisak/VIctory:review:6065472285 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2819#pullrequestreview-6065472285). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T21:51:35Z. **Review:** COMMENTED --- Good fix: the old try_into().unwrap_or_default() printed a short tail chunk zero-padded as a full f32 word, misleadingly. Width-aware hex for partial words preserves the distinction. Test covers both. LGTM.
fuzeofficlal commented 2026-11-25 22:04:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T21:41:00Z.


Verified 3bbcde9b on Windows 11 (RTX 5090 + WARP):

  • cargo xtask policy: 184 files ok; cargo clippy --locked -p victory-gpu --all-targets -- -D warnings (default & --features diagnostics): 0 warnings.
  • capture::tests: 3/3 passed on both RTX 5090 and WARP (including tiny_capture_keeps_short_words_on_each_row).
  • tiny_words cleanly prints complete 4-byte chunks as {w:#x}={f32} and preserves trailing 1–3 byte slices in little-endian hex without zeroing them out. Clean git merge-tree against origin/main 13f91ca.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7175402894 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2819#issuecomment-7175402894). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T21:41:00Z. --- Verified `3bbcde9b` on Windows 11 (RTX 5090 + WARP): - `cargo xtask policy`: 184 files ok; `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` (default & `--features diagnostics`): 0 warnings. - `capture::tests`: 3/3 passed on both RTX 5090 and WARP (including `tiny_capture_keeps_short_words_on_each_row`). - `tiny_words` cleanly prints complete 4-byte chunks as `{w:#x}={f32}` and preserves trailing 1–3 byte slices in little-endian hex without zeroing them out. Clean `git merge-tree` against `origin/main` `13f91ca`.
Marvisak commented 2026-11-26 03:05:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T02:21:19Z.


Automated triage for the maintainers.

A small diagnostics fix in capture.rs. The tiny-target log converted a short trailing group (fewer than 4 bytes, for example a 1x1 R8 or R16 target) with try_into().unwrap_or_default() and printed 0. The new tiny_words pads the group and prints it as hex, and complete words print as before. The unit test covers 1-, 2- and 3-byte remainders and per-row padding.

CI: passing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7180723909 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2819#issuecomment-7180723909). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-26T02:21:19Z. --- <!-- victory-triage v1 head=642dbc2f93eb7abcd21ce9f304df29ab6d1a494c verdict=merge-candidate at=2026-11-26T02:21:13Z --> Automated triage for the maintainers. A small diagnostics fix in `capture.rs`. The tiny-target log converted a short trailing group (fewer than 4 bytes, for example a 1x1 R8 or R16 target) with `try_into().unwrap_or_default()` and printed `0`. The new `tiny_words` pads the group and prints it as hex, and complete words print as before. The unit test covers 1-, 2- and 3-byte remainders and per-row padding. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Dukestar69 commented 2026-11-26 04:05:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T03:48:52Z.

Review: APPROVED


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

  • cargo test -p victory-gpu --features diagnostics --lib capture::tests: 6 passed, 0 failed (including new tiny_capture_keeps_short_words_on_each_row).
  • cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.
  • cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

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

<!-- greyfinch-sync:Marvisak/VIctory:review:6068293302 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2819#pullrequestreview-6068293302). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T03:48:52Z. **Review:** APPROVED --- Tested merged onto `origin/main` (`63bcca4`) on Windows 11 x64: - `cargo test -p victory-gpu --features diagnostics --lib capture::tests`: **6 passed, 0 failed** (including new `tiny_capture_keeps_short_words_on_each_row`). - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: clean. - `cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.

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

git switch 'main'
git merge --no-ff 'upstream-pr/2819'
git switch 'upstream-pr/2819'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2819'
git switch 'upstream-pr/2819'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2819'
git switch 'main'
git merge --squash 'upstream-pr/2819'
git switch 'main'
git merge --ff-only 'upstream-pr/2819'
git switch 'main'
git merge 'upstream-pr/2819'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!2817
No description provided.