Skip to content

Tests: select configured adapter in VRAM fixtures - #2337

Open
luckyteagirl wants to merge 2 commits into
xcl-dev:mainfrom
luckyteagirl:codex/vram-test-adapter
Open

luckyteagirl wants to merge 2 commits into
xcl-dev:mainfrom
luckyteagirl:codex/vram-test-adapter

Conversation

@luckyteagirl

@luckyteagirl luckyteagirl commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Select the hardware adapter requested by XCL_ADAPTER in the two shared-video-memory GPU fixtures and print the selected adapter. Both fixtures previously used DXGI adapter 0, so on a hybrid machine they could pass on the integrated GPU when a discrete GPU was requested. The shared-page test also now reports capability and device-creation skips through the counted test helper. Part of #2306; related to #2270.

What is in it

  • crates/xcl/src/hle/d3d12x/vram.rs: use the shared adapter selector in the D32S8 VRAM fixture and report adapter/device/tier skips.
  • crates/xcl/src/hle/d3d12x/title_textures.rs: use the shared adapter selector in the placed-texture fixture and count factory, tier, reserved-cube, UMA, and allocation skips. Pixel and page assertions are unchanged.

Tested

  • Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5; debug builds and selected GPU tests.
  • XCL_ADAPTER=6800M cargo test --locked -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored, 0 skipped. Printed D32S8 VRAM test adapter: AMD Radeon RX 6800M and exercised the 14-target depth/stencil readback.
  • XCL_ADAPTER=6800M cargo test --locked -p xcl --lib placed_title_textures_share_vram_and_preserve_pixels -- --test-threads=1 --show-output: 1 harness pass, 0 failed, 0 ignored, 1 explicit SKIPPED because this adapter cannot create a reserved cube with mips. Printed Shared-page texture test adapter: AMD Radeon RX 6800M; the fixture's cube capability gate prevented its later checks.
  • cargo build --locked --workspace -j 1: passed (3 existing warnings: 2 deprecated atomic fetch_update calls and 1 dead-code field).
  • Initial XCL_ADAPTER=nomatch cargo test --locked --workspace --no-fail-fast -j 1 -- --test-threads=1 --show-output before building the workspace exited 101: 1434 passed, 1 failed, 47 ignored; the only failure was e2e::test_title_runs_and_game_folder_is_untouched, which requires the workspace-built xcl_testtitle.exe and testgame_mw.dll. After the workspace build, the same command passed: 37 target summaries, 1435 passed, 0 failed, 47 ignored. It emitted 137 standalone SKIPPED notices (120 no GPU, 15 no GPU with 32-lane waves, 1 no wave32 GPU, 1 no wave64); the two changed fixtures also reported inline no selected hardware adapter skips under nomatch. These no-GPU skips do not cover the GPU fixture behavior.

Regression run

  • Main (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7):
    xcl-smoke v1
    commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
    gpu: AMD Radeon RX 6800M
    title: 2ef5fd64
    seconds: 30
    exit: 0x0
    frames shown: 385 (PresentX 385)
    presents per 2 s (last 3): 51 53 51
    device removals: 0
    crashes: 0
    peak commit: 8284 MB
    
  • This PR (436e946c306c0f7c70172ba9910908a2f1d2472e, clean):
    xcl-smoke v1
    commit: 436e946c306c0f7c70172ba9910908a2f1d2472e
    gpu: AMD Radeon RX 6800M
    title: 2ef5fd64
    seconds: 30
    exit: 0x0
    frames shown: 425 (PresentX 425)
    presents per 2 s (last 3): 60 49 52
    device removals: 0
    crashes: 0
    peak commit: 8297 MB
    

Not tested

  • Shared-page cubemap behavior on this RX 6800M driver, other adapters, and a full GPU workspace suite. The current-head smoke checks ordinary title behavior; it does not exercise these isolated GPU fixtures.

AI use

  • OpenAI Codex (GPT-6; exact serving variant unavailable), with a Luna subagent, refreshed the existing test-only commits onto current main, ran the checks above, and prepared this description. I reviewed the code and evidence before updating the PR. The two fixtures originated in the earlier AI-assisted branch; the refresh did not change their intended scope.

@SlopTart

SlopTart commented Nov 25, 2026 •

Copy link
Copy Markdown

Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

  • gpu_ suite (--release --locked, --test-threads=2): 144 passed / 3 failed / 1 ignored, same three baseline failures as plain origin/main on this rig (rig's known baseline: fuzz seed 1003 of DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #2115, gpu_nonfused_mad_and_mac_prevent_fma_contraction, gpu_depth_buffer_created_for_unordered_access_is_placed).
  • The reworked SVAM fixtures (placed_title_textures_share_vram_and_preserve_pixels and sibling) now run through adapter::Selector under Wine/DXGI: pass with XCL_ADAPTER unset (auto) and with XCL_ADAPTER="AMD Radeon RX 7900 XT". The adapter-name print reports the real card on this lane.

Complements the XCL_ADAPTER fallback/skip matrix posted on #2324 earlier today: match path, auto path, and no-match skip all behave on the Wine lane.

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

@throny throny added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 25, 2026
@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

Select the same high-performance hardware adapter as the GPU test runner. Report selection and device setup failures as skips instead of silently returning, so a GPU report identifies the device it actually exercised.

Assisted-by: OpenAI Codex (GPT-6; exact variant unavailable)
Use the selected hardware adapter in the existing texture fixture and count unavailable-capability skips. Request IDXGIFactory6 through CreateDXGIFactory2 in both VRAM GPU fixtures.
@luckyteagirl
luckyteagirl force-pushed the codex/vram-test-adapter branch from 6cb23b9 to 436e946 Compare November 26, 2026 04:02
@luckyteagirl
luckyteagirl marked this pull request as ready for review November 26, 2026 04:05
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.

4 participants