Scripts: the smoke block can't tell a black screen from a working title #712

Open
opened 2026-11-24 04:02:21 +00:00 by Chrysana · 2 comments
Chrysana commented 2026-11-24 04:02:21 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by Chrysana on 2026-11-24T04:02:21Z.


What happens

A PR can pass the regression check while the title draws nothing. On #541 at 3d7604b (RX 9070 XT), every frame of the 60 s run was black (14 frame captures, 0 % of sampled pixels lit, against main, which is lit from ~21 s on), but its xcl-smoke block looked healthy:

frames shown: 1595 (PresentX 1596)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0

pr_check.py would pass it: more frames than main, lower peak commit. Details: https://github.com/ivall/xcl/pull/541 (my comment there; imnicho saw the same on an RTX 5080, and ryosen0 reproduced it on an RTX 3060 Ti: the captures "caught what the smoke block can't"). It is still black at #541's current head 24635db on this card (90 s, empty DXIL cache, 21/21 captures dark), so this isn't a one-off.

Proposal (I'd like to know whether this direction is wanted before writing it)

XCL already has what's needed: XCL_FRAME_DUMP=N samples every N-th frame (its log line already says … – 0 of 518400 samples not black), and report.json keeps the last one as d3d12.last_frame_dump (sampled_pixels, non_dark_samples).

  1. scripts/smoke.ps1 sets XCL_FRAME_DUMP=120 and adds one line to the block from report.json, e.g. lit at end: 100 % (non_dark_samples / sampled_pixels, or n/a when no frame was sampled or the format couldn't be decoded). The block stays xcl-smoke v1; pr_check.py reads key: value lines, so older blocks without the line still parse.
  2. scripts/pr_check.py: when both blocks have the line, refuse a PR whose last frame is dark (say under 1 %) while main's is lit (say over 50 %). Thresholds are up to you; a warning first would also work.

Cost, measured: on main 91f9a5e (RX 9070 XT, 60 s, back to back), XCL_FRAME_DUMP=120 gave 1171 and 1183 frames against 1176 and 1167 without it, which is within run-to-run noise. Each sampled frame writes a quarter-size BMP into the logs folder (10–14 per 60 s run here).

Not covered by this: a title that's black for a legitimate reason at the 60 s mark (a fade, a loading screen); a picture that's lit but wrong. A last-frame check only catches "nothing drawn".

If this is wanted, I'll open a PR for it (smoke.ps1 + pr_check.py + a test of the new line, small).

AI use: Claude Code (Claude Opus 5.5) measured the runs and wrote this issue.

<!-- greyfinch-sync:ivall/xcl:issue:6574324992 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/717). Originally posted by [Chrysana](https://github.com/Chrysana) on 2026-11-24T04:02:21Z. --- **What happens** A PR can pass the regression check while the title draws nothing. On #541 at `3d7604b` (RX 9070 XT), every frame of the 60 s run was black (14 frame captures, 0 % of sampled pixels lit, against `main`, which is lit from ~21 s on), but its `xcl-smoke` block looked healthy: ``` frames shown: 1595 (PresentX 1596) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 ``` `pr_check.py` would pass it: more frames than `main`, lower peak commit. Details: https://github.com/ivall/xcl/pull/541 (my comment there; imnicho saw the same on an RTX 5080, and ryosen0 reproduced it on an RTX 3060 Ti: the captures "caught what the smoke block can't"). It is still black at #541's current head `24635db` on this card (90 s, empty DXIL cache, 21/21 captures dark), so this isn't a one-off. **Proposal** (I'd like to know whether this direction is wanted before writing it) XCL already has what's needed: `XCL_FRAME_DUMP=N` samples every N-th frame (its log line already says `… – 0 of 518400 samples not black`), and `report.json` keeps the last one as `d3d12.last_frame_dump` (`sampled_pixels`, `non_dark_samples`). 1. `scripts/smoke.ps1` sets `XCL_FRAME_DUMP=120` and adds one line to the block from `report.json`, e.g. `lit at end: 100 %` (`non_dark_samples / sampled_pixels`, or `n/a` when no frame was sampled or the format couldn't be decoded). The block stays `xcl-smoke v1`; `pr_check.py` reads `key: value` lines, so older blocks without the line still parse. 2. `scripts/pr_check.py`: when both blocks have the line, refuse a PR whose last frame is dark (say under 1 %) while `main`'s is lit (say over 50 %). Thresholds are up to you; a warning first would also work. **Cost, measured:** on `main` `91f9a5e` (RX 9070 XT, 60 s, back to back), `XCL_FRAME_DUMP=120` gave 1171 and 1183 frames against 1176 and 1167 without it, which is within run-to-run noise. Each sampled frame writes a quarter-size BMP into the logs folder (10–14 per 60 s run here). **Not covered by this:** a title that's black for a legitimate reason at the 60 s mark (a fade, a loading screen); a picture that's lit but wrong. A last-frame check only catches "nothing drawn". If this is wanted, I'll open a PR for it (`smoke.ps1` + `pr_check.py` + a test of the new line, small). AI use: Claude Code (Claude Opus 5.5) measured the runs and wrote this issue.
Luxuryig commented 2026-11-24 07:06:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by Luxuryig on 2026-11-24T04:32:14Z.


Opened as #747. Thresholds are the ones in the issue: refuse when the PR frame is under 1% and main is over 50%. A missing line or n/a still passes.

<!-- greyfinch-sync:ivall/xcl:comment:7122109124 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/717#issuecomment-7122109124). Originally posted by [Luxuryig](https://github.com/Luxuryig) on 2026-11-24T04:32:14Z. --- Opened as #747. Thresholds are the ones in the issue: refuse when the PR frame is under 1% and main is over 50%. A missing line or `n/a` still passes.
OrangeCrane1738 commented 2026-11-24 17:06:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by OrangeCrane1738 on 2026-11-24T16:38:55Z.


Another case the check lets through, from regression runs I made today: both runs died about a second after starting and still produced blocks the check accepts.

On this PC (no Gaming Services), builds without #235 route XAsync to a system runtime that failed to initialise (XGameRuntime PC: initialization → 0x80070424, then XAsync: PC). On main beaa245 and on #821's head f9ef768 the title then stopped about a second in with a fail-fast (Windows' "stack-based buffer overrun" dialog). The log shows only empty activity lines after that until XCL_RUN_SECONDS ended the run at 25 s. Both blocks (RTX 5060 Ti):

exit: 0x0
frames shown: 0 (PresentX 0)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0

Two things let it through:

  • smoke.ps1 counts crashes from unhandled exception|process ends with status; a fail-fast never reaches XCL's handler, so it reads 0.
  • pr_check.py compares frames only if mf: when main's block shows 0 frames the comparison is skipped, so two dead runs pass.

Requiring main's block to show frames (or at least warning when either block shows 0) would catch this, alongside the lit-pixel check proposed here.

AI use: Claude Opus 5.5 (in the Claude app) helped analyse the logs and draft this

<!-- greyfinch-sync:ivall/xcl:comment:7137992661 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/717#issuecomment-7137992661). Originally posted by [OrangeCrane1738](https://github.com/OrangeCrane1738) on 2026-11-24T16:38:55Z. --- Another case the check lets through, from regression runs I made today: both runs died about a second after starting and still produced blocks the check accepts. On this PC (no Gaming Services), builds without #235 route XAsync to a system runtime that failed to initialise (`XGameRuntime PC: initialization → 0x80070424`, then `XAsync: PC`). On main `beaa245` and on #821's head `f9ef768` the title then stopped about a second in with a fail-fast (Windows' "stack-based buffer overrun" dialog). The log shows only empty activity lines after that until `XCL_RUN_SECONDS` ended the run at 25 s. Both blocks (RTX 5060 Ti): ``` exit: 0x0 frames shown: 0 (PresentX 0) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 ``` Two things let it through: - `smoke.ps1` counts crashes from `unhandled exception|process ends with status`; a fail-fast never reaches XCL's handler, so it reads 0. - `pr_check.py` compares frames only `if mf`: when main's block shows 0 frames the comparison is skipped, so two dead runs pass. Requiring main's block to show frames (or at least warning when either block shows 0) would catch this, alongside the lit-pixel check proposed here. AI use: Claude Opus 5.5 (in the Claude app) helped analyse the logs and draft this
Sign in to join this conversation.
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#712
No description provided.