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

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

@⁠mutlusinan on GitHub · 2026-11-27 19:53 UTC · original
mutlusinan:fix/formats-189-191 → main · +16 −2 · 1 files · 1 commits · open

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** on GitHub · 2026-11-27 19:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/225) `mutlusinan:fix/formats-189-191` → `main` · +16 −2 · 1 files · 1 commits · open ### 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).
The console's 189 and 191 are 4 bytes a texel (their DXGI equivalents are
block-compressed-colour and a 32-bit format), 190 one byte: they now get
layouts like the rest of their DXGI family instead of no layout at all.

Ported from uiliannn/VItoriaBr 0d1c4e0.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 19:58:41 +00:00
Author
Owner

@⁠mutlusinan on GitHub · 2026-11-27 20:21 UTC · original

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.
**@⁠mutlusinan** on GitHub · 2026-11-27 20:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/225#issuecomment-7227421853) ### 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`.
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-27 22:58 UTC · original

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.

**@⁠cloph-dsp** on GitHub · 2026-11-27 22:58 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/225#issuecomment-7229771251) 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.
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/225/head:github-bot/gh-225'
git switch 'github-bot/gh-225'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-225'
git switch 'github-bot/gh-225'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-225'
git switch 'github-bot/gh-225'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-225'
git switch 'main'
git merge --squash 'github-bot/gh-225'
git switch 'main'
git merge --ff-only 'github-bot/gh-225'
git switch 'main'
git merge 'github-bot/gh-225'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.