gpu(native): map 24 additional DXGI texture formats to Metal #24
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!24
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/24/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@claytonblythe on GitHub · 2026-11-26 09:38 UTC · original
claytonblythe:feat/metal-dxgi-texture-formats→main· +116 −9 · 3 files · 1 commits · closed without mergingSummary
Maps 24 exact 1:1 DXGI texture formats observed in live GTA VI Series S runs to Metal
MTLPixelFormats acrossvictory-backend,victory-metal, andvictory-gpu:BC1_UNORM_SRGB(72),BC2_UNORM_SRGB(75),BC3_UNORM_SRGB(78),BC7_UNORM_SRGB(99)R10G10B10A2_UNORM(24),R11G11B10_FLOAT(26),R9G9B9E5_SHAREDEXP(67)R16G16B16A16_UNORM(11),R16G16B16A16_SNORM(13),R32G32_FLOAT(16),R16G16_FLOAT(34),R16G16_UNORM(35),R8G8_UNORM(49),R8G8_SNORM(51),R16_TYPELESS(53),R16_FLOAT(54)R32G32B32A32_UINT(3),R32G32_UINT(17),R8G8B8A8_UINT(30),R16G16_UINT(36),R32_UINT(42),R8G8_UINT(50),R16_UINT(57),R8_UINT(62)Eliminates 22 of the 24 "a title texture format the host does not represent" warnings seen on boot/menu runs.
Testing
cargo test --target x86_64-apple-darwin -p victory-gpu --lib native::descriptors(3/3 passed, including newdxgi_formats_map_with_expected_block_sizestest verifying every DXGI code and block size).cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings(0 warnings).cargo xtask policy(363 files ok).@claytonblythe on GitHub · 2026-11-26 09:41 UTC · original
Live-tested on a 16 GB Apple M4 (
--console series-s,VICTORY_GUESS_GRAPHICS=1, 55 s headless):format=86B5G5R5A1andformat=115B4G4R4A4remain).no host texturecreation errors across all 24 newly mapped formats.recorded=1604 encoded=1604, 0 dropped draws, 0 OOMs).@LakshanSivakumar on GitHub · 2026-11-26 10:09 UTC · original · requested changes
Thanks for this! The native/join-2 work that just landed on main (
a2940ab) already maps 23 of these 24 formats, so this now conflicts. The one that's still missing is BC2_UNORM_SRGB (75). Could you rebase onto main and cut this down to that format (backend, Metal and the descriptors mapping), plus yourdxgi_formats_map_with_expected_block_sizestest, updated to main's format names (e.g.Rgb10a2Unorm,Rg11b10Float,Rgb9e5Float)? The test is worth keeping, since it covers every mapped code. One more detail: main maps 53 (R16_TYPELESS) separately from 56, so please keep it that way.@claytonblythe on GitHub · 2026-11-26 10:10 UTC · original
Superseded by
4a4d844andf834ddcon main (which also added B5G5R5A1/B4G4R4A4 and integer-target blend disabling). Note: in4a4d844, DXGI 50 isR8G8_UINTand 51 isR8G8_SNORM(currently mapped asRg8UnormandRg8Uint), and 75 (BC2_UNORM_SRGB) is still unmapped — happy to send a small follow-up if helpful.@LakshanSivakumar on GitHub · 2026-11-26 10:16 UTC · original
Good catch, thank you. You're right: main has 50 as
Rg8Unormand 51 asRg8Uint, but DXGI 50 is R8G8_UINT and 51 is R8G8_SNORM. Yes please, send the small follow-up: fix 50/51, add 75 (BC2_UNORM_SRGB), and include your block-size table test so this can't drift again.Pull request closed