fix(formats): map console texture formats 189-191 #225

Closed
mutlusinan wants to merge 1 commit from upstream-pr/225 into main
mutlusinan commented 2026-11-27 19:53:50 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mutlusinan on 2026-11-27T19:53:50Z.


Problem

Console texture format numbers 189, 190 and 191 had no layout: victory_formats::texture::format returned None for them, so any texture in one of those formats could not be sized or detiled.

Fix

189 and 191 are 4 bytes a texel, 190 is 1 byte; they now join the DXGI families they belong to. A test pins the three layouts.

Verification

  • cargo test -p victory-formats — 43 passed, 0 failed (5 ignored), including the new console_formats_have_layouts.
  • cargo check --workspace --target x86_64-pc-windows-msvc --locked — clean.

Ported from uiliannn/VItoriaBr 0d1c4e0 (GPL-3.0).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5532329516 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/225). Originally posted by [mutlusinan](https://github.com/mutlusinan) on 2026-11-27T19:53:50Z. --- ### Problem Console texture format numbers 189, 190 and 191 had no layout: `victory_formats::texture::format` returned `None` for them, so any texture in one of those formats could not be sized or detiled. ### Fix 189 and 191 are 4 bytes a texel, 190 is 1 byte; they now join the DXGI families they belong to. A test pins the three layouts. ### Verification - `cargo test -p victory-formats` — **43 passed, 0 failed** (5 ignored), including the new `console_formats_have_layouts`. - `cargo check --workspace --target x86_64-pc-windows-msvc --locked` — clean. Ported from uiliannn/VItoriaBr `0d1c4e0` (GPL-3.0).
mutlusinan commented 2026-11-27 20:21:22 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mutlusinan on 2026-11-27T20:21:22Z.


Risk assessment (porting review)

  • The mapping is empirical (console format numbers, not DXGI): 189 and 191 are taken as 4 bytes a texel, 190 as 1. It is not verified against a real title texture in this tree.
  • If wrong, detiling uses a wrong element size for those formats: the failure mode is garbage or out-of-range reads, not a clear log line.
  • These formats are expected to be rare; the added test only pins the table.
  • Compatibility: merges cleanly and type-checks against main at e69e39c.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7227421853 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/225#issuecomment-7227421853). Originally posted by [mutlusinan](https://github.com/mutlusinan) on 2026-11-27T20:21:22Z. --- ### Risk assessment (porting review) - The mapping is empirical (console format numbers, not DXGI): 189 and 191 are taken as 4 bytes a texel, 190 as 1. It is not verified against a real title texture in this tree. - If wrong, detiling uses a wrong element size for those formats: the failure mode is garbage or out-of-range reads, not a clear log line. - These formats are expected to be rare; the added test only pins the table. - **Compatibility:** merges cleanly and type-checks against `main` at `e69e39c`.
cloph-dsp commented 2026-11-27 22:58:41 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-27T22:58:41Z.


Independent local verification of PR #225 (map console texture formats 189–191).

  • Windows, Rust 1.100.0/MSVC (Scoop rust-msvc, no rustup/clippy), cargo test --locked, synthetic inputs only.
  • Head 9fd09c35f28b91a8db82b499b8999990f1cd4035, merge base 0cef07e9d766df48f0e95f13ce3bbbe2290fe9d3, worktree-local CARGO_TARGET_DIR.
  • Command: cargo test --locked -p victory-formats --lib -- texture::tests::console_formats_have_layouts --exact --test-threads=1 --quiet → test result: ok. 1 passed; 0 failed; 47 filtered out, exit 0.
  • Negative control: git grep -F console_formats_have_layouts 0cef07e9 -- crates/victory-formats/src/texture.rs → exit 1 (test absent on base).
  • git diff --check 0cef07e9 HEAD clean; diff 1 file, +16/-2.

Only the named test was replayed; full suite not run. GPU/driver N/A (CPU-only). AI-assisted (Hy4 flash). No game data, assets, extracted shaders, DRM or decrypt.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7229771251 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/225#issuecomment-7229771251). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-27T22:58:41Z. --- Independent local verification of PR #225 (map console texture formats 189–191). - Windows, Rust 1.100.0/MSVC (Scoop rust-msvc, no rustup/clippy), `cargo test --locked`, synthetic inputs only. - Head `9fd09c35f28b91a8db82b499b8999990f1cd4035`, merge base `0cef07e9d766df48f0e95f13ce3bbbe2290fe9d3`, worktree-local `CARGO_TARGET_DIR`. - Command: `cargo test --locked -p victory-formats --lib -- texture::tests::console_formats_have_layouts --exact --test-threads=1 --quiet` → `test result: ok. 1 passed; 0 failed; 47 filtered out`, exit 0. - Negative control: `git grep -F console_formats_have_layouts 0cef07e9 -- crates/victory-formats/src/texture.rs` → exit 1 (test absent on base). - `git diff --check 0cef07e9 HEAD` clean; diff 1 file, +16/-2. Only the named test was replayed; full suite not run. GPU/driver N/A (CPU-only). AI-assisted (Hy4 flash). No game data, assets, extracted shaders, DRM or decrypt.
trustno1-coder commented 2026-11-28 02:49:25 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-28T02:49:25Z.


Merged into main (8fc2254) and shipped in v2026.11.27.10. The commit keeps you as its author, so it counts toward the contributors list. GitHub shows this as closed rather than merged only because the commits were applied on top of the newest main (new commit IDs). Thank you!

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7232616562 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/225#issuecomment-7232616562). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-28T02:49:25Z. --- Merged into main (8fc2254) and shipped in [v2026.11.27.10](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.27.10). The commit keeps you as its author, so it counts toward the contributors list. GitHub shows this as closed rather than merged only because the commits were applied on top of the newest main (new commit IDs). Thank you!

Pull request closed

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
trustno1-coder/VIctory-NVIDIA!225
No description provided.