Repository navigation
D3D12.X: GFX10 image format 134 (1_5_5_5) is B5G5R5A1, not 135 (#946) - #990
Conversation
…ev#946) dxgi_format mapped IMG_FORMAT 135 to DXGI B5G5R5A1. In the GFX10 format enum (Mesa's register database) 134 is 1_5_5_5_UNORM and 135 is 5_5_5_1_UNORM; the names list the fields from the top bit down, so 1_5_5_5 has x in bits 0-4 and w in bit 15, which is B5G5R5A1. 5_5_5_1 keeps its one-bit field in bit 0, which no DXGI format has. So a B5G5R5A1 T# (134) had no DXGI format and its view was refused, a 5_5_5_1 T# was read with B5G5R5A1's layout, and gfx10_format gave 135 for the T#s XCL writes for its own B5G5R5A1 views. The tiling size class (133..=136, two bytes) is the same for both codes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
NVIDIA run, since Not tested lists NVIDIA. Tested
Not tested
AI use
|
|
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on Same count as the baseline — the format-134 (1_5_5_5) change is exercised by existing coverage and nothing regresses. Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it. |
|
Merged in a610eb5 – thanks, and thanks to @fromthemoonx and @dcastell1 for the checks (the test fails with 135 again). Tested on the merged batch (#990, #1037, #951, #1016): |
gpu::desc::dxgi_formatmapped GFX10 image format 135 to DXGI B5G5R5A1. In the GFX10 format enum (Mesa'ssrc/amd/registers/gfx10-rsrc.json,GFX10_FORMAT), 134 is1_5_5_5_UNORMand 135 is5_5_5_1_UNORM. The names list the fields from the top bit down (gfx10_format_table.pyreverses them into little-endian order), so 1_5_5_5 has x in bits 0–4 and w in bit 15, which is B5G5R5A1. 5_5_5_1 keeps its one-bit field in bit 0, which no DXGI format has. Fixes #946.As it was:
image_d3d12refused its view;gfx10_format(DXGI_FORMAT_B5G5R5A1_UNORM)gave 135, the format XCL writes into the T#s of its own B5G5R5A1 views.The tiling size class (
133..=136, two bytes) is the same for both codes.What is in it
crates/xcl/src/gpu/desc.rs: 134, not 135, maps to B5G5R5A1.packed_formats_reorder_channels, extended:dxgi_format(134)is B5G5R5A1 with the BGRA order,dxgi_format(135)is None, andgfx10_formatgives 134. It fails without the change (left: None).Tested
x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug for the suite, release for the runs.cargo test --workspace -- --test-threads=4at 87fae1f: 724 passed, 0 failed, 41 ignored; noSKIPPEDlines.GFX10_FORMAT: 1335_6_5_UNORM, 1341_5_5_5_UNORM, 1355_5_5_1_UNORM, 1364_4_4_4_UNORM).Regression run
The
gpu:line names a virtual display adapter of this machine (what #281 / #282 / #285 fix); XCL's log namesbackend 'real' – AMD Radeon RX 9060 XT (16188 MiB VRAM).main:
PR:
Not tested
AI use
🤖 Generated with Claude Code