Tests: console descriptor heap slot/copy/unregister contract #1677

Merged
amazedturnip merged 1 commit from upstream-pr/1687 into main 2026-11-25 19:22:02 +00:00
amazedturnip commented 2026-11-24 19:16:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-24T19:16:52Z.


Pins the public contract of the console descriptor heaps from a new non-runtime test file: window-0 placement, per-slot index arithmetic (index 2k, pc_srv base+2k*inc, pc_uav base+(2k+1)*inc, gpu UAV +1 slot), sampler slot arithmetic, T# image copy renumbering (word 0 = destination index), buffer V# verbatim copy, S# index-in-word-3[11:0] renumbering, end-of-heap bounds, start stability across slot calls, unregister release, and non-shader-visible heaps reporting no GPU UAV. Runs on sparse VRAM, no GPU required.

What is in it

  • crates/xcl/tests/console_heap_contract.rs: new non-runtime test file pinning the public contract of the console descriptor heaps (register / start / slot / words_at / write / copy_words / unregister) - 9 tests, window-0 placement, per-slot arithmetic for non-shared view heaps, sampler slot arithmetic, T# image copy renumbering (word 0 = destination index), buffer V# verbatim copy, sampler S# index-in-word-3-[11:0] renumbering, end-of-heap bounds, start stability across slot calls, unregister forgets the heap, and non-shader-visible heaps reporting no GPU UAV

Tested

  • Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build
  • AMD (AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64), XCL_ADAPTER=radeon): cargo test --workspace -- --test-threads=2 — 867 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 1 (no heap windows))
  • Verification / negative control: new test file - verified deterministic across repeated runs (3x, all green); no unpatched-upstream fix to exercise a negative control

Not tested

  • retail Xbox Series X|S title (not available on this host)
  • NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64)

AI use

  • Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
<!-- greyfinch-sync:ivall/xcl:issue:6589504103 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1687). Originally posted by [amazedturnip](https://github.com/amazedturnip) on 2026-11-24T19:16:52Z. --- Pins the public contract of the console descriptor heaps from a new non-runtime test file: window-0 placement, per-slot index arithmetic (index 2k, pc_srv base+2k*inc, pc_uav base+(2k+1)*inc, gpu UAV +1 slot), sampler slot arithmetic, T# image copy renumbering (word 0 = destination index), buffer V# verbatim copy, S# index-in-word-3[11:0] renumbering, end-of-heap bounds, start stability across slot calls, unregister release, and non-shader-visible heaps reporting no GPU UAV. Runs on sparse VRAM, no GPU required. **What is in it** - crates/xcl/tests/console_heap_contract.rs: new non-runtime test file pinning the public contract of the console descriptor heaps (register / start / slot / words_at / write / copy_words / unregister) - 9 tests, window-0 placement, per-slot arithmetic for non-shared view heaps, sampler slot arithmetic, T# image copy renumbering (word 0 = destination index), buffer V# verbatim copy, sampler S# index-in-word-3-[11:0] renumbering, end-of-heap bounds, start stability across slot calls, unregister forgets the heap, and non-shader-visible heaps reporting no GPU UAV **Tested** - Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build - AMD (`AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64)`, `XCL_ADAPTER=radeon`): `cargo test --workspace -- --test-threads=2` — 867 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 1 (no heap windows)) - Verification / negative control: new test file - verified deterministic across repeated runs (3x, all green); no unpatched-upstream fix to exercise a negative control **Not tested** - retail Xbox Series X|S title (not available on this host) - NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64) **AI use** - Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
MiharaxD commented 2026-11-24 22:06:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MiharaxD on 2026-11-24T21:44:13Z.


Test report on an NVIDIA card, head fe29829 (on main c160d86), which covers the "NVIDIA" line.

Tested

  • RTX 3070 Ti 8 GB (driver 621.01), Intel i5-14400F, 32 GB RAM, Windows 11 Pro 10.0.26300, Rust 1.100.0, DXC 1.9.2602.17.
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 (debug) on fe29829: 867 passed, 0 failed, 42 ignored (lib tests 809 / 0 / 22).
  • SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64).
  • The nine tests in crates/xcl/tests/console_heap_contract.rs pass.

Regression run
scripts/smoke.ps1 -Game <game folder> -Seconds 60 (release builds, start screen, no input). main is c160d86:

main:

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: NVIDIA GeForce RTX 3070 Ti
title: game
seconds: 60
exit: 0x0
frames shown: 1586 (PresentX 1586)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15055 MB

this PR's head:

xcl-smoke v1
commit: fe298296acc956286144bec89b4adbd05a4ebe0b
gpu: NVIDIA GeForce RTX 3070 Ti
title: game
seconds: 60
exit: 0x0
frames shown: 1602 (PresentX 1602)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15170 MB

Not tested

  • AMD / Intel. The smoke run is a regression check only: this PR adds a test file and changes no runtime path.

AI use: Claude Code (Claude Opus 5.5) built the PR, ran the tests and both smoke runs, read the logs and wrote this report; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7145321157 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1687#issuecomment-7145321157). Originally posted by [MiharaxD](https://github.com/MiharaxD) on 2026-11-24T21:44:13Z. --- Test report on an NVIDIA card, head `fe29829` (on `main` `c160d86`), which covers the "NVIDIA" line. **Tested** - RTX 3070 Ti 8 GB (driver 621.01), Intel i5-14400F, 32 GB RAM, Windows 11 Pro 10.0.26300, Rust 1.100.0, DXC 1.9.2602.17. - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` (debug) on `fe29829`: **867 passed, 0 failed, 42 ignored** (lib tests 809 / 0 / 22). - SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64). - The nine tests in `crates/xcl/tests/console_heap_contract.rs` pass. **Regression run** `scripts/smoke.ps1 -Game <game folder> -Seconds 60` (release builds, start screen, no input). `main` is `c160d86`: main: ``` xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: NVIDIA GeForce RTX 3070 Ti title: game seconds: 60 exit: 0x0 frames shown: 1586 (PresentX 1586) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15055 MB ``` this PR's head: ``` xcl-smoke v1 commit: fe298296acc956286144bec89b4adbd05a4ebe0b gpu: NVIDIA GeForce RTX 3070 Ti title: game seconds: 60 exit: 0x0 frames shown: 1602 (PresentX 1602) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15170 MB ``` **Not tested** - AMD / Intel. The smoke run is a regression check only: this PR adds a test file and changes no runtime path. **AI use:** Claude Code (Claude Opus 5.5) built the PR, ran the tests and both smoke runs, read the logs and wrote this report; I checked it before posting.
JJAutoCompare commented 2026-11-25 04:10:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:02:12Z.


XCL PR #1687 — console descriptor heap contract

Verified clean detached head fe298296acc956286144bec89b4adbd05a4ebe0b on STOR-WINLAB. The diff adds only crates/xcl/tests/console_heap_contract.rs.

Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175. DXC --version and the suite log both show 1.9.2609.5. Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), unoptimized dev/test profiles with debug info and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run both exited 0 outside the Arc lock.
  • cargo test -p xcl --test console_heap_contract -- --test-threads=4 with XCL_ADAPTER=NONE_CPU_ONLY outside the lock: 9 passed, 0 failed, 0 ignored, 0 skipped. The log shows all nine non-shared heaps registered, confirming the tests got past the UMA guard. Assertions cover window-0 placement, stable starts, SRV/UAV and sampler slot arithmetic, heap bounds, console-address reads, and lookup after unregister. They also check image and sampler index rewrites, buffer address and stride preservation, a four-word write into a view slot, and zero GPU UAV handles for CPU-only heaps.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once inside Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Exit 101. Summed all 21 result lines (20 test binaries plus doc-tests): 849 passed, 18 failed, 42 ignored. The heap target passed all 9 again.

Workspace failures and skips

Of 17 library failures, 13 reported CreateComputePipelineState error 0x80070057. Four asserted on FMA overflow, implicit-LOD pixel sampling, halfword preservation, and wave64 pixel reductions. The e2e title failed its RSSetDepthBiasX pixel check (blue instead of green).

Six SKIPPED lines: two for wave64, one for tiled resources tier < 2, one for unavailable heap windows, and two for missing debug-layer support. These provide no coverage. Sample tests also reported unset inputs.

Not tested

Matched main baseline, retail-title smoke, other GPU vendors. The workspace failures remain unclassified against main.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1687-suite.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7152469246 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1687#issuecomment-7152469246). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:02:12Z. --- # XCL PR #1687 — console descriptor heap contract Verified clean detached head `fe298296acc956286144bec89b4adbd05a4ebe0b` on STOR-WINLAB. The diff adds only `crates/xcl/tests/console_heap_contract.rs`. Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175. DXC `--version` and the suite log both show 1.9.2609.5. Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), unoptimized dev/test profiles with debug info and incremental compilation disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` both exited 0 outside the Arc lock. - `cargo test -p xcl --test console_heap_contract -- --test-threads=4` with `XCL_ADAPTER=NONE_CPU_ONLY` outside the lock: 9 passed, 0 failed, 0 ignored, 0 skipped. The log shows all nine non-shared heaps registered, confirming the tests got past the UMA guard. Assertions cover window-0 placement, stable starts, SRV/UAV and sampler slot arithmetic, heap bounds, console-address reads, and lookup after unregister. They also check image and sampler index rewrites, buffer address and stride preservation, a four-word write into a view slot, and zero GPU UAV handles for CPU-only heaps. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once inside `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. Exit 101. Summed all 21 result lines (20 test binaries plus doc-tests): 849 passed, 18 failed, 42 ignored. The heap target passed all 9 again. **Workspace failures and skips** Of 17 library failures, 13 reported `CreateComputePipelineState` error `0x80070057`. Four asserted on FMA overflow, implicit-LOD pixel sampling, halfword preservation, and wave64 pixel reductions. The e2e title failed its `RSSetDepthBiasX` pixel check (blue instead of green). Six `SKIPPED ` lines: two for wave64, one for tiled resources tier < 2, one for unavailable heap windows, and two for missing debug-layer support. These provide no coverage. Sample tests also reported unset inputs. **Not tested** Matched `main` baseline, retail-title smoke, other GPU vendors. The workspace failures remain unclassified against `main`. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1687-suite.log` and published.
upstream-sync closed this pull request 2026-11-25 20:07:13 +00:00
ivall commented 2026-11-25 20:08:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T19:22:04Z.


Merging: the console descriptor heap's slot, copy and unregister contract.

Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, main 2898511 with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (fuzz_validate_and_gpu_1 and _3, which fail the same way on main); hle::d3d12x on 16 threads 5 times, no failure. This file alone 8 times: no failure.

AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.

<!-- greyfinch-sync:ivall/xcl:comment:7172196529 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1687#issuecomment-7172196529). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T19:22:04Z. --- Merging: the console descriptor heap's slot, copy and unregister contract. Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, `main` `2898511` with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (`fuzz_validate_and_gpu_1` and `_3`, which fail the same way on `main`); `hle::d3d12x` on 16 threads 5 times, no failure. This file alone 8 times: no failure. AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.
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!1677
No description provided.