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

Manually merged
github merged 1 commit from gh-pr/1687/head into gh-pr/1687/base 2026-11-26 05:01:36 +00:00
Owner

@⁠amazedturnip on GitHub · 2026-11-24 19:16 UTC · original
amazedturnip:xcl/tests-console-heap-descriptor-contract-185825 → main · +201 −0 · 1 files · 1 commits · merged 2026-11-25 19:22 UTC

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).
**@⁠amazedturnip** on GitHub · 2026-11-24 19:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/1687) `amazedturnip:xcl/tests-console-heap-descriptor-contract-185825` → `main` · +201 −0 · 1 files · 1 commits · merged 2026-11-25 19:22 UTC 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).
Pin the public contract of the console descriptor heaps from a new non-runtime test file (register / start / slot / words_at / write / copy_words / unregister): window-0 placement, per-slot arithmetic for non-shared view heaps (index 2k, pc_srv base+2k*inc, pc_uav base+(2k+1)*inc, pc_gpu_uav +1 slot), sampler slot arithmetic (one 16-byte slot per index), T# image copy renumbering (word 0 = destination index), buffer V# kept verbatim, 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 report no GPU UAV.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:01:36 +00:00
github manually merged commit fe298296ac into gh-pr/1687/base 2026-11-26 05:01:36 +00:00
Author
Owner

@⁠MiharaxD on GitHub · 2026-11-24 21:44 UTC · original

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.

**@⁠MiharaxD** on GitHub · 2026-11-24 21:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/1687#issuecomment-7145321157) 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.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 04:02 UTC · original

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.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 04:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/1687#issuecomment-7152469246) # 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.
Author
Owner

@⁠ivall on GitHub · 2026-11-25 19:22 UTC · original

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.

**@⁠ivall** on GitHub · 2026-11-25 19:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/1687#issuecomment-7172196529) 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.