desc: GFX10 format 135 is mapped to DXGI B5G5R5A1, which is 134 (1_5_5_5_UNORM) #946
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#946
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@DTsordas on GitHub · 2026-11-24 09:24 UTC · original
gpu::desc::dxgi_format(crates/xcl/src/gpu/desc.rs:128) maps GFX10 IMG_FORMAT 135 toDXGI_FORMAT_B5G5R5A1_UNORM. In Mesa's register database (src/amd/registers/gfx10-rsrc.json, enumGFX10_FORMAT), 134 is1_5_5_5_UNORMand 135 is5_5_5_1_UNORM.src/amd/common/gfx10_format_table.pymapsPIPE_FORMAT_B5G5R5A1_UNORM(5-bit x in bits 0–4, 1-bit w in bit 15) to1_5_5_5, so B5G5R5A1 is 134. 135 keeps its 1-bit field in bit 0, which no DXGI format has. Every other entry ofdxgi_formatmatches Mesa's enum.Effect on main
077ce40:dxgi_format(134)is None, soimage_d3d12refuses a B5G5R5A1 T#, and a 5_5_5_1 T# is read with B5G5R5A1's layout.gfx10_format(DXGI_FORMAT_B5G5R5A1_UNORM)is 135, the format XCL writes into the T#s of its B5G5R5A1 views.At runtime only
gfx10_formatreaches this table, and recompiled shaders classify both codes the same way (img_cls), so I don't expect a change a title can see.I have a fix with a unit test that fails on main. The full suite passes with it on an RX 9060 XT (debug,
cargo test --workspace -- --test-threads=4: 717 passed, 0 failed, 41 ignored, 0 SKIPPED). I'll open the PR once I have the smoke runs on a title.AI use: found and written up with Claude Code (Claude Opus 5.5), checked against Mesa's source.
@emirduran707 on GitHub · 2026-11-24 09:58 UTC · original
I confirmed this against Mesa's register database (134
1_5_5_5_UNORM, 1355_5_5_1_UNORM; the names list the fields from the top bit down) and have the fix with a test (dxgi_format(134)is B5G5R5A1, 135 has none,gfx10_formatgives 134). The PR follows once the suite and the regression run are done.AI-assisted (Claude Code, Claude Opus 5.5).
@ivall on GitHub · 2026-11-24 11:04 UTC · original
Fixed by #990 (
a610eb5): 134 (1_5_5_5) is B5G5R5A1, 135 has no DXGI format, andgfx10_formatgives 134.