Tests: honor the selected adapter for texture uploads #2879

Open
andrewDoing wants to merge 1 commit from upstream-pr/2879 into main
andrewDoing commented 2026-11-26 20:51:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-26T20:51:07Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:5516976579 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2879). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-26T20:51:07Z. --- 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](https://github.com/xcl-dev/xcl/actions/runs/46281957447) · [Merged #3278](https://github.com/xcl-dev/xcl/pull/3278) · [Current CI run](https://github.com/xcl-dev/xcl/actions/runs/46284067466) **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 commented 2026-11-26 21:40:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-26T21:40:54Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7203959164 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2879#issuecomment-7203959164). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-26T21:40:54Z. --- **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.
andrewDoing commented 2026-11-29 16:05:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-29T16:05:37Z.


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?

<!-- greyfinch-sync:ivall/xcl:comment:7258611017 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2879#issuecomment-7258611017). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-29T16:05:37Z. --- 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](https://github.com/xcl-dev/xcl/actions/runs/46284067466) The entire diff is in `texture.rs`'s `#[cfg(test)]` module. Could a maintainer review the diff and apply `test-only` for this revision?
Foniass commented 2026-12-01 09:07:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:07:01Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7306239087 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2879#issuecomment-7306239087). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:07:01Z. --- **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.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2879:upstream-pr/2879'
git switch 'upstream-pr/2879'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2879'
git switch 'upstream-pr/2879'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2879'
git switch 'upstream-pr/2879'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2879'
git switch 'main'
git merge --squash 'upstream-pr/2879'
git switch 'main'
git merge --ff-only 'upstream-pr/2879'
git switch 'main'
git merge 'upstream-pr/2879'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2879
No description provided.