[removed by author] #990

Closed
shortside wants to merge 1 commit from upstream-pr/996 into main
shortside commented 2026-11-24 10:06:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by shortside on 2026-11-24T10:06:07Z.


[removed by author]

<!-- greyfinch-sync:ivall/xcl:issue:5470077326 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/996). Originally posted by [shortside](https://github.com/shortside) on 2026-11-24T10:06:07Z. --- [removed by author]
dcastell1 commented 2026-11-24 11:05:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by dcastell1 on 2026-11-24T10:13:50Z.


Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on main@02bfd1d (baseline 727 passed, 0 failed, 41 ignored on this box):

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
728 passed; 0 failed; 41 ignored   (exit 0)

One more passing test than the baseline: the CPU-clock timestamp path on a host without GPU timestamps is covered and green.

Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

<!-- greyfinch-sync:ivall/xcl:comment:7128493129 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/996#issuecomment-7128493129). Originally posted by [dcastell1](https://github.com/dcastell1) on 2026-11-24T10:13:50Z. --- Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on `main@02bfd1d` (baseline **727 passed, 0 failed, 41 ignored** on this box): ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 728 passed; 0 failed; 41 ignored (exit 0) ``` One more passing test than the baseline: the CPU-clock timestamp path on a host without GPU timestamps is covered and green. Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
DTsordas commented 2026-11-24 11:05:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DTsordas on 2026-11-24T10:34:47Z.


Test report for #996 at f242ea8: Windows, AMD RDNA4. The CPU-clock path stays off on a host with GPU timestamps.

This covers the first point under Not tested: whether the new path is taken on Windows.

Tested

  • AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 5 5600X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug; DXC 1.9.2602.17 (SDK 10.0.26100.0).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 at f242ea8: 725 passed, 0 failed, 41 ignored, 0 SKIPPED. Among them: a_60_hz_timestamp_frequency_is_no_gpu_clock, readback_u64_lands_after_the_queue and timestamps_outside_unified_memory_land_after_the_queue.
  • The cpu_writes / list_x timestamp tests and --test e2e, with --nocapture: "no GPU timestamps on this host" appears 0 times in their output. It also appears 0 times in the test title's own log (target\tmp\e2e\data\XCL.TestTitle\logs\xcl.log, backend "AMD Radeon RX 9060 XT"). The title's "D3D12.X: console command list memory methods (writes, timestamp, fill, copy, KickoffX, Wait32/64)" check passes with the GPU's own timestamps.

Not tested

  • A retail title, and its GetTimestampFrequency / GetClockCalibration calls, on Windows; no xcl-smoke blocks from here.
  • NVIDIA / Intel on Windows for the off-path check: only this AMD card.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7128968340 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/996#issuecomment-7128968340). Originally posted by [DTsordas](https://github.com/DTsordas) on 2026-11-24T10:34:47Z. --- **Test report for #996 at `f242ea8`: Windows, AMD RDNA4. The CPU-clock path stays off on a host with GPU timestamps.** This covers the first point under **Not tested**: whether the new path is taken on Windows. **Tested** - AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 5 5600X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug; DXC 1.9.2602.17 (SDK 10.0.26100.0). - `cargo test --workspace --no-fail-fast -- --test-threads=4` at `f242ea8`: 725 passed, 0 failed, 41 ignored, 0 SKIPPED. Among them: `a_60_hz_timestamp_frequency_is_no_gpu_clock`, `readback_u64_lands_after_the_queue` and `timestamps_outside_unified_memory_land_after_the_queue`. - The `cpu_writes` / `list_x` timestamp tests and `--test e2e`, with `--nocapture`: "no GPU timestamps on this host" appears 0 times in their output. It also appears 0 times in the test title's own log (`target\tmp\e2e\data\XCL.TestTitle\logs\xcl.log`, backend "AMD Radeon RX 9060 XT"). The title's "D3D12.X: console command list memory methods (writes, timestamp, fill, copy, KickoffX, Wait32/64)" check passes with the GPU's own timestamps. **Not tested** - A retail title, and its `GetTimestampFrequency` / `GetClockCalibration` calls, on Windows; no `xcl-smoke` blocks from here. - NVIDIA / Intel on Windows for the off-path check: only this AMD card. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
shortside commented 2026-11-24 11:05:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by shortside on 2026-11-24T10:39:59Z.


@Lucasyudi I only saw your timestamp plan in #258 (04:50 and 04:59) after opening this. I had searched issues and PRs, not the comments of that thread. You said it first, so this is your call.

This PR ends up at the same detection as yours (a 60 Hz queue) and the same answers for GetTimestampFrequency / GetClockCalibration. It differs in how the value gets written. I hit the race you describe too: my first version wrote the clock from the cpu_writes worker, and the test title read 0 at +0x10 right after its own fence. Here the timestamp instead goes through write, like any other Write64BitValue*: the clock value is taken when the timestamp is recorded and the GPU writes it in list order, so nothing waits on the worker. The cost is that it is the record time, not the time the GPU got there. It is not stacked on #317.

On mac-on-main-wip (db065d8) + #750 + this, the title's "console command list memory methods" check passes 3 of 3 here (M5 Pro, CrossOver 26.3).

Whichever you prefer: take this approach into yours and I close this one, or keep this one and I add whatever your version has that this lacks (your three unit tests, the 1 MHz threshold instead of my 1 kHz). I won't take it out of draft before you answer.

<!-- greyfinch-sync:ivall/xcl:comment:7129083408 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/996#issuecomment-7129083408). Originally posted by [shortside](https://github.com/shortside) on 2026-11-24T10:39:59Z. --- @Lucasyudi I only saw your timestamp plan in #258 ([04:50](https://github.com/ivall/xcl/issues/258#issuecomment-7122388211) and 04:59) after opening this. I had searched issues and PRs, not the comments of that thread. You said it first, so this is your call. This PR ends up at the same detection as yours (a 60 Hz queue) and the same answers for `GetTimestampFrequency` / `GetClockCalibration`. It differs in how the value gets written. I hit the race you describe too: my first version wrote the clock from the `cpu_writes` worker, and the test title read 0 at `+0x10` right after its own fence. Here the timestamp instead goes through `write`, like any other `Write64BitValue*`: the clock value is taken when the timestamp is recorded and the GPU writes it in list order, so nothing waits on the worker. The cost is that it is the record time, not the time the GPU got there. It is not stacked on #317. On `mac-on-main-wip` (`db065d8`) + #750 + this, the title's "console command list memory methods" check passes 3 of 3 here (M5 Pro, CrossOver 26.3). Whichever you prefer: take this approach into yours and I close this one, or keep this one and I add whatever your version has that this lacks (your three unit tests, the 1 MHz threshold instead of my 1 kHz). I won't take it out of draft before you answer.
mikebuckets171 commented 2026-11-24 11:05:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mikebuckets171 on 2026-11-24T10:50:34Z.


Passes on a second Apple silicon host, on the gnullvm route - and here the trigger that fires is the second one you built in.

Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal, Rosetta 2, Rust 1.100.0, x86_64-pc-windows-gnullvm with LLVM-MinGW 20261117 (clang 23.1.6), --release --locked, test binaries under Wine, one test per process (--exact <full test path> --nocapture --test-threads=1).

hle::d3d12x::list_x::tests::timestamps_outside_unified_memory_land_after_the_queue:

  • base 02bfd1d: FAILED - panicked at crates/xcl/src/hle/d3d12x/list_x.rs:4981: non-UMA GPU timestamp never landed (top=0, bottom=0), exit 0x65, after 5.34 s of polling. Same symptom the description reports.

  • head f242ea8: ok. 1 passed; 0 failed in 0.44 s, exit 0x0, with

    xcl: D3D12.X: no GPU timestamps on this host (a timestamp query resolved to 0) - a timestamp is the CPU's clock when it was recorded, written when the GPU gets there
    

Which trigger fired, and why that matters. It is the "resolved to 0 on a queue that reached its fence" one, not the frequency gate. note_host_timestamp_frequency is wired into create_command_queue_x, and a lib test that builds its own device never goes through that wrapper - so on this host the fallback is not a rare second line of defence, it is the one that actually carries the library tests. Both paths exist for a title; for these tests only the fallback can fire, and it does, reliably, on the first timestamp write.

Correcting one thing I posted earlier on #258, because it changes what your fix has to cover. I wrote that this host "has no readback heap at all" and that XCL's D3D12_HEAP_TYPE_READBACK buffer cannot be created here. That was wrong: the heap type is refused only in the initial states I first tried (GENERIC_READ, RESOLVE_DEST). In COPY_DEST it is created fine, at 64 bytes and at 32768 bytes (TIMESTAMP_SLOTS * 8, the size list_x.rs:2118 asks for), Map with no range and Map with a read range both S_OK - which is exactly the shape runner.rs:1442 and list_x.rs:2127 ask for. So on this host the readback plumbing of the timestamp path works, and what fails is the content: EndQuery / ClearRenderTargetView / EndQuery, ResolveQueryData into that READBACK + COPY_DEST buffer, fence signalled, Map(0, 0..16) S_OK → stamps 0 and 0. That makes your change the right one rather than a workaround for a missing buffer type: the query heap and the readback buffer are both there, they just never get a number in them.

One number that argues for your real.rs half specifically. A plain D3D12 program on this host (no XCL) gets GetTimestampFrequency S_OK = 60, and GetClockCalibration S_OK with its GPU value equal to the CPU value (or 41-42 ticks below it) and advancing with wall time at ~10^6-10^7 ticks per run - i.e. the "GPU" clock it reports is already the host QPC at ~1 GHz. A title that reads both is given 60 ticks/second and a ~1 GHz-scaled value at the same time, so the error before this change is a factor of ~16.7 million, not just a zero. Making both answer from the clock is what removes that.

What this change does not reach, as far as I can read the diff (not tested against a title). timestamp() returns early with the clock when cpu_clock() is set, and real.rs answers GetTimestampFrequency / GetClockCalibration from the clock, so XCL's own Write64BitValue*OfPipeX timestamps and the port's frequency answers are covered. A title that calls BeginQuery / EndQuery / ResolveQueryData / Map itself through the real queue is not intercepted by this change, and on this host such a query resolves to 0 - the test title makes neither call, so nothing here shows whether a real title does that. Flagging it because it is the remaining route to a 0, not because the PR should necessarily cover it.

Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run; the plain-D3D12 probe is a ~250-line PE with no XCL in it and reads no files. AI use: GPT-6 Luna built both trees, ran the test and the probe, and drafted this comment; the codes and timings are from those runs.

<!-- greyfinch-sync:ivall/xcl:comment:7129316849 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/996#issuecomment-7129316849). Originally posted by [mikebuckets171](https://github.com/mikebuckets171) on 2026-11-24T10:50:34Z. --- **Passes on a second Apple silicon host, on the `gnullvm` route - and here the trigger that fires is the second one you built in.** Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal, Rosetta 2, Rust 1.100.0, `x86_64-pc-windows-gnullvm` with LLVM-MinGW 20261117 (clang 23.1.6), `--release --locked`, test binaries under Wine, one test per process (`--exact <full test path> --nocapture --test-threads=1`). `hle::d3d12x::list_x::tests::timestamps_outside_unified_memory_land_after_the_queue`: - base `02bfd1d`: **FAILED** - `panicked at crates/xcl/src/hle/d3d12x/list_x.rs:4981: non-UMA GPU timestamp never landed (top=0, bottom=0)`, exit `0x65`, after 5.34 s of polling. Same symptom the description reports. - head `f242ea8`: **ok. 1 passed; 0 failed** in 0.44 s, exit `0x0`, with ``` xcl: D3D12.X: no GPU timestamps on this host (a timestamp query resolved to 0) - a timestamp is the CPU's clock when it was recorded, written when the GPU gets there ``` **Which trigger fired, and why that matters.** It is the "resolved to 0 on a queue that reached its fence" one, not the frequency gate. `note_host_timestamp_frequency` is wired into `create_command_queue_x`, and a lib test that builds its own device never goes through that wrapper - so on this host the fallback is not a rare second line of defence, it is the one that actually carries the library tests. Both paths exist for a title; for these tests only the fallback can fire, and it does, reliably, on the first timestamp write. **Correcting one thing I posted earlier on #258, because it changes what your fix has to cover.** I wrote that this host "has no readback heap at all" and that XCL's `D3D12_HEAP_TYPE_READBACK` buffer cannot be created here. That was wrong: the heap type is refused only in the initial states I first tried (`GENERIC_READ`, `RESOLVE_DEST`). In `COPY_DEST` it is created fine, at 64 bytes and at 32768 bytes (`TIMESTAMP_SLOTS * 8`, the size `list_x.rs:2118` asks for), `Map` with no range and `Map` with a read range both S_OK - which is exactly the shape `runner.rs:1442` and `list_x.rs:2127` ask for. So on this host the readback *plumbing* of the timestamp path works, and what fails is the content: `EndQuery` / `ClearRenderTargetView` / `EndQuery`, `ResolveQueryData` into that READBACK + `COPY_DEST` buffer, fence signalled, `Map(0, 0..16)` S_OK → **stamps 0 and 0**. That makes your change the right one rather than a workaround for a missing buffer type: the query heap and the readback buffer are both there, they just never get a number in them. **One number that argues for your `real.rs` half specifically.** A plain D3D12 program on this host (no XCL) gets `GetTimestampFrequency` S_OK = 60, and `GetClockCalibration` S_OK with its GPU value equal to the CPU value (or 41-42 ticks below it) and advancing with wall time at ~10^6-10^7 ticks per run - i.e. the "GPU" clock it reports is already the host QPC at ~1 GHz. A title that reads both is given 60 ticks/second and a ~1 GHz-scaled value at the same time, so the error before this change is a factor of ~16.7 million, not just a zero. Making both answer from the clock is what removes that. **What this change does not reach, as far as I can read the diff (not tested against a title).** `timestamp()` returns early with the clock when `cpu_clock()` is set, and `real.rs` answers `GetTimestampFrequency` / `GetClockCalibration` from the clock, so XCL's own `Write64BitValue*OfPipeX` timestamps and the port's frequency answers are covered. A title that calls `BeginQuery` / `EndQuery` / `ResolveQueryData` / `Map` itself through the real queue is not intercepted by this change, and on this host such a query resolves to 0 - the test title makes neither call, so nothing here shows whether a real title does that. Flagging it because it is the remaining route to a 0, not because the PR should necessarily cover it. Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run; the plain-D3D12 probe is a ~250-line PE with no XCL in it and reads no files. **AI use**: GPT-6 Luna built both trees, ran the test and the probe, and drafted this comment; the codes and timings are from those runs.
shortside commented 2026-11-24 11:06:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by shortside on 2026-11-24T11:06:00Z.


@mikebuckets171 your reading is right, thanks. In unified memory the value is written by the GPU in list order; outside it, it goes through the cpu_writes worker like every other value there, so the ordering gap @Lucasyudi described is untouched by this PR. My note above ("nothing waits on the worker") and the description said that too broadly. I have corrected the description and added both of your points under Not tested (the ordering outside unified memory, and a title's own timestamp queries).

@Lucasyudi so the picture for your decision: this PR supplies the value and the frequency / calibration answers; your q.Wait idea for cpu_writes::after is a separate fix that both approaches would need.

<!-- greyfinch-sync:ivall/xcl:comment:7129654293 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/996#issuecomment-7129654293). Originally posted by [shortside](https://github.com/shortside) on 2026-11-24T11:06:00Z. --- @mikebuckets171 your reading is right, thanks. In unified memory the value is written by the GPU in list order; outside it, it goes through the `cpu_writes` worker like every other value there, so the ordering gap @Lucasyudi described is untouched by this PR. My note above ("nothing waits on the worker") and the description said that too broadly. I have corrected the description and added both of your points under **Not tested** (the ordering outside unified memory, and a title's own timestamp queries). @Lucasyudi so the picture for your decision: this PR supplies the value and the frequency / calibration answers; your `q.Wait` idea for `cpu_writes::after` is a separate fix that both approaches would need.
DavidM1911 commented 2026-11-24 12:05:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T11:36:39Z.


Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.

  • cargo test -p xcl --lib timestamp: 2 passed, 0 failed — a_60_hz_timestamp_frequency_is_no_gpu_clock covers the new CPU-clock fallback path, and timestamps_outside_unified_memory_land_after_the_queue still passes with the list_x changes.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7130319319 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/996#issuecomment-7130319319). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T11:36:39Z. --- Independent verification, merged onto current `main` `384f7f7` locally (clean merge). **Machine:** Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug. - `cargo test -p xcl --lib timestamp`: **2 passed, 0 failed** — `a_60_hz_timestamp_frequency_is_no_gpu_clock` covers the new CPU-clock fallback path, and `timestamps_outside_unified_memory_land_after_the_queue` still passes with the list_x changes. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
JJAutoCompare commented 2026-11-25 06:05:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:31:42Z.


Empirical test report (f242ea82)

Hardware / environment

  • Windows x64, build 10.0.26200.0, on an AMD x64 CPU (family 23, model 113, stepping 0). The focused fixture used the Windows CPU clock and required no graphics adapter.
  • rustc 1.100.0 (0ef1bc386 2026-11-09). DXC reported dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47). Cargo used the unoptimized test profile with incremental compilation and debug info disabled.

Commands and results

  • cargo test --workspace --no-run exited 0 and built the workspace test executables.
  • cargo test -p xcl --lib hle::d3d12x::cpu_writes::tests::a_60_hz_timestamp_frequency_is_no_gpu_clock -- --exact exited 0 with 1 passed, 0 failed, 0 ignored, 0 skipped, and 704 filtered out. Ran outside Invoke-ArcTest.ps1 with XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1.
  • Both commands used a clean checkout of f242ea8285368db7aba158f0966a0ece9376cc6c.

Observed behavior

The fixture classified 0 and 60 Hz as unavailable GPU timestamp frequencies and classified 1 MHz, 25 MHz, and 1 GHz as GPU clock frequencies. On this Windows host the reported performance-counter frequency cleared the fallback threshold, and consecutive counter reads were nonzero and nondecreasing.

Not tested

The full GPU workspace suite and game smoke runs on main and the PR head were omitted. The focused fixture leaves D3D12 queue integration untested, including zero GPU timestamp readback, ordered timestamp writes, clock calibration, and behavior on D3DMetal under CrossOver.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr996-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153861464 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/996#issuecomment-7153861464). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:31:42Z. --- ### Empirical test report (f242ea82) **Hardware / environment** - Windows x64, build 10.0.26200.0, on an AMD x64 CPU (family 23, model 113, stepping 0). The focused fixture used the Windows CPU clock and required no graphics adapter. - `rustc 1.100.0 (0ef1bc386 2026-11-09)`. DXC reported `dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47)`. Cargo used the unoptimized test profile with incremental compilation and debug info disabled. **Commands and results** - `cargo test --workspace --no-run` exited 0 and built the workspace test executables. - `cargo test -p xcl --lib hle::d3d12x::cpu_writes::tests::a_60_hz_timestamp_frequency_is_no_gpu_clock -- --exact` exited 0 with 1 passed, 0 failed, 0 ignored, 0 skipped, and 704 filtered out. Ran outside `Invoke-ArcTest.ps1` with `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. - Both commands used a clean checkout of `f242ea8285368db7aba158f0966a0ece9376cc6c`. **Observed behavior** The fixture classified 0 and 60 Hz as unavailable GPU timestamp frequencies and classified 1 MHz, 25 MHz, and 1 GHz as GPU clock frequencies. On this Windows host the reported performance-counter frequency cleared the fallback threshold, and consecutive counter reads were nonzero and nondecreasing. **Not tested** The full GPU workspace suite and game smoke runs on main and the PR head were omitted. The focused fixture leaves D3D12 queue integration untested, including zero GPU timestamp readback, ordered timestamp writes, clock calibration, and behavior on D3DMetal under CrossOver. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr996-focused.log` and published.
DavidM1911 commented 2026-11-26 04:07:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:32:06Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7181803048 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/996#issuecomment-7181803048). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T03:32:06Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
gut0to commented 2026-11-26 17:00:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-26T17:00:51Z.

Code review location: crates/xcl/src/hle/d3d12x/real.rs; line 4989

@@ -4979,6 +4979,22 @@ unsafe fn queue_dispatch(slot: usize, this: *mut c_void, a1: usize, a2: usize, a
             }
             hr as u32 as usize
         }
+        // a host without GPU timestamps: the clock XCL's timestamps are read from
+        16 if super::cpu_writes::cpu_clock() => {
+            if a1 != 0 {
+                (a1 as *mut u64).write_unaligned(super::cpu_writes::clock_frequency());
+            }
+            0
+        }
+        17 if super::cpu_writes::cpu_clock() => {

Could a focused test exercise the queue's GetTimestampFrequency and GetClockCalibration dispatch when cpu_clock() is enabled? The new threshold test covers detection, but it does not cover these vtable slots writing QPC frequency/current ticks to the title's output pointers. A regression through the queue hook would verify the reported clock matches the timestamps written by the fallback. AI-assisted review: I inspected the diff and existing tests; I did not run tests.

<!-- greyfinch-sync:ivall/xcl:review-comment:4711430636 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/996#discussion_r4711430636). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-26T17:00:51Z. **Code review location:** `crates/xcl/src/hle/d3d12x/real.rs`; line 4989 ~~~~diff @@ -4979,6 +4979,22 @@ unsafe fn queue_dispatch(slot: usize, this: *mut c_void, a1: usize, a2: usize, a } hr as u32 as usize } + // a host without GPU timestamps: the clock XCL's timestamps are read from + 16 if super::cpu_writes::cpu_clock() => { + if a1 != 0 { + (a1 as *mut u64).write_unaligned(super::cpu_writes::clock_frequency()); + } + 0 + } + 17 if super::cpu_writes::cpu_clock() => { ~~~~ --- Could a focused test exercise the queue's `GetTimestampFrequency` and `GetClockCalibration` dispatch when `cpu_clock()` is enabled? The new threshold test covers detection, but it does not cover these vtable slots writing QPC frequency/current ticks to the title's output pointers. A regression through the queue hook would verify the reported clock matches the timestamps written by the fallback. AI-assisted review: I inspected the diff and existing tests; I did not run tests.
Foniass commented 2026-12-01 04:36:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:36:47Z.


Triage (#1607) – head f242ea8

No open or merged PR falls back to the CPU clock for timestamps on a host without GPU timestamps; main has no such path. #317 touches the same functions, but for the console's OS-clock timestamp flags, as the description says.
The queue slots it overrides (16 = GetTimestampFrequency, 17 = GetClockCalibration) match main's queue_dispatch. No problems found in the diff. The limits the description lists (the clock is read when the list is recorded, and writes outside unified memory still happen on the worker thread) are real, but they do not change the result on a Windows host. The branch conflicts with main.
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:7300912304 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/996#issuecomment-7300912304). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:36:47Z. --- **Triage (#1607)** – head f242ea8 No open or merged PR falls back to the CPU clock for timestamps on a host without GPU timestamps; main has no such path. #317 touches the same functions, but for the console's OS-clock timestamp flags, as the description says. The queue slots it overrides (16 = GetTimestampFrequency, 17 = GetClockCalibration) match main's `queue_dispatch`. No problems found in the diff. The limits the description lists (the clock is read when the list is recorded, and writes outside unified memory still happen on the worker thread) are real, but they do not change the result on a Windows host. The branch conflicts with main. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

Pull request closed

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!990
No description provided.