Tests: heap probes for aliased buffers and timestamp queries #1318

Open
vakaobr wants to merge 1 commit from upstream-pr/1328 into main
vakaobr commented 2026-11-24 14:48:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-24T14:48:39Z.


Part of #258. Two probes from Ahmet-Dedeler's c70bf8a that check what the unified memory copy path relies on: that buffers placed over the same video memory see each other's writes, and how timestamp queries resolve into committed and reserved buffers. Like the other tests in heap_probe.rs, they are #[ignore] probes that print what the host does; run them with --ignored.

Based on Ahmet-Dedeler's c70bf8a on mac-on-main-wip ("Unified memory without OpenExistingHeapFromAddress: the committed window gets a copy in video memory"), which he handed over in https://github.com/ivall/xcl/issues/258#issuecomment-7134093997. Rebased onto main 930e8b4 and split into four PRs.

What is in it

  • crates/xcl/tests/heap_probe.rs: buffers_over_the_same_video_memory_alias (placed buffers over one heap, and reserved buffers whose tiles map to one pool tile) and timestamp_query_resolved_into_committed_and_reserved_buffers.

Tested

  • MacBook Pro M5 Pro (20-core GPU), 48 GB, macOS 27.2.1, CrossOver 26.3.0.39832 with D3DMetal 3.0 ("AMD Compatibility Mode"), Rosetta 2. Rust 1.100.0, x86_64-pc-windows-gnu (mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (<test exe> --exact <test> --test-threads=1 --nocapture).
  • Head a146528, --ignored: both pass. The aliasing probe prints true for placed and for reserved buffers; the timestamp probe prints a frequency of 60 and a resolved value of 0x0 (D3DMetal's timestamps, see #996).
  • Independent run at this head: NVIDIA RTX 5070 Ti and the AMD Radeon iGPU of a Ryzen 9800X3D (RDNA2), Windows 11, debug, cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 43 ignored on both; with --ignored all 6 probes in the file pass, the aliasing probe printing true for both cases and the timestamp probe a frequency of 1 GHz and non-zero timestamps (@futurepro62, https://github.com/ivall/xcl/pull/1328#issuecomment-7135279215).

Regression run

Test-only change in crates/xcl/tests/: no xcl-smoke blocks.

Not tested

  • Windows by me (see the independent run above).

AI use

  • Claude Code with Claude Opus 4.6 ported the probes from c70bf8a. Claude Code with Claude Opus 5.5 reviewed them, ran them on this machine and wrote this description.
<!-- greyfinch-sync:ivall/xcl:issue:5474444483 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1328). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-24T14:48:39Z. --- Part of #258. Two probes from Ahmet-Dedeler's `c70bf8a` that check what the unified memory copy path relies on: that buffers placed over the same video memory see each other's writes, and how timestamp queries resolve into committed and reserved buffers. Like the other tests in `heap_probe.rs`, they are `#[ignore]` probes that print what the host does; run them with `--ignored`. Based on Ahmet-Dedeler's `c70bf8a` on `mac-on-main-wip` ("Unified memory without OpenExistingHeapFromAddress: the committed window gets a copy in video memory"), which he handed over in https://github.com/ivall/xcl/issues/258#issuecomment-7134093997. Rebased onto `main` `930e8b4` and split into four PRs. **What is in it** - `crates/xcl/tests/heap_probe.rs`: `buffers_over_the_same_video_memory_alias` (placed buffers over one heap, and reserved buffers whose tiles map to one pool tile) and `timestamp_query_resolved_into_committed_and_reserved_buffers`. **Tested** - MacBook Pro M5 Pro (20-core GPU), 48 GB, macOS 27.2.1, CrossOver 26.3.0.39832 with D3DMetal 3.0 ("AMD Compatibility Mode"), Rosetta 2. Rust 1.100.0, `x86_64-pc-windows-gnu` (mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (`<test exe> --exact <test> --test-threads=1 --nocapture`). - Head `a146528`, `--ignored`: both pass. The aliasing probe prints `true` for placed and for reserved buffers; the timestamp probe prints a frequency of 60 and a resolved value of `0x0` (D3DMetal's timestamps, see #996). - Independent run at this head: NVIDIA RTX 5070 Ti and the AMD Radeon iGPU of a Ryzen 9800X3D (RDNA2), Windows 11, debug, `cargo test --workspace -- --test-threads=4`: 751 passed, 0 failed, 43 ignored on both; with `--ignored` all 6 probes in the file pass, the aliasing probe printing `true` for both cases and the timestamp probe a frequency of 1 GHz and non-zero timestamps (@futurepro62, https://github.com/ivall/xcl/pull/1328#issuecomment-7135279215). **Regression run** Test-only change in `crates/xcl/tests/`: no `xcl-smoke` blocks. **Not tested** - Windows by me (see the independent run above). **AI use** - Claude Code with Claude Opus 4.6 ported the probes from `c70bf8a`. Claude Code with Claude Opus 5.5 reviewed them, ran them on this machine and wrote this description.
futurepro62 commented 2026-11-24 15:06:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:59:29Z.


Full-suite run, since this PR has no test report yet. Tested exact head a146528 (on its base 930e8b4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 43 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 751 passed, 0 failed, 43 ignored, no skips.
  • The two new probes are #[ignore], so I ran them explicitly with cargo test -p xcl --test heap_probe -- --ignored --nocapture --test-threads=1 (all 6 probes in the file: 6 passed). buffers_over_the_same_video_memory_alias: "placed buffers over each other in one heap: written through the whole one, read through the part: true" and "two reserved buffers on one pool tile: written through the window, read through the other: true". timestamp_query_resolved_into_committed_and_reserved_buffers: frequency 1000000000, a non-zero timestamp resolved into both the committed and the reserved buffer.
  • The probes run on the NVIDIA card only: heap_probe.rs creates its device with D3D12CreateDevice(None, ...), so XCL_ADAPTER=radeon does not reach them (a run with it printed the same adapter-specific values).

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7135279215 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1328#issuecomment-7135279215). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:59:29Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `a146528` (on its base `930e8b4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **751 passed, 0 failed, 43 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **751 passed, 0 failed, 43 ignored**, no skips. - The two new probes are `#[ignore]`, so I ran them explicitly with `cargo test -p xcl --test heap_probe -- --ignored --nocapture --test-threads=1` (all 6 probes in the file: 6 passed). `buffers_over_the_same_video_memory_alias`: "placed buffers over each other in one heap: written through the whole one, read through the part: true" and "two reserved buffers on one pool tile: written through the window, read through the other: true". `timestamp_query_resolved_into_committed_and_reserved_buffers`: frequency 1000000000, a non-zero timestamp resolved into both the committed and the reserved buffer. - The probes run on the NVIDIA card only: `heap_probe.rs` creates its device with `D3D12CreateDevice(None, ...)`, so `XCL_ADAPTER=radeon` does not reach them (a run with it printed the same adapter-specific values). **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
WASDeKeys commented 2026-11-24 15:06:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by WASDeKeys on 2026-11-24T15:05:00Z.


im trying to run a test only pr too, but my pr is getting flagged on the smoke check thing. How did you pass the checks without smoke test?

<!-- greyfinch-sync:ivall/xcl:comment:7135429106 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1328#issuecomment-7135429106). Originally posted by [WASDeKeys](https://github.com/WASDeKeys) on 2026-11-24T15:05:00Z. --- im trying to run a test only pr too, but my pr is getting flagged on the smoke check thing. How did you pass the checks without smoke test?
vakaobr commented 2026-11-24 16:06:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-24T15:09:00Z.


@WASDeKeys: scripts/pr_check.py asks for the smoke pair only when the PR changes a runtime file: a path under crates/xcl/src/ that neither contains /tests nor ends in tests.rs. This PR only touches crates/xcl/tests/heap_probe.rs, so the check passes without one. If your test-only change sits in a runtime file (a #[cfg(test)] mod tests inside, say, present.rs), the check treats it as runtime: either move the test into the module's tests.rs or crates/xcl/tests/ if it fits there, or get a smoke pair (#957 got one from mikebuckets171 in #258). The test-only label that CONTRIBUTING mentions would waive it, but it doesn't exist in the repo yet.

AI use: Claude Code, Claude Opus 5.5 drafted this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7135539145 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1328#issuecomment-7135539145). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-24T15:09:00Z. --- @WASDeKeys: `scripts/pr_check.py` asks for the smoke pair only when the PR changes a runtime file: a path under `crates/xcl/src/` that neither contains `/tests` nor ends in `tests.rs`. This PR only touches `crates/xcl/tests/heap_probe.rs`, so the check passes without one. If your test-only change sits in a runtime file (a `#[cfg(test)] mod tests` inside, say, `present.rs`), the check treats it as runtime: either move the test into the module's `tests.rs` or `crates/xcl/tests/` if it fits there, or get a smoke pair (#957 got one from mikebuckets171 in #258). The `test-only` label that CONTRIBUTING mentions would waive it, but it doesn't exist in the repo yet. AI use: Claude Code, Claude Opus 5.5 drafted this reply.
JoaoPauluu commented 2026-11-24 16:06:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T15:09:49Z.


The probes on Linux with vkd3d-proton (NVIDIA), next to the D3DMetal and Windows runs.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. a146528 as it is (based on 930e8b4), no uncommitted changes. The test binary runs under Wine, each probe in its own process (--exact <test> --ignored --nocapture --test-threads=1).
  • All 6 probes in heap_probe.rs pass.
  • buffers_over_the_same_video_memory_alias: placed buffers over each other in one heap: written through the whole one, read through the part: true, two reserved buffers on one pool tile: written through the window, read through the other: true.
  • timestamp_query_resolved_into_committed_and_reserved_buffers: timestamp frequency: Ok(1000000000), resolved into a committed buffer 0x18eb03b650604400, into a reserved buffer 0x18eb03b650620000. So here the timestamps are real, nanosecond values, unlike D3DMetal's 0x0 (#996).
  • Without --ignored the six are reported ignored, as intended. I did not run the probes on main.

Not tested

  • the rest of the suite on this head; native Windows; AMD.

AI use

  • Claude Code (Claude Opus 5.5) built the commits, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
<!-- greyfinch-sync:ivall/xcl:comment:7135561992 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1328#issuecomment-7135561992). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T15:09:49Z. --- The probes on Linux with vkd3d-proton (NVIDIA), next to the D3DMetal and Windows runs. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `a146528` as it is (based on `930e8b4`), no uncommitted changes. The test binary runs under Wine, each probe in its own process (`--exact <test> --ignored --nocapture --test-threads=1`). - All 6 probes in `heap_probe.rs` pass. - `buffers_over_the_same_video_memory_alias`: `placed buffers over each other in one heap: written through the whole one, read through the part: true`, `two reserved buffers on one pool tile: written through the window, read through the other: true`. - `timestamp_query_resolved_into_committed_and_reserved_buffers`: `timestamp frequency: Ok(1000000000)`, resolved into a committed buffer `0x18eb03b650604400`, into a reserved buffer `0x18eb03b650620000`. So here the timestamps are real, nanosecond values, unlike D3DMetal's `0x0` (#996). - Without `--ignored` the six are reported `ignored`, as intended. I did not run the probes on `main`. **Not tested** - the rest of the suite on this head; native Windows; AMD. **AI use** - Claude Code (Claude Opus 5.5) built the commits, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
DavidM1911 commented 2026-11-24 16:06:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T15:14:33Z.


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

  • cargo test -p xcl --lib: 708 passed, 0 failed, 21 ignored.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7135692693 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1328#issuecomment-7135692693). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T15:14:33Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 708 passed, 0 failed, 21 ignored. Thanks!
WASDeKeys commented 2026-11-24 16:06:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by WASDeKeys on 2026-11-24T15:16:28Z.


@WASDeKeys: scripts/pr_check.py asks for the smoke pair only when the PR changes a runtime file: a path under crates/xcl/src/ that neither contains /tests nor ends in tests.rs. This PR only touches crates/xcl/tests/heap_probe.rs, so the check passes without one. If your test-only change sits in a runtime file (a #[cfg(test)] mod tests inside, say, present.rs), the check treats it as runtime: either move the test into the module's tests.rs or crates/xcl/tests/ if it fits there, or get a smoke pair (#957 got one from mikebuckets171 in #258). The test-only label that CONTRIBUTING mentions would waive it, but it doesn't exist in the repo yet.

AI use: Claude Code, Claude Opus 5.5 drafted this reply.

@vakaobr so if my pr changes in vram.rs, and it is a runtime file, but only a test chage, theres no way to get the pr approved

<!-- greyfinch-sync:ivall/xcl:comment:7135748892 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1328#issuecomment-7135748892). Originally posted by [WASDeKeys](https://github.com/WASDeKeys) on 2026-11-24T15:16:28Z. --- > @WASDeKeys: `scripts/pr_check.py` asks for the smoke pair only when the PR changes a runtime file: a path under `crates/xcl/src/` that neither contains `/tests` nor ends in `tests.rs`. This PR only touches `crates/xcl/tests/heap_probe.rs`, so the check passes without one. If your test-only change sits in a runtime file (a `#[cfg(test)] mod tests` inside, say, `present.rs`), the check treats it as runtime: either move the test into the module's `tests.rs` or `crates/xcl/tests/` if it fits there, or get a smoke pair (#957 got one from mikebuckets171 in #258). The `test-only` label that CONTRIBUTING mentions would waive it, but it doesn't exist in the repo yet. > > AI use: Claude Code, Claude Opus 5.5 drafted this reply. @vakaobr so if my pr changes in vram.rs, and it is a runtime file, but only a test chage, theres no way to get the pr approved
github-actions[bot] commented 2026-11-28 08:00:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:00:32Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7236301461 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1328#issuecomment-7236301461). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:00:32Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
vakaobr commented 2026-11-30 13:21:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-30T13:21:59Z.


Still waiting for a maintainer. Test-only heap probes, ignored by default; it merges cleanly with main.

<!-- greyfinch-sync:ivall/xcl:comment:7279740501 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1328#issuecomment-7279740501). Originally posted by [vakaobr](https://github.com/vakaobr) on 2026-11-30T13:21:59Z. --- Still waiting for a maintainer. Test-only heap probes, ignored by default; it merges cleanly with `main`.
Foniass commented 2026-12-01 05:27:07 +00:00 (Migrated from github.com)

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


Triage (#1607) – head a146528

The only other branch that adds these two probes (buffers_over_the_same_video_memory_alias, timestamp_query_resolved_into_committed_and_reserved_buffers) is #980, and #980 is closed. Main's heap_probe.rs does not have them. They follow the file's existing #[ignore] probe style and only change test code. No problems found in the diff.
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:7301784386 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1328#issuecomment-7301784386). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:27:07Z. --- **Triage (#1607)** – head a146528 The only other branch that adds these two probes (`buffers_over_the_same_video_memory_alias`, `timestamp_query_resolved_into_committed_and_reserved_buffers`) is #980, and #980 is closed. Main's `heap_probe.rs` does not have them. They follow the file's existing `#[ignore]` probe style and only change test code. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
grathepic commented 2026-12-02 23:07:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grathepic on 2026-12-02T23:07:20Z.


merge-check
base: 078358a058
head: a146528e21
merge: clean (git diff --check origin/main..HEAD clean)
build: cargo +1.98.1-x86_64-pc-windows-msvc build --offline --locked --workspace -> ok
tests: cargo +1.98.1-x86_64-pc-windows-msvc test --offline --locked --workspace --no-fail-fast -- --test-threads=4 (with XCL_DXC_DIR=C:\VulkanSDK\1.4.363.0\Bin, XCL_SAMPLE_* unset) -> 3006 passed, 0 failed, 54 ignored across 44 harnesses (6 ignored in heap_probe.rs); SKIPPED: 27 notices (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps, 1 no dxil.dll, 1 cannot disable the driver cache (Windows Developer Mode required)); failing: none. Explicit probe run cargo +1.98.1-x86_64-pc-windows-msvc test --offline --locked -p xcl --test heap_probe -- --ignored --nocapture --test-threads=1 -> 6 passed, 0 failed, 0 ignored: buffers_over_the_same_video_memory_alias printed true for both placed-buffer aliasing and two reserved buffers mapped to one pool tile; timestamp_query_resolved_into_committed_and_reserved_buffers printed timestamp frequency: Ok(1000000000) and non-zero resolved timestamps for both committed (0x18ed9220dd2d5400) and reserved (0x18ed9220dd4a2000) buffers.
title run: none (Tier 0 test-only diff in crates/xcl/tests/heap_probe.rs, #[ignore] manual probes)
review: Full single-commit diff read (+126/-0, crates/xcl/tests/heap_probe.rs). Both probes follow the file's #[ignore] diagnostic pattern; queue ordering (UpdateTileMappings -> gpu_copy, ResolveQueryData -> gpu_copy), D3D12 buffer implicit state promotion/decay, and command list/allocator lifetimes across gpu_copy's fence wait are sound. Non-blocking note: these two probes predate #2881 and call D3D12CreateDevice(None, D3D_FEATURE_LEVEL_12_0, ...) directly instead of main's probe_device(), so they do not yet honor XCL_ADAPTER, print the adapter/LUID banner, or call skip_test on device failure (a small follow-up if desired). Untested: AMD/Intel GPUs and multi-GPU XCL_ADAPTER selection.
performance: none (#[ignore] integration probes only; no runtime path changed)
verdict: safe to merge (clean merge, full workspace suite passes with 0 failures on NVIDIA RTX 3080, all 6 --ignored probes pass with expected aliasing and timestamp outputs, and diff is strictly test-only)
hardware / tool and model: NVIDIA GeForce RTX 3080 (driver 32.0.16.2140), AMD Ryzen 7 5800X3D, Windows 11 (10.0.26300.0), Rust 1.98.1-x86_64-pc-windows-msvc, DXC 1.9.0.5512 (VulkanSDK, no dxil.dll) / Antigravity, Gemini 4 Neon

<!-- greyfinch-sync:ivall/xcl:comment:7361590866 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1328#issuecomment-7361590866). Originally posted by [grathepic](https://github.com/grathepic) on 2026-12-02T23:07:20Z. --- merge-check base: 078358a058f7ba5d16690dba8dc4e55d2c88ae0a head: a146528e218442f4efd1584d7800698def2b86d5 merge: clean (`git diff --check origin/main..HEAD` clean) build: `cargo +1.98.1-x86_64-pc-windows-msvc build --offline --locked --workspace` -> ok tests: `cargo +1.98.1-x86_64-pc-windows-msvc test --offline --locked --workspace --no-fail-fast -- --test-threads=4` (with `XCL_DXC_DIR=C:\VulkanSDK\1.4.363.0\Bin`, `XCL_SAMPLE_*` unset) -> 3006 passed, 0 failed, 54 ignored across 44 harnesses (6 ignored in `heap_probe.rs`); SKIPPED: 27 notices (22 `no wave64`, 2 `no heap windows`, 1 `no GPU_UPLOAD heaps`, 1 `no dxil.dll`, 1 `cannot disable the driver cache (Windows Developer Mode required)`); failing: none. Explicit probe run `cargo +1.98.1-x86_64-pc-windows-msvc test --offline --locked -p xcl --test heap_probe -- --ignored --nocapture --test-threads=1` -> 6 passed, 0 failed, 0 ignored: `buffers_over_the_same_video_memory_alias` printed `true` for both placed-buffer aliasing and two reserved buffers mapped to one pool tile; `timestamp_query_resolved_into_committed_and_reserved_buffers` printed `timestamp frequency: Ok(1000000000)` and non-zero resolved timestamps for both committed (`0x18ed9220dd2d5400`) and reserved (`0x18ed9220dd4a2000`) buffers. title run: none (Tier 0 test-only diff in `crates/xcl/tests/heap_probe.rs`, `#[ignore]` manual probes) review: Full single-commit diff read (`+126/-0`, `crates/xcl/tests/heap_probe.rs`). Both probes follow the file's `#[ignore]` diagnostic pattern; queue ordering (`UpdateTileMappings` -> `gpu_copy`, `ResolveQueryData` -> `gpu_copy`), D3D12 buffer implicit state promotion/decay, and command list/allocator lifetimes across `gpu_copy`'s fence wait are sound. Non-blocking note: these two probes predate `#2881` and call `D3D12CreateDevice(None, D3D_FEATURE_LEVEL_12_0, ...)` directly instead of `main`'s `probe_device()`, so they do not yet honor `XCL_ADAPTER`, print the adapter/LUID banner, or call `skip_test` on device failure (a small follow-up if desired). Untested: AMD/Intel GPUs and multi-GPU `XCL_ADAPTER` selection. performance: none (`#[ignore]` integration probes only; no runtime path changed) verdict: safe to merge (clean merge, full workspace suite passes with 0 failures on NVIDIA RTX 3080, all 6 `--ignored` probes pass with expected aliasing and timestamp outputs, and diff is strictly test-only) hardware / tool and model: NVIDIA GeForce RTX 3080 (driver 32.0.16.2140), AMD Ryzen 7 5800X3D, Windows 11 (10.0.26300.0), Rust 1.98.1-x86_64-pc-windows-msvc, DXC 1.9.0.5512 (VulkanSDK, no dxil.dll) / Antigravity, Gemini 4 Neon
Pipodi commented 2026-12-03 00:52:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-12-03T00:52:35Z.


merge-check
base: 078358a058
head: a146528e21
merge: clean (git merge --no-ff onto 078358a0, merge cfc4ba6e; crates/xcl/tests/heap_probe.rs +126)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3006 passed, 0 failed, 54 ignored; failing: none (SKIPPED 25: 22 no wave64, 2 no heap windows, 1 cannot disable the driver cache). The two new probes are #[ignore] (52 ignored on main, 54 here). Run explicitly, cargo test -p xcl --test heap_probe -- --ignored --nocapture --test-threads=1 -> 6 passed, 0 failed: buffers_over_the_same_video_memory_alias printed true for the placed buffers and for the two reserved buffers on one pool tile; timestamp_query_resolved_into_committed_and_reserved_buffers printed frequency 1000000000 and non-zero timestamps in the committed and in the reserved buffer.
title run: none (test-only change in crates/xcl/tests, no file under crates/xcl/src)
review: read the whole diff. No blocking findings. 1) Minor, agreeing with the first check: the two new probes open their device with D3D12CreateDevice(None, ...) and return silently on failure, where the file's other probes now go through probe_device() (honours XCL_ADAPTER, prints the adapter, calls skip_test); on a multi-adapter machine they may probe a different GPU than the rest of the file, and a missing device passes without a SKIPPED line. 2) The probes print their results and assert nothing, like the rest of the file, so they document behaviour rather than guard it; fine for #[ignore] probes. 3) Checked the D3D12 use: buffers in COMMON are implicitly promoted to COPY_DEST/COPY_SOURCE and decay between ExecuteCommandLists, the tile mappings are queued before the copies on the same queue, the timestamp list's allocator outlives its execution (dropped after gpu_copy's fence on the same queue), and the read-back offset (u64 index 2) matches the resolve at offset + 16. The aliased placed buffers are used in separate submissions with a fence wait between them, so no aliasing barrier is needed for buffers.
performance: none (#[ignore] probes in an integration test; nothing in the runtime changes)
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Intel Core i9-13900K, 32 GB; Windows 11 build 26300; rustc 1.100.0, debug; Claude Code, Claude Opus 5.5

<!-- greyfinch-sync:ivall/xcl:comment:7363694344 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1328#issuecomment-7363694344). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-12-03T00:52:35Z. --- merge-check base: 078358a058f7ba5d16690dba8dc4e55d2c88ae0a head: a146528e218442f4efd1584d7800698def2b86d5 merge: clean (`git merge --no-ff` onto 078358a0, merge cfc4ba6e; crates/xcl/tests/heap_probe.rs +126) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3006 passed, 0 failed, 54 ignored; failing: none (SKIPPED 25: 22 no wave64, 2 no heap windows, 1 cannot disable the driver cache). The two new probes are `#[ignore]` (52 ignored on main, 54 here). Run explicitly, `cargo test -p xcl --test heap_probe -- --ignored --nocapture --test-threads=1` -> 6 passed, 0 failed: `buffers_over_the_same_video_memory_alias` printed `true` for the placed buffers and for the two reserved buffers on one pool tile; `timestamp_query_resolved_into_committed_and_reserved_buffers` printed frequency 1000000000 and non-zero timestamps in the committed and in the reserved buffer. title run: none (test-only change in crates/xcl/tests, no file under crates/xcl/src) review: read the whole diff. No blocking findings. 1) Minor, agreeing with the first check: the two new probes open their device with `D3D12CreateDevice(None, ...)` and return silently on failure, where the file's other probes now go through `probe_device()` (honours `XCL_ADAPTER`, prints the adapter, calls `skip_test`); on a multi-adapter machine they may probe a different GPU than the rest of the file, and a missing device passes without a SKIPPED line. 2) The probes print their results and assert nothing, like the rest of the file, so they document behaviour rather than guard it; fine for `#[ignore]` probes. 3) Checked the D3D12 use: buffers in COMMON are implicitly promoted to COPY_DEST/COPY_SOURCE and decay between `ExecuteCommandLists`, the tile mappings are queued before the copies on the same queue, the timestamp list's allocator outlives its execution (dropped after `gpu_copy`'s fence on the same queue), and the read-back offset (u64 index 2) matches the resolve at offset + 16. The aliased placed buffers are used in separate submissions with a fence wait between them, so no aliasing barrier is needed for buffers. performance: none (`#[ignore]` probes in an integration test; nothing in the runtime changes) verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4090 24 GB, driver 621.40; Intel Core i9-13900K, 32 GB; Windows 11 build 26300; rustc 1.100.0, debug; Claude Code, Claude Opus 5.5
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/1328:upstream-pr/1328'
git switch 'upstream-pr/1328'

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/1328'
git switch 'upstream-pr/1328'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1328'
git switch 'upstream-pr/1328'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1328'
git switch 'main'
git merge --squash 'upstream-pr/1328'
git switch 'main'
git merge --ff-only 'upstream-pr/1328'
git switch 'main'
git merge 'upstream-pr/1328'
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!1318
No description provided.