D3D12.X: GFX10 image format 134 (1_5_5_5) is B5G5R5A1, not 135 (#946) #990
No reviewers
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!990
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/990/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?
@emirduran707 on GitHub · 2026-11-24 10:02 UTC · original
emirduran707:gfx10-1555→main· +7 −1 · 1 files · 1 commits · merged 2026-11-24 11:03 UTCgpu::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=4at87fae1f: 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
@fromthemoonx on GitHub · 2026-11-24 10:17 UTC · original
NVIDIA run, since Not tested lists NVIDIA.
Tested
stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug87fae1fa9e1ff5da09445fb8de33d8cbf42033bb(on its base9aec53d), clean worktree:cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 724 passed, 0 failed, 41 ignored, the same total as yours.gpu::desc::tests::packed_formats_reorder_channelspassed.134 =>turned back into135 =>and the test kept,--exact gpu::desc::tests::packed_formats_reorder_channelsfails atdesc.rs:419withleft: None, right: Some((DXGI_FORMAT(86), [2, 1, 0, 3])).gfx10_formatis derived fromdxgi_format((0..=182).find(...)), and nothing else undergpu/orhle/d3d12x/hard-codes 135 for this format. So the one line also fixes the T#s XCL writes for its own B5G5R5A1 views.main6efdabc(no conflict):cargo test --workspace --no-fail-fast -- --test-threads=4: 727 passed, 0 failed, 41 ignoredcargo test -p xcl --lib gpu::descon the merged tree, 10 runs: 10 of 10 passed (11 tests each)XCL_D3D12_DEBUG=1run (test_title_draws_with_a_root_signature_under_the_debug_layer) logs the same set of debug-layer errors and warnings on the merged tree as onmain. Nothing new.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwareXCL_SAMPLE_*not setNot tested
AI use
@dcastell1 on GitHub · 2026-11-24 10:21 UTC · original
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
main@02bfd1d(baseline 727 passed, 0 failed, 41 ignored on this box; the head of this PR is based on9aec53d, which is why the base is stated):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.
@raylitebull on GitHub · 2026-11-24 10:39 UTC · original
Code/CI review only (not independently runtime-tested by me): clean merge with both checks green (
Build and test+PR description). Minimal+7/-1fix mapping GFX10 image format 134 (1_5_5_5) toB5G5R5A1instead of 135 (#946). Recommend merging, @ivall.@ivall on GitHub · 2026-11-24 11:04 UTC · original
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):cargo test --workspace --no-fail-fast -- --test-threads=4: 741 passed, 0 failed, 41 ignored, no SKIPPED. Retail title, 90 s with scripted presses, againstmainbefore the batch the same way: exit 0, no crash, no device removal, 1500 frames, peak process commit 27.7 GB against 29.2 GB.