Repository navigation
Tests: add AMD vs NVIDIA D3D12 tiling, budget, and pipeline memory parity suite - #2791
GustavoEllwanger wants to merge 3 commits into
Conversation
|
Independent Windows/NVIDIA check of #2791 head Tested: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti 12 GiB (NVIDIA 621.35), rustc 1.99.1 MSVC.
Review point: Not tested: AMD/Intel, a retail title, or controlled cold NVIDIA driver caches. AI use: Codex (GPT-6.2 Sol) checked the PR's sole file and API contracts, ran these tests, and drafted this report. |
|
Ran the new dual-vendor parity suite at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. Key lines from the output:
What this adds: the author's NVIDIA data is an RTX 5060 (8 GB) on the same host, plus an RDNA2 iGPU and WARP. This is a Blackwell 16 GB part, which is the other end of the NVIDIA range for this suite. Not tested: a discrete AMD GPU here (only our NVIDIA side), a retail title, AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. |
|
Thanks @thehollowedone and @Aniseto for the independent RTX 3080 Ti and RTX 5070 Ti (16 GB) runs and the careful review! Addressed @thehollowedone's review point on
Re-tested after the update
|
|
Re-ran the dual-vendor parity suite at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. The new Not tested: a discrete AMD GPU here, a retail title, AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. |
|
Updated for exact head Tested
The complete suite was rerun after the Capabilities reported by this stack PCI Reserved-resource queries These are
PSO-construction observations on 442775d All three processes logged
Cumulative process-counter delta after the final batch was 10828..11236 KiB. Nonlocal deltas were zero throughout. These are the test's API counters and construction timings; they establish no allocation-leak, memory-saving, or cross-vendor performance conclusion. Counter-fallback calibration On the previous I repeated the independent bounded calibration in three fresh processes: All three suite summaries, 57 tiling rows, 18 PSO rows, three counter probes, source inventories and executable hashes were checked independently. Not tested Native Windows, matched-DXIL cross-vendor performance, draw/dispatch correctness, physical backing costs of the reserved textures, retail/smoke workloads, FPS, or the full workspace suite. No leak or memory-saving conclusion from these measurements. AI use OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the added test, ran and verified the suite and counter control, and drafted this report. Publication authorized by the account owner. |
Prime1997
left a comment
There was a problem hiding this comment.
Good as a bounded measurement fixture; broader parity validation remains blocked. At clean head 749b0e06c1860b8c52d5032b0a6efe776edbc205, ws9_adapter_capabilities_and_dxgi_budget and ws3_reserved_texture_tiling_overcommit_matrix both passed again, alongside the new pure injected-query regression: 3 passed, 0 failed, 0 ignored, 0 skipped. All 19 WS3 cases produced rows; none were rejected as unsupported.
The raw logs identify NVIDIA GeForce RTX 3060 Ti, vendor 0x10de, device 0x2489, wave min/max32, tiled tier4, heap tier2 and bind tier3. Examples: the 33x33x33 RGBA16F single-mip resource reported1152KiB in tiles versus640KiB allocation info; the 64x64 RGBA8 mip chain reported64KiB versus24KiB in the console4KiB estimate. These are allocation/tiling query results, not measured resident memory or proof of console-layout equivalence.
Build: cargo test --locked --offline -p xcl --test d3d12_amd_nvidia_parity --no-run --message-format=json --target-dir <isolated-target>. Each exact filter ran separately with --exact --test-threads=1 --nocapture. Windows 11 Pro26200, i5-10400,32GiB RAM, Rust1.100.0 MSVC debug. No tile heaps, mappings or shader dispatch were exercised by these two fixtures.
Not tested: AMD comparison, WS7's672 measured PSOs plus one warmup, memory reclamation, full suite or retail smoke. The updated required process/local queries now fail explicitly, while unavailable NON_LOCAL stays distinct from a true zero. The pure mem_snap_rejects_required_query_failures_and_marks_unavailable_nonlocal regression passed, covering both failures and that zero/unavailable distinction. A passing query batch does not establish AMD/NVIDIA parity or debug-layer coverage.
AI use: Codex (GPT-6) reviewed the full fixture and verified selected native results. Optional temporary Discord for coordinating contributor work, testing and comparing results.
|
Update for head Discrete RDNA4 run (listed as untested), with an RTX 3060 in the same PC: all 4 tests pass on both cards with no skips. The rows where the two drivers differ are below. Head
WS3: rows that differ between the cards (all other rows are identical):
So the packed-mip split, and with it the tile count, differs for small mipped 3D textures. The driver's WS7: driver pipeline memory, single run per card (
Not tested: repeated runs for WS7 variance, RDNA2/3 discrete, Intel, a title. |
|
Thanks @Aniseto, @SzczepanGrela, and @DarkPanda69 for the discrete RDNA4 (RX 9070 / RX 9070 XT), RTX 3060 Ti, and RTX 3060 runs! The same-host RX 9070 XT vs RTX 3060 results are especially helpful as discrete RDNA4 confirmation of both the WS3 3D packed-mip split and WS7 retention patterns. Addressed @Aniseto's Wine
Re-tested after the update
|
|
Re-ran the parity suite at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. All four pass here. The tiling matrix is identical to my earlier reports; the PSO memory numbers vary with driver-cache warmth and are not directly comparable between runs. This is a new report following the ones at Not tested: a discrete AMD GPU here, a retail title, AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. |
|
Dual-vendor run on Linux/Wine, both rigs green at First Linux/Wine rows for this suite I think, both vendors from the same test author's checklist, same commit, same DXC build (dxcompiler 1.9.2609.5):
The new Wine commit-counter path works. Both lanes report WS9 identity (verbatim):
Flagging an oddity, not a failure: on Rig B the adapter name is correctly the GTX 1070 but WS7, the vendor split (cumulative KiB after 128-PSO batches):
Identical-DXIL dedup holds on both vendors under Wine. Divergences are all in where distinct-PSO code lands: RDNA3 keeps it local, Pascal either keeps it (wave1) or pushes it to nonlocal (large batch). On the 16 GB / 8 GB box the retained 4 MiB did not shrink after release, that pattern would matter on titles with many distinct wave1 computes. WS3 tiling: ratios track within vendor granularity noise; both lanes report Tested: head Rig A: Ryzen 9 9900X, 96 GB DDR5, RX 7900 XT 20 GB, kernel 7.2.15, Mesa 26.2.5 RADV, rustc 1.94.0. Rig B: i5-10600, 16 GB DDR4, GTX 1070 8 GB, wine-10.0. Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting. |
|
Tested I verified that the local checkout matched the head of PR #2791 at With All three GPU tests passed on the RTX 3060: Not tested Full workspace suite, WARP, other GPU vendors, and retail titles. AI use Codex verified the commit, ran the tests, checked the log for skips, and drafted this report. Codex (GPT-6.2 Astra) prepared it for publication. |
|
Independent desktop NVIDIA (8 GB RTX 4060) verification of PR #2791 at head Environment
Release test results (
|
| Command | Result |
|---|---|
cargo test --release -p xcl --test d3d12_amd_nvidia_parity -- --test-threads=1 --nocapture (3 consecutive runs on RTX 4060) |
4 passed; 0 failed; 0 ignored; 0 filtered out × 3 (14.41s cold driver cache, 7.37s, 7.36s) |
XCL_ADAPTER=warp cargo test --release -p xcl --test d3d12_amd_nvidia_parity -- --test-threads=1 --nocapture |
4 passed; 0 failed; 0 ignored; 0 filtered out (0.00s; mem_snap_rejects_required_query_failures_and_marks_unavailable_nonlocal passed; all 3 GPU probes printed SKIPPED ...: WARP requested via XCL_ADAPTER) |
RTX 4060 8 GB telemetry highlights (--nocapture)
- WS9 adapter & budget:
WS9_ADAPTER | name=NVIDIA GeForce RTX 4060 | vendor=0x10de | device=0x2882 | ded_vram_mib=7956 | shared_sys_mib=16324 | uma=false | coherent_uma=false | tiled_tier=4 | heap_tier=2 | bind_tier=3 | wave_ops=true | wave_min=32 | wave_max=32 | total_lanes=3072 | mesh_tier=10 | local_budget_mib=7188 | local_used_mib=7 | nonlocal_budget_mib=15556 | nonlocal_used_mib=7 - WS3 reserved-texture tiling overcommit matrix (19 rows, identical across all 3 runs):
- Peak 3D tile overcommit:
3D_33x33x33_RGBA16F_m6(19tiles,pc_kib=1216,alloc_kib=640,pc/alloc=1.90x,pc/c4k=1.52x,shape=32x16x16),3D_33x33x33_RGBA16F_m1(pc/alloc=1.80x,pc/c4k=2.30x),3D_65x65x65_R11G11B10F_m1(pc/alloc=1.55x,pc/c4k=1.78x). - Small-mip 64 KiB floor:
2D_32x32_RGBA16F_m6(1tile,pc/c4k=5.33x),2D_64x64_RGBA8_m7(1tile,pc/c4k=2.67x). - Large RTs/MSAA:
2D_1920x1080_RGBA16F_RT(255tiles,pc/alloc=0.94x),2D_3840x2160_RGBA16F_RT(1020tiles,pc/alloc=1.00x),2D_1920x1080_RGBA8_MSAA4(510tiles,pc/alloc=1.00x).
- Peak 3D tile overcommit:
- WS7 driver PSO memory (
commit_src=PrivateUsage, NVIDIA621.14):- Run 1 (cold driver cache):
cs_small_128_distinct297.1 ms(+66424 KiB,+518.9/pso),cs_med_128_wave11299.8 ms(+32780 KiB,+256.1/pso),cs_med_128_wave2_new1305.2 ms(-1920 KiB),cs_med_128_identical9.7 ms(+0.0 KiB),cs_large_32_distinct3764.9 ms(+11012 KiB,+344.1/pso),gfx_vs_ps_128_distinct279.3 ms(+0.0 KiB); cumulative commit after release+108488.0 KiB, local VRAM delta+0.0 KiB. - Runs 2 & 3 (warm driver cache):
cs_small_128_distinct28.6 / 26.3 ms(+29960 / +29620 KiB),cs_med_128_wave127.6 / 26.4 ms(+18792 / +17508 KiB),cs_med_128_identical1.0 / 0.6 ms(+0.0 KiB),cs_large_32_distinct18.0 / 12.1 ms(+3180 / +2568 KiB),gfx_vs_ps_128_distinct26.9 / 25.4 ms(+1200 / +0.0 KiB); cumulative commit after release+53496.0 / +51944.0 KiB, local VRAM delta+0.0 KiB.
- Run 1 (cold driver cache):
Limits of coverage
- This PR adds only the standalone integration test file
crates/xcl/tests/d3d12_amd_nvidia_parity.rs(zero production crate files changed), so no separate retail binary smoke was run. - Native Windows 11 reported
commit_src=PrivateUsage; the WinePagefileUsagefallback added in commit442775d9was exercised only via the unit testmem_snap_rejects_required_query_failures_and_marks_unavailable_nonlocaland was not tested live under Wine, nor on AMD/Intel hardware.
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
|
Independent run of Environment
Command Full parity output (RTX 3060 Ti 8 GB) |
|
merge-check For cross-vendor validity, WS3's Tested candidate diff for unavailable WS3 measurementsdiff --git a/crates/xcl/tests/d3d12_amd_nvidia_parity.rs b/crates/xcl/tests/d3d12_amd_nvidia_parity.rs
index 91f0b4d9..e403d88d 100644
--- a/crates/xcl/tests/d3d12_amd_nvidia_parity.rs
+++ b/crates/xcl/tests/d3d12_amd_nvidia_parity.rs
@@ -327,6 +327,33 @@ fn console_bytes_for(c: &TexCase) -> (Option<usize>, Option<usize>, usize) {
(measure(25), measure(21), raw)
}
+fn ws3_console_4k_ratio(pc_bytes: usize, console_4k: Option<usize>) -> Option<f64> {
+ console_4k.filter(|&bytes| bytes != 0).map(|bytes| pc_bytes as f64 / bytes as f64)
+}
+
+fn ws3_allocation_bytes(bytes: u64) -> Option<u64> {
+ (bytes != u64::MAX).then_some(bytes)
+}
+
+fn ws3_kib(bytes: Option<u64>) -> String {
+ bytes.map_or_else(|| "unavailable".to_string(), |bytes| (bytes / 1024).to_string())
+}
+
+fn ws3_ratio(ratio: Option<f64>) -> String {
+ ratio.map_or_else(|| "unavailable".to_string(), |ratio| format!("{ratio:.2}x"))
+}
+
+#[test]
+fn ws3_unknown_measurements_are_not_reported_as_ratios() {
+ assert_eq!(ws3_console_4k_ratio(65536, None), None);
+ assert_eq!(ws3_allocation_bytes(u64::MAX), None);
+ assert_eq!(ws3_console_4k_ratio(65536, Some(0)), None);
+ assert_eq!(ws3_console_4k_ratio(65536, Some(32768)), Some(2.0));
+ assert_eq!(ws3_allocation_bytes(4096), Some(4096));
+ assert_eq!(ws3_kib(None), "unavailable");
+ assert_eq!(ws3_ratio(None), "unavailable");
+}
+
#[test]
fn ws3_reserved_texture_tiling_overcommit_matrix() {
let Some(hw) = open_hw_adapter() else { return };
@@ -388,19 +415,20 @@ fn ws3_reserved_texture_tiling_overcommit_matrix() {
hw.dev.GetResourceTiling(&r, Some(&mut total_tiles), Some(&mut packed), Some(&mut tile_shape), Some(&mut num_sub), 0, std::ptr::null_mut());
assert!(total_tiles > 0, "{} returned 0 tiles", c.label);
let pc_bytes = (total_tiles as usize) * 65536;
- let ratio_alloc = pc_bytes as f64 / (alloc.SizeInBytes as usize).max(1) as f64;
- let ratio_4k = pc_bytes as f64 / console_4k.unwrap_or(raw_bytes).max(1) as f64;
+ let alloc_bytes = ws3_allocation_bytes(alloc.SizeInBytes);
+ let ratio_alloc = alloc_bytes.filter(|&bytes| bytes != 0).map(|bytes| pc_bytes as f64 / bytes as f64);
+ let ratio_4k = ws3_console_4k_ratio(pc_bytes, console_4k);
println!(
- "WS3_ROW | {:26} | tiles={:4} | pc_kib={:7} | alloc_kib={:7} | c64k_kib={:7} | c4k_kib={:7} | raw_kib={:7} | pc/alloc={:4.2}x | pc/c4k={:4.2}x | shape={}x{}x{} | mips=std:{}/pack:{}/ptiles:{}",
+ "WS3_ROW | {:26} | tiles={:4} | pc_kib={:7} | alloc_kib={:>11} | c64k_kib={:>11} | c4k_kib={:>11} | raw_kib={:7} | pc/alloc={:>11} | pc/c4k={:>11} | shape={}x{}x{} | mips=std:{}/pack:{}/ptiles:{}",
c.label,
total_tiles,
pc_bytes / 1024,
- alloc.SizeInBytes / 1024,
- console_64k.map_or(0, |b| b / 1024),
- console_4k.map_or(0, |b| b / 1024),
+ ws3_kib(alloc_bytes),
+ ws3_kib(console_64k.map(|b| b as u64)),
+ ws3_kib(console_4k.map(|b| b as u64)),
raw_bytes / 1024,
- ratio_alloc,
- ratio_4k,
+ ws3_ratio(ratio_alloc),
+ ws3_ratio(ratio_4k),
tile_shape.WidthInTexels,
tile_shape.HeightInTexels,
tile_shape.DepthInTexels,
@@ -411,12 +439,12 @@ fn ws3_reserved_texture_tiling_overcommit_matrix() {
}
(Err(e), _) => {
println!(
- "WS3_ROW | {:26} | RESERVED_UNSUPPORTED ({:#x}) | alloc_kib={:7} | c64k_kib={:7} | c4k_kib={:7} | raw_kib={:7}",
+ "WS3_ROW | {:26} | RESERVED_UNSUPPORTED ({:#x}) | alloc_kib={:>11} | c64k_kib={:>11} | c4k_kib={:>11} | raw_kib={:7}",
c.label,
e.code().0 as u32,
- alloc.SizeInBytes / 1024,
- console_64k.map_or(0, |b| b / 1024),
- console_4k.map_or(0, |b| b / 1024),
+ ws3_kib(ws3_allocation_bytes(alloc.SizeInBytes)),
+ ws3_kib(console_64k.map(|b| b as u64)),
+ ws3_kib(console_4k.map(|b| b as u64)),
raw_bytes / 1024,
);
} |
|
merge-check claim |
|
merge-check |
|
No open or merged PR adds this suite. The closest is #1786 (reserved-resource tiling / CheckFeatureSupport tests), which is a different file with different checks. The new tests in AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Part of #2688 (WS3 item 1, WS7 item 3, WS9).
What is in it
crates/xcl/tests/d3d12_amd_nvidia_parity.rs, a standalone zero-game-data dual-vendor D3D12 parity & memory measurement test suite honoringXCL_ADAPTER(and skipping cleanly viarunner::skip_teston WARP / no-GPU / no-DXC hosts):ws9_adapter_capabilities_and_dxgi_budget: reports adapter identity,D3D12_OPTIONS/OPTIONS1/OPTIONS7/ARCHITECTURE1tiers (TiledResourcesTier,ResourceHeapTier,ResourceBindingTier, wave sizes,MeshShaderTier,UMA/CacheCoherentUMA), and DXGILOCAL/NON_LOCALbudgets.ws3_reserved_texture_tiling_overcommit_matrix: queriesCreateReservedResource+GetResourceTiling+GetResourceAllocationInfo(LAYOUT_UNKNOWN)across 19 synthetic 3D, RT/DSV, MSAA 4x, small-mip, BC7, and cubemap textures and compares PC 64 KiB tile footprints againstxcl::gpu::texture::placement(SW_64KB_S_X,SW_4KB_S_X) and raw logical bytes.ws7_driver_pipeline_memory_for_same_dxil: pre-compiles deterministic synthetic DXIL compute (small/medium 2-wave/identical/large) and graphics (VS+PS) batches via DXC before snapshotting, then measures processPrivateUsagecommit and DXGI local/non-local VRAM before creation, while live, and afterRelease().Tested
XCL_ADAPTER=5060 cargo test -p xcl --test d3d12_amd_nvidia_parity -- --nocapture --test-threads=1on NVIDIA GeForce RTX 5060 (driver32.0.16.1088):3 passed; 0 failed; 0 ignored(0 skipped).XCL_ADAPTER=Radeon cargo test -p xcl --test d3d12_amd_nvidia_parity -- --nocapture --test-threads=1on AMD Radeon(TM) Graphics RDNA2 iGPU (driver32.0.21042.62):3 passed; 0 failed; 0 ignored(0 skipped).XCL_ADAPTER=warp cargo test -p xcl --test d3d12_amd_nvidia_parity -- --nocapture --test-threads=1:3 passed; 0 failed; 0 ignored(3 cleanSKIPPEDlines).XCL_ADAPTER=5060 cargo test --workspace -- --test-threads=4:1438 passed; 0 failed; 47 ignored(29 runtimeSKIPPEDin unrelated tests requiring D3D12 debug layer / console libraries).Not tested
smoke.ps1(pure test PR with zero changes undercrates/xcl/src/).AI use