Tests: format_bytes agrees with the driver's element size, and gfx10_format inverts dxgi_format #548
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!548
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-548"
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?
@MesshM on GitHub · 2026-11-24 01:37 UTC · original
MesshM:tests/format-bytes-driver→main· +64 −0 · 1 files · 1 commits · opengpu::desc::format_byteshas no test. Typed buffer views take their element stride from it (real::buffer_words_atand the V# path next to it), so a wrong entry gives a title's typed buffer loads the wrong stride. This adds an integration test that checks it against the PC driver on the same machine, plus a check thatgfx10_formatinvertsdxgi_format. Test-only: nothing undercrates/xcl/srcchanges.What is in it
crates/xcl/tests/format_bytes_driver.rs:format_bytes_matches_the_drivers_element_size: for every GFX10 format 0–77 (the rangeformat_bytesdocuments) thatdxgi_formatmaps,format_bytesequals the element size of a 64-texel row from the device'sGetCopyableFootprintsin that DXGI format. Skips withskip_test("no GPU")when no device can be made.gfx10_format_inverts_dxgi_format: for every format 0–255 thatdxgi_formatmaps,gfx10_formatgives it back (no two GFX10 formats share a DXGI one). No device needed.Tested
stable-x86_64-pc-windows-msvc, debug.\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4) onmain7ebf1b8+ this file: 679 passed, 0 failed, 41 ignored, exit code 0; 0SKIPPEDcargo test -p xcl --test format_bytes_driver: 2 passed; 42 formats of 0–77 checked against the driver, all equalformat_bytes's7..=19 => 2changed to=> 1(not committed), the test fails and names each 16-bit format (format 7 (DXGI_FORMAT(56)): format_bytes 1, driver 2; …)Regression run
crates/xcl/tests/;xcl.exedoes not change.Not tested
format_bytesfalls back to 4, while the driver gives 2 for B5G6R5 / B5G5R5A1 / B4G4R4A4 (133, 135, 136) and 8 or 16 bytes per 4x4 block for BC1–BC7 (169–182). BC formats cannot be buffer formats, and 16-bit packed typed buffer views are unusual; the use where these formats do come up isreal::texture_memory, which sizes the address space it reserves for a committed texture from it, so a BC texture gets 4–8 times the space it needs and a very large one can pass the 1 GiB limit there. That is a runtime change, so not in this PR.AI use
🤖 Generated with Claude Code
@thehollowedone on GitHub · 2026-11-24 01:41 UTC · original
Tested
Both focused tests passed on Windows 11 build 26300 with the RTX 3080 Ti (621.35), Ryzen 7 9800X3D and Rust 1.99.1 MSVC, debug. With
XCL_REQUIRE_GPU=1,cargo test --offline --locked -p xcl --test format_bytes_driver -- --test-threads=1 --nocapturereported 2 passed, 0 failed, 0 ignored and no runtime skips. The mapped formats in the tested 0–77 range matched the driver’s row element sizes. The inverse-format test also passed. Tested commit 0e71923Not tested
Full workspace, retail titles, Intel, WARP, and driver element sizes for formats outside the fixture’s range.
AI use
Codex with GPT-6.2 Sol ran the tests and drafted this report.
@MonkeyPython on GitHub · 2026-11-24 02:11 UTC · original
NVIDIA data point (the "NVIDIA / Intel / WARP" gap):
format_bytesagrees with the driver's element sizes on an RTX 3080 Ti.Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, RTX 3080 Ti 12 GB (driver 621.01), PR head
0e71923, release build.Runs:
cargo test -p xcl --release --test format_bytes_driver -- --test-threads=4: 2 passed / 0 failed / 0 ignored in 0.22 s, no internal skips — the console-format-vs-GetCopyableFootprintscomparison (formats 0–77 with a DXGI counterpart, test asserts ≥ 40 checked) holds on NVIDIA.SKIPPED(gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware— the wave64 pair on this wave32-only adapter).Not tested: Intel, WARP (no CI-runner access from this host).
AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the tests and wrote this report from the logs; a human reviews it before posting. No code changes.
@JoaoPauluu on GitHub · 2026-11-24 03:50 UTC · original
Test report: #548 under Wine with vkd3d-proton as the host driver (Linux, NVIDIA)
The other runs here are native Windows drivers. Under Wine, the host driver this test compares XCL with is vkd3d-proton (D3D12 on Vulkan), and the test passes there as well.
Setup
experimental-11.0-20261112(wine-11.0), vkd3d-proton v3.1 (4522cc1a) + the patch from #257, DXVK from Proton,DXVK_CONFIG="dxgi.hideNvidiaGpu = False"x86_64-pc-windows-gnu(mingw-w64-gcc 16.2.0), debug build of this PR's head0e71923Result:
format_bytes_drivertest binary under Wine,--test-threads=1: 2 passed, 0 failed, 0 ignored (one run).format_bytes_matches_the_drivers_element_size,gfx10_format_inverts_dxgi_format: okNot tested
AI use: Claude Code (Claude Opus 5.5) built the test, ran it on the machine above and wrote this report. The results are pasted from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one.
@JJAutoCompare on GitHub · 2026-11-25 06:55 UTC · original
Empirical test report (
0e71923f)Independent Intel Arc A770 D3D12 verification of PR #548 at detached head
0e71923f0732dbc79f87764ea321aa8bdbf38e30(clean worktree).Hardware / environment
32.0.101.9175), AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation x64 build26200.9974.rustc 1.100.0 (0ef1bc386 2026-11-09)(x86_64-pc-windows-msvc), DXC1.9.2609.5 (01b62ad47), unoptimized Cargo test profile with debug info and incremental compilation disabled.Commands and results
cargo test -p xcl --tests --no-run --message-format=jsonoutside the GPU lock.Invoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1:format_parity.exe --nocapture --test-threads=1(exit 0, 0.09s).Observed behavior
format_bytes_matches_the_drivers_element_sizeandgfx10_format_inverts_dxgi_formatboth passed on the default D3D12 adapter (Intel Arc A770 on this host).Not tested
AI use
Verified and published with T3 Code / Antigravity (gemini-4-neon).
@DavidM1911 on GitHub · 2026-11-25 13:30 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.