Tests: honor XCL_ADAPTER in the texture upload state test #537

Open
github-bot wants to merge 1 commit from github-bot/gh-537 into main AGit
Owner

@⁠a-lebailly on GitHub · 2026-11-24 01:32 UTC · original
a-lebailly:codex/texture-test-adapter → main · +47 −1 · 1 files · 1 commits · open

The texture upload state test used the default D3D12 adapter even when XCL_ADAPTER selected another device. The test now uses XCL's adapter selector and verifies the device's adapter LUID. Related to #42.

What is in it

  • crates/xcl/tests/texture_states.rs: pass the selected adapter to D3D12 and test the skip message for an unmatched selector.

Tested

  • Windows 11 25H2 build 26200.9974, Core i9-9900K, RTX 4060 Ti driver 621.01, Rust 1.100.0 MSVC, debug.
  • .\scripts\test.ps1 with XCL_ADAPTER=4060 Ti on 68460c2: 681 passed, 0 failed, 41 ignored. Two reported SKIPPED for no wave64: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.
  • cargo test --offline --locked -p xcl --test texture_states -- --show-output: 2 passed, 0 failed, 0 ignored. The regression failed with the original upload path as expected.

Not tested

  • AMD, retail titles, and game-data tests (XCL_SAMPLE_* unset). The diff is limited to an integration test.

AI use

  • Codex (GPT-6, exact variant unavailable) diagnosed the problem, wrote the patch and regression, and ran the tests.
**@⁠a-lebailly** on GitHub · 2026-11-24 01:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/537) `a-lebailly:codex/texture-test-adapter` → `main` · +47 −1 · 1 files · 1 commits · open The texture upload state test used the default D3D12 adapter even when `XCL_ADAPTER` selected another device. The test now uses XCL's adapter selector and verifies the device's adapter LUID. Related to #42. **What is in it** - `crates/xcl/tests/texture_states.rs`: pass the selected adapter to D3D12 and test the skip message for an unmatched selector. **Tested** - Windows 11 25H2 build 26200.9974, Core i9-9900K, RTX 4060 Ti driver 621.01, Rust 1.100.0 MSVC, debug. - `.\scripts\test.ps1` with `XCL_ADAPTER=4060 Ti` on `68460c2`: 681 passed, 0 failed, 41 ignored. Two reported `SKIPPED` for no wave64: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. - `cargo test --offline --locked -p xcl --test texture_states -- --show-output`: 2 passed, 0 failed, 0 ignored. The regression failed with the original upload path as expected. **Not tested** - AMD, retail titles, and game-data tests (`XCL_SAMPLE_*` unset). The diff is limited to an integration test. **AI use** - Codex (GPT-6, exact variant unavailable) diagnosed the problem, wrote the patch and regression, and ran the tests.
The texture upload state test created a device on the Windows default
adapter even when XCL_ADAPTER selected another device. Use XCL's adapter
selection and verify the device's adapter LUID.

Run the upload test with an unmatched selector in a subprocess and
require a visible skip. The regression fails with the original upload
path and passes with the selector wired in.

Assisted-by: Codex (GPT-6, exact variant unavailable)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:24:59 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 01:50 UTC · original

Tested exact head 68460c2 on a machine with two hardware adapters, with the D3D12 debug layer installed (Graphics Tools), so the test gets past its debug-layer skip and reaches the new LUID check.

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (driver 616.64) + AMD Radeon(TM) Graphics iGPU (driver 32.0.21036.18), Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug.

  • cargo test -p xcl --test texture_states -- --test-threads=1 --nocapture: 2 passed, 0 failed with XCL_ADAPTER unset, nvidia, radeon and warp. Each run printed per-subresource states: 0 debug-layer errors and one state for all: 1 debug-layer errors.

  • Which adapter the device was on, from a temporary local eprintln! of the selected adapter's description and LUID next to the new assert_eq! (not part of the PR, reverted after):

    XCL_ADAPTER main 508a0c7 (device LUID) this PR (selected adapter = device LUID)
    unset – RTX 5070 Ti (0:fdb2)
    nvidia 0:fdb2 (RTX 5070 Ti) RTX 5070 Ti (0:fdb2)
    radeon 0:fdb2 (RTX 5070 Ti, selector ignored) AMD Radeon iGPU (0:11276)
    warp – Microsoft Basic Render Driver (0:11243)

    So on main the test ignores XCL_ADAPTER=radeon and runs on the default adapter; with the PR it runs on the selected one.

  • .\scripts\test.ps1 (no XCL_ADAPTER): 681 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

Not tested

  • The whole suite with XCL_ADAPTER=radeon (only texture_states was run on the iGPU).
  • A discrete AMD card, retail titles, game-data tests (XCL_SAMPLE_* unset).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests, added and reverted the temporary print, and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 01:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/537#issuecomment-7119499743) Tested exact head `68460c2` on a machine with two hardware adapters, with the D3D12 debug layer installed (Graphics Tools), so the test gets past its debug-layer skip and reaches the new LUID check. **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (driver 616.64) + AMD Radeon(TM) Graphics iGPU (driver 32.0.21036.18), Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug. - `cargo test -p xcl --test texture_states -- --test-threads=1 --nocapture`: 2 passed, 0 failed with `XCL_ADAPTER` unset, `nvidia`, `radeon` and `warp`. Each run printed `per-subresource states: 0 debug-layer errors` and `one state for all: 1 debug-layer errors`. - Which adapter the device was on, from a temporary local `eprintln!` of the selected adapter's description and LUID next to the new `assert_eq!` (not part of the PR, reverted after): | `XCL_ADAPTER` | `main` 508a0c7 (device LUID) | this PR (selected adapter = device LUID) | |---|---|---| | unset | – | RTX 5070 Ti (`0:fdb2`) | | `nvidia` | `0:fdb2` (RTX 5070 Ti) | RTX 5070 Ti (`0:fdb2`) | | `radeon` | `0:fdb2` (**RTX 5070 Ti, selector ignored**) | AMD Radeon iGPU (`0:11276`) | | `warp` | – | Microsoft Basic Render Driver (`0:11243`) | So on `main` the test ignores `XCL_ADAPTER=radeon` and runs on the default adapter; with the PR it runs on the selected one. - `.\scripts\test.ps1` (no `XCL_ADAPTER`): 681 passed, 0 failed, 41 ignored. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. **Not tested** - The whole suite with `XCL_ADAPTER=radeon` (only `texture_states` was run on the iGPU). - A discrete AMD card, retail titles, game-data tests (`XCL_SAMPLE_*` unset). **AI use** - Claude Code (Claude Opus 5.5) ran the tests, added and reverted the temporary print, and wrote this report. I checked it before posting.
Author
Owner

@⁠MonkeyPython on GitHub · 2026-11-24 02:11 UTC · original

NVIDIA data point (the "AMD, retail titles, and game-data tests" gap — this host covers the retail-title and XCL_SAMPLE_* halves on NVIDIA): XCL_ADAPTER selection works as intended on an RTX 3080 Ti.

Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, RTX 3080 Ti 12 GB (driver 621.01) + AMD Raphael iGPU, PR head 68460c2, release build.

Runs (cargo test -p xcl --release --test texture_states -- --test-threads=4):

  • XCL_SAMPLE_RPF/DLLS/TTPF set (retail GTA VI 1.0.2.1 package), default adapter: 2 passed / 0 failed / 0 ignored, no internal skips.
  • Same samples + XCL_ADAPTER='3080 Ti': 2 passed / 0 failed / 0 ignored, no internal skips.
  • XCL_ADAPTER='No Such GPU': the upload test skips with the intended message — SKIPPED uploads_start_from_each_subresources_state: XCL_ADAPTER / d3d12_adapter "no such gpu" matches no hardware adapter (have: 0 = NVIDIA GeForce RTX 3080 Ti, 1 = AMD Radeon(TM) Graphics, 2 = NVIDIA GeForce RTX 3080 Ti) — and texture_upload_test_reports_an_unmatched_adapter passes.
  • Samples unset: 2 passed / 0 failed / 0 ignored (the game-data assertions no-op cleanly).

Minor observation, not a defect claim: the adapter list in the skip message enumerates the 3080 Ti twice (entries 0 and 2) on this host.

Not tested: AMD discrete GPUs, other retail titles.

AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the tests and wrote this report from the logs; a human reviews it before posting. No code changes.

**@⁠MonkeyPython** on GitHub · 2026-11-24 02:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/537#issuecomment-7119839025) NVIDIA data point (the "AMD, retail titles, and game-data tests" gap — this host covers the retail-title and `XCL_SAMPLE_*` halves on NVIDIA): `XCL_ADAPTER` selection works as intended on an RTX 3080 Ti. **Setup:** Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, RTX 3080 Ti 12 GB (driver 621.01) + AMD Raphael iGPU, PR head `68460c2`, release build. **Runs (`cargo test -p xcl --release --test texture_states -- --test-threads=4`):** - `XCL_SAMPLE_RPF/DLLS/TTPF` set (retail GTA VI 1.0.2.1 package), default adapter: **2 passed / 0 failed / 0 ignored**, no internal skips. - Same samples + `XCL_ADAPTER='3080 Ti'`: **2 passed / 0 failed / 0 ignored**, no internal skips. - `XCL_ADAPTER='No Such GPU'`: the upload test skips with the intended message — `SKIPPED uploads_start_from_each_subresources_state: XCL_ADAPTER / d3d12_adapter "no such gpu" matches no hardware adapter (have: 0 = NVIDIA GeForce RTX 3080 Ti, 1 = AMD Radeon(TM) Graphics, 2 = NVIDIA GeForce RTX 3080 Ti)` — and `texture_upload_test_reports_an_unmatched_adapter` passes. - Samples unset: **2 passed / 0 failed / 0 ignored** (the game-data assertions no-op cleanly). Minor observation, not a defect claim: the adapter list in the skip message enumerates the 3080 Ti twice (entries 0 and 2) on this host. **Not tested:** AMD discrete GPUs, other retail titles. **AI use:** Gentle Shell (Pi coding agent), model qwen4-max: ran the tests and wrote this report from the logs; a human reviews it before posting. No code changes.
Author
Owner

@⁠caua-an on GitHub · 2026-11-24 02:27 UTC · original

Tested: Clean PR head 68460c242fa7653f3c23a1f17b28389cd39193b4, debug build, Windows 11 Home build 26200, Core Ultra 9 185H, Rust 1.100.0 MSVC x64, and Graphics Tools installed.

cargo test --offline --locked -p xcl --test texture_states -- --test-threads=1 --nocapture passed with both XCL_ADAPTER=nvidia (RTX 4070 Laptop, driver 616.92) and XCL_ADAPTER=intel (Intel Arc integrated graphics, driver 32.0.101.8860): 2 passed, 0 failed, 0 ignored on each adapter. The upload test reached and passed the adapter LUID assertion on both. Each run reported zero debug-layer errors with per-subresource states and one expected error when using one state for all subresources. The unmatched-adapter regression also passed.

Not tested: Full workspace suite, release build, retail titles, or game-data samples.

AI use: OpenCode with GPT-6.2 Sol ran the tests and drafted this report. No code changes.

**@⁠caua-an** on GitHub · 2026-11-24 02:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/537#issuecomment-7120156605) **Tested:** Clean PR head `68460c242fa7653f3c23a1f17b28389cd39193b4`, debug build, Windows 11 Home build 26200, Core Ultra 9 185H, Rust 1.100.0 MSVC x64, and Graphics Tools installed. `cargo test --offline --locked -p xcl --test texture_states -- --test-threads=1 --nocapture` passed with both `XCL_ADAPTER=nvidia` (RTX 4070 Laptop, driver 616.92) and `XCL_ADAPTER=intel` (Intel Arc integrated graphics, driver 32.0.101.8860): **2 passed, 0 failed, 0 ignored on each adapter**. The upload test reached and passed the adapter LUID assertion on both. Each run reported zero debug-layer errors with per-subresource states and one expected error when using one state for all subresources. The unmatched-adapter regression also passed. **Not tested:** Full workspace suite, release build, retail titles, or game-data samples. **AI use:** OpenCode with GPT-6.2 Sol ran the tests and drafted this report. No code changes.
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 03:04 UTC · original

Test run of 68460c242fa7653f3c23a1f17b28389cd39193b4 on AMD RDNA4. I merged it onto current main dd2ae9a locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), 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: 691 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 650 passed, 0 failed, 21 ignored
  • 0 SKIPPED; texture_upload_test_reports_an_unmatched_adapter and uploads_start_from_each_subresources_state pass with the default selector (one hardware adapter here).

Review: The test now builds its device on the adapter XCL_ADAPTER selects and checks the device's LUID; the child-process test sets the selector only for the child, so the parent's environment is untouched. 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.

**@⁠MesshM** on GitHub · 2026-11-24 03:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/537#issuecomment-7120742029) Test run of `68460c242fa7653f3c23a1f17b28389cd39193b4` on AMD RDNA4. I merged it onto current `main` `dd2ae9a` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), 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: **691 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 650 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `texture_upload_test_reports_an_unmatched_adapter` and `uploads_start_from_each_subresources_state` pass with the default selector (one hardware adapter here). **Review:** The test now builds its device on the adapter `XCL_ADAPTER` selects and checks the device's LUID; the child-process test sets the selector only for the child, so the parent's environment is untouched. 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.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 13:43 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 13:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/537#issuecomment-7164192312) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request has changes conflicting with the target branch.
  • crates/xcl/tests/texture_states.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/537/head:github-bot/gh-537'
git switch 'github-bot/gh-537'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-537'
git switch 'github-bot/gh-537'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-537'
git switch 'github-bot/gh-537'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-537'
git switch 'main'
git merge --squash 'github-bot/gh-537'
git switch 'main'
git merge --ff-only 'github-bot/gh-537'
git switch 'main'
git merge 'github-bot/gh-537'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.