Formats: support console texture formats 189–191 in texture layouts #11

Merged
Yoshi-233 merged 2 commits from upstream-pr/11 into main 2026-11-25 09:49:04 +00:00
Yoshi-233 commented 2026-11-25 06:25:18 +00:00 (Migrated from github.com)

Imported from uiliannn/VItoriaBr. Originally posted by Yoshi-233 on 2026-11-25T06:25:18Z.


The GPU resource table already assigns byte sizes to console formats 189, 190 and 191. The format table used by Texture::new omitted them, so layout creation returned Error::Invalid for all three.

The first commit backports @davutsimsekk's format mapping from fxceless/victory-fork#735. Formats 189 and 191 use four bytes per texel, and format 190 uses one. The second commit tests the public Texture::new entry point against RGBA8 and R8 reference layouts, including the mip and array layout.

On native Linux, I tested a synthetic 257 × 129 texture with four mip levels and two array slices in both linear and 64 KiB tiled layouts. All six cases returned Invalid on b8634af and matched their reference layouts on this branch. cargo test --locked -p victory-formats --lib passed with 26 tests passed and four ignored. This verifies CPU-side layout calculation. Actual rendering remains to be tested.

<!-- greyfinch-sync:uiliannn/VItoriaBr:issue:6598600871 --> Imported from [uiliannn/VItoriaBr](https://github.com/uiliannn/VItoriaBr/pull/11). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-25T06:25:18Z. --- The GPU resource table already assigns byte sizes to console formats 189, 190 and 191. The format table used by `Texture::new` omitted them, so layout creation returned `Error::Invalid` for all three. The first commit backports @davutsimsekk's format mapping from fxceless/victory-fork#735. Formats 189 and 191 use four bytes per texel, and format 190 uses one. The second commit tests the public `Texture::new` entry point against RGBA8 and R8 reference layouts, including the mip and array layout. On native Linux, I tested a synthetic 257 × 129 texture with four mip levels and two array slices in both linear and 64 KiB tiled layouts. All six cases returned `Invalid` on `b8634af` and matched their reference layouts on this branch. `cargo test --locked -p victory-formats --lib` passed with 26 tests passed and four ignored. This verifies CPU-side layout calculation. Actual rendering remains to be tested.
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
uiliannn/VItoriaBr!11
No description provided.