Skip to content

Tests: verify console copyable footprints against native D3D12 - #694

Open
luna021839 wants to merge 1 commit into
xcl-dev:mainfrom
luna021839:test-copyable-footprints
Open

luna021839 wants to merge 1 commit into
xcl-dev:mainfrom
luna021839:test-copyable-footprints

Conversation

@luna021839

Copy link
Copy Markdown

Check that a title calling D3D12.X GetCopyableFootprints gets the same layout as native D3D12 for the corresponding PC resource. Related to #480.

What is in it

  • crates/xcl/tests/copyable_footprints.rs uses a synthetic title caller and queries the original method on the same device. It compares every output for a BC1 range that crosses array slices at a base offset above 4 GiB.
  • A console R10G10B10_7E3_A2_FLOAT volume exercises the retry as R16G16B16A16_FLOAT, with and without the optional total byte count. The test uses the translated upload layouts and native readback layouts to compare 1,160 bytes over three mips.

Tested

  • Windows 11 build 26200, Ryzen 7 2700X, GeForce RTX 5060 Ti 16 GB (driver 610.88), rustc 1.100.0 MSVC x64, DXC 1.9.2609.5. Debug build.
  • Both tests passed on the RTX 5060 Ti and on WARP with cargo test --locked --jobs 3 -p xcl --test copyable_footprints -- --show-output. Neither run skipped a test. These focused runs used dd2ae9a70af5eb5aad60f02d86e386b72abe1e95 with this test patch.
  • Two temporary changes to the hook on that base failed at the expected assertions: narrowing BaseOffset to 32 bits and suppressing the retry when pTotalBytes is null. The production source was restored before the workspace runs.
  • On 91f9a5e9f03156ea82dc55a18f7704862da7a5db with this patch, cargo build --locked --workspace --jobs 3 passed. cargo test --locked --workspace --no-fail-fast --jobs 3 -- --test-threads=4 --show-output reported 694 passed, 0 failed and 41 ignored. Both new tests passed on the RTX 5060 Ti.
  • Two existing tests reported SKIPPED for lack of native wave64. The pass count includes gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.

Regression run

  • Integration-test-only change. The test creates all resources from synthetic data.

Not tested

  • AMD hardware, release builds and retail titles.

AI use

  • OpenAI Codex (GPT-6.2 Sol) wrote the tests, ran validation and drafted this description.

Compare the title-facing slot with native D3D12 on the same device. Cover a BC1 array range above 4 GiB and a console-only volume format whose translated layout is used in a GPU round trip.

Assisted-by: OpenAI Codex (GPT-6.2 Sol)
@luna021839
luna021839 marked this pull request as ready for review November 24, 2026 03:34
@JoaoPauluu

Copy link
Copy Markdown

Test report: #694 under Wine with vkd3d-proton as the host driver (Linux, NVIDIA)

Under Wine, the native D3D12 this test compares XCL with is vkd3d-proton (D3D12 on Vulkan). Both tests pass there.

Setup

Result: copyable_footprints test binary under Wine, --test-threads=1: 2 passed, 0 failed, 0 ignored, in 2 of 2 runs

  • console_volume_footprints_match_native_and_copy_on_gpu: ok (including the GPU copy, no device loss)
  • footprints_for_a_partial_bc1_array_match_native_d3d12: ok

Not tested

  • Windows (native drivers), AMD, other Wine / vkd3d-proton versions; the rest of the suite on this branch; a title run (test-only PR)

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.

@lordon1a

Copy link
Copy Markdown

Independent test report on 90f9475:

Tested

  • Hardware: NVIDIA GeForce RTX 3070 Ti Laptop GPU (driver 616.64, wave32, SM 6.6), Intel i7-12700H, Windows 11 Home 26H2 (build 26200), rustc 1.100.0 (x86_64-pc-windows-gnullvm), debug build, DXC 1.9.2609.5 (01b62ad4)
  • Command: cargo test -p xcl --test copyable_footprints -- --nocapture
  • Result: 2 passed, 0 failed, 0 ignored in 0.73s (footprints_for_a_partial_bc1_array_match_native_d3d12 ok; console_volume_footprints_match_native_and_copy_on_gpu ok — GPU round trip checked 1160 bytes across 3 mips)

Not tested

  • AMD / wave64, Intel GPU, retail title

AI use

  • Antigravity (Google DeepMind agent) — fetched 90f9475 in a detached worktree, audited the diff, ran the test, and posted this report.

@MesshM

MesshM commented Nov 24, 2026

Copy link
Copy Markdown

Test run of 90f9475c61b279ccb34fcac42f345a959b8fdd21 on AMD RDNA4. I merged it onto current main f4ce27c locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 657 passed, 3 failed, 21 ignored, exit code 101; 0 SKIPPED
  • the 3 failures: placed_title_textures_share_vram_and_preserve_pixels, transitions_apply_when_their_list_is_submitted, d32s8_targets_take_their_own_size_of_video_memory. These three also fail on main f4ce27c with no PR applied (cargo test -p xcl --lib -- --test-threads=4: 657 passed, 3 failed), so they are not from this change. The first is placed_title_textures_share_vram_and_preserve_pixels at cubemap extra_pages must be reused at same va; the other two are PoisonErrors from the lock it poisons (Tests: a panicking title-texture test no longer poisons the others #673 addresses the cascade, Tests: check cubemap tile reuse independently of idle page reclamation #447 the cubemap check). It is intermittent: alone it passes 3 of 3, and in the parallel lib run it failed on 6 of 7 runs at f4ce27c, 2 of 6 at d852f9a and 1 of 3 at 1387b4b on this machine.
  • footprints_for_a_partial_bc1_array_match_native_d3d12 and console_volume_footprints_match_native_and_copy_on_gpu are in crates/xcl/tests/ and ran separately from the failing lib binary.

Review: The test compares XCL's GetCopyableFootprints with the driver's own on the same device, and skips with skip_test when there is none. Test-only. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

@LocranKing

Copy link
Copy Markdown

Tested on Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32).

Tested

  • Commit: 90f9475c61b279ccb34fcac42f345a959b8fdd21 (pr-694, clean tree)
  • Hardware / software: Windows 11 Home Build 26200, AMD Ryzen 5 5500, 31.8 GB RAM, NVIDIA GeForce RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2101), rustc 1.100.0 (x86_64-pc-windows-msvc, MSVC 14.44.35207), DXC 1.9.2602.17 (SDK 10.0.26100.0), --release
  • cargo test --release -p xcl --test copyable_footprints: 2 passed, 0 failed (footprints_for_a_partial_bc1_array_match_native_d3d12 ... ok, console_volume_footprints_match_native_and_copy_on_gpu ... ok, GPU round trip checked 1160 bytes across 3 mips)
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4: 694 passed, 0 failed, 41 ignored, exit 0; 2 (no wave64) skipped (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware)

Not tested: Debug build, XCL_SAMPLE_* tests, AMD / wave64 hardware.

AI use: Antigravity (Gemini 4 Hydrogen) ran the tests and drafted this report from the command outputs.

@ItsMrDubey

Copy link
Copy Markdown

Test report for 90f9475c61b279ccb34fcac42f345a959b8fdd21 (this PR's head)

Tested

  • NVIDIA GeForce RTX 4070 Ti 12 GB (Ada), driver 617.14; Intel Core i9-10900K, 32 GB RAM; Windows 11 Pro build 26300
  • Rust 1.88.0 (stable-x86_64-pc-windows-msvc), debug; DXC 1.9.2602.17 from Windows SDK 10.0.26100
cargo build --workspace
cargo test --workspace --no-fail-fast -- --test-threads=4

17 test binaries: 693 passed, 1 failed, 41 ignored. Same machine, main 64b3f3559: 700 passed, 1 failed, 41 ignored.

This PR's tests:

  • footprints_for_a_partial_bc1_array_match_native_d3d12: ok
  • console_volume_footprints_match_native_and_copy_on_gpu: ok

Failures:

SKIPPED (no wave64 on this GPU): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output.

@luckyteagirl

Copy link
Copy Markdown
Contributor

Tested on Radeon RX 6800M (RDNA2)

  • Exact PR head 90f9475c61b279ccb34fcac42f345a959b8fdd21, clean debug checkout.
  • Windows 11 Home build 26200, Ryzen 9 5980HX, Radeon RX 6800M, driver 30.0.13002.13003, Rust 1.99.0 (stable-x86_64-pc-windows-msvc).
  • Set XCL_ADAPTER=6800M. Both tests logged the RX 6800M as their real D3D12 backend.
cargo test --locked -p xcl --test copyable_footprints -- --test-threads=1 --nocapture

2 passed, 0 failed, 0 ignored, 0 runtime skips. The BC1 array case matched native D3D12 with a base offset above 4 GiB. The console volume case matched native D3D12 with and without the optional total-byte output, and the GPU round trip verified 1,160 bytes across three mips.

Not tested

Full workspace suite on this PR head, release mode, other adapters, and retail titles or sample data.

AI use

OpenAI Codex (GPT-6 family, exact model variant unavailable) ran the tests and drafted this report.

@JJAutoCompare

Copy link
Copy Markdown

Empirical test report (90f9475)

Verified PR #694 at 90f9475c61b279ccb34fcac42f345a959b8fdd21.

Hardware / environment

  • Intel Arc A770 Graphics (16,258 MiB VRAM as reported by the fixture), AMD x64 CPU (family 23, model 113, stepping 0), Windows x64 build 26200.
  • rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5 (01b62ad47). The unoptimized test profile ran with debug info and incremental compilation disabled.

Commands and results

  • cargo test --workspace --no-run exited 0. Compilation finished outside the GPU lock.
  • Invoke-ArcTest.ps1 -Test { & $fixture } ran the precompiled copyable_footprints-9fac0e4eb1f638c7.exe with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. The real D3D12 backend reported the A770 and the run exited 0. The harness reported 2 passed, 0 failed, 0 ignored, and zero filtered out in 0.83 seconds. The log contained 0 SKIPPED lines.

Observed behavior

  • The title-facing slot matched native D3D12 for a partial BC1 array range crossing array slices at a base offset of 4 GiB + 512 bytes. The fixture compared layouts, row counts, row sizes, and total bytes.
  • Native D3D12 rejected the console-only volume format. The title-facing call matched the native R16G16B16A16_FLOAT footprints with and without the optional total-byte output. The GPU upload and readback verified 1,160 bytes across three mips.

Not tested

The full GPU workspace suite and game smoke runs were omitted. The focused fixture ran on the A770 only.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr694-focused.log and published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants