Skip to content

Tests: honor the selected adapter for texture uploads - #2879

Draft
andrewDoing wants to merge 1 commit into
xcl-dev:mainfrom
andrewDoing:tests/texture-upload-selected-adapter
Draft

andrewDoing wants to merge 1 commit into
xcl-dev:mainfrom
andrewDoing:tests/texture-upload-selected-adapter

Conversation

@andrewDoing

@andrewDoing andrewDoing commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Three texture-upload tests on current main opened the system-default D3D12 adapter even when XCL_ADAPTER requested another device. They now honor the selector and use the standard GPU skip policy when the requested device is unavailable.

What is in it

  • crates/xcl/src/gpu/texture.rs: select and name the requested adapter in the shared test fixture. Keep the system default for auto and the existing D3D feature level for uploads. The diff is entirely inside #[cfg(test)].
  • Rebased the same test diff onto main 81bfbf0d. Main removed an older upload-buffer fixture, so the updated diff covers the three remaining callers.

Tested

  • RTX 5070 / 616.92, Ryzen 7 5700X3D, Windows 11 build 26300.10075, Rust 1.100.0 MSVC, debug.
  • On 81531120, ran the three affected tests serially in fresh harness processes with XCL_ADAPTER=5070, warp, and auto: 3 passed and 0 skipped in each. The output identified the RTX 5070 or WARP. auto selected the RTX 5070.
  • A nonexistent adapter produced three explicit GPU skips in permissive mode. With XCL_REQUIRE_GPU=mesh the same three tests failed as intended instead of selecting the default GPU.
  • On 81531120, cargo build --workspace --locked --offline passed. The successful rerun of cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4 reported 2,736 passes, 0 failures, 49 ignored, and 28 explicit GPU skips (22 wave64, three per-lane forms, two heap-window probes, and one driver-cache option). An initial run lacked the synthetic-title build outputs. The first run with those outputs built hit one library-harness access violation, which did not recur on the same head.
  • On the previous head, the hosted Windows run failed when a title-queue test expected its exact mapping fence (26) but the shared device had reached 28. Seven follow-on failures were poisoned-lock errors. The fix for that assertion is now on main and in this PR's base. Previous CI run · Merged #3278 · Current CI run

Regression run

  • The change is confined to unit tests in a runtime source file. The test-only label requires maintainer review. No retail smoke was run on this revision.

Not tested

  • A retail title, Wine, or other GPU vendors.

AI use

  • OpenAI Codex with GPT-6.2 Astra identified the adapter mismatch, wrote and tested the original change, and reviewed the diff. OpenAI Codex with GPT-6.2 Sol resolved the rebase conflict and ran the focused checks on the new head.

@SlopTart

Copy link
Copy Markdown

Linux (Wine) dual-lane run at head 63197e31 - safe, no red-set movement on either lane.

Rig (Ryzen 9 9900X / RX 7900 XT / wine-11.0 Proton): 605/3 = baseline two (gpu_promoted_uav_clear_values, xma2_source_voice) plus sparse::a_tile_decommitted_and_committed_again_keeps_its_video_memory, which we tracked earlier today as a load flake (green 3/3 in solo at two heads; two appearances under suite load across today's five runs).

Boxb (i5-10600K / GTX 1070 550.163.01 / wine-10.0 + vkd3d-proton, xvfb): 605/3, exactly today's baseline three. One note: the old boxb texture-upload red from our #2771 row (gpu_parts_of_a_texture_go_up_and_the_rest_stays) no longer appears at current main at all - it looks already fixed upstream - so this PR's texture-upload adapter change neither fixes nor breaks anything in our lane; our NVIDIA reds are unaffected.

Suite: cargo test --release --locked -p xcl --lib --target x86_64-pc-windows-gnu -- --test-threads=2 --skip gpu::.

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

rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 26, 2026
Rogeriomatador added a commit to CaveiraBoone/NexusVI that referenced this pull request Nov 27, 2026
Import public XCL PR xcl-dev#2879, by @andrewDoing.
Source: xcl-dev#2879
Original head: 63197e3
GPL-2.0-only; original attribution retained. Imported for authorized synthetic test validation; not yet independently tested.

Assisted-by: ChatGPT (GPT-6.2)
@andrewDoing
andrewDoing force-pushed the tests/texture-upload-selected-adapter branch from 63197e3 to f9c18a3 Compare November 29, 2026 16:04
@github-actions github-actions Bot added area:d3d12 D3D12.X runtime, command lists, resources, sparse memory gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks) labels Nov 29, 2026
@andrewDoing

andrewDoing commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor Author

The adapter fix is rebased to 81531120 with the same test diff. All three affected tests passed with zero skips on RTX 5070 and WARP on this head. The nonexistent-adapter controls verified explicit skips and strict-mode failures. The previous Windows job hit the title-queue mapping assertion fixed by #3278, which is in the new base. Current Windows CI

The entire diff is in texture.rs's #[cfg(test)] module. Could a maintainer review the diff and apply test-only for this revision?

@andrewDoing
andrewDoing force-pushed the tests/texture-upload-selected-adapter branch from f9c18a3 to 8153112 Compare November 29, 2026 16:26
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head 8153112

No open or merged PR changes the device() helper of the gpu/texture.rs tests. #537 (tests/texture_states.rs), #2337 and #3016 apply the same XCL_ADAPTER selection to other test files.
No problems found in the diff. With no device, the two tests that call device() only for their optional GPU part now print a SKIPPED line, which is correct.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

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

Labels

area:d3d12 D3D12.X runtime, command lists, resources, sparse memory gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants