Skip to content

Test: Make the Windows resize probe tell late frames from prompt ones, per Windows build - #354

Merged
b-re-w merged 3 commits into
developfrom
feat/resize-probe-discrimination
Nov 16, 2026
Merged

b-re-w merged 3 commits into
developfrom
feat/resize-probe-discrimination

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Closes #353

The Windows resize probe now shows, per Windows build, whether it can tell a late frame from a prompt one, and the CI matrix shows that it can on both runner builds.

What changed

  • .github/scripts/resize-control.c (new): the negative control. Built like the renderer's GPU resize path (top-level window with its redirection surface and no brush, child window with a copy-model swapchain: SEQUENTIAL, 1 buffer, STRETCH; refit, draw, Present, fit the child, DwmFlush, all inside WM_SIZE), except that during a drag it sleeps DXC_RESIZE_PRESENT_DELAY_MS (50 by default) before drawing each new size. It draws a ruler (a dark line every 24 px) so a stretched or misplaced picture is visible. Linked as a GUI program so no console window covers the backdrop.
  • .github/scripts/resize-os-version.h (new): one line with the Windows version from RtlGetVersion plus UBR, DisplayVersion, ProductName, InstallationType from the registry.
  • .github/scripts/resize-probe.c:
    • first line resize-probe: os windows 10.0.BUILD.UBR (...);
    • stale check: the left 60% of the client stays put while the right edge is dragged, so each frame's brightness steps there must match the ones at rest (within 1 px); a frame where 30% or more of the judged rows lost them is stale and fails (FR-19.8 criterion 4 counts a stretched or old frame as a failure);
    • lag: per frame lag_px (edge vs cursor at present time) and lag_ms (how long ago the cursor was where the edge is), and per drag lag ... median / p95 / max;
    • placement: the probe puts the window on the primary monitor's work area top left itself when it is not there after --place-after seconds (20), or at once with --place, up to three times (a move between monitors of different scale changes the size), and takes whatever size it settles at (the larger minimum at 200%).
  • .github/scripts/run-probe-v2.ps1: drags the control at each rate as well, writes the OS line at the top of each application log (.log and .log.err), and writes summary.md. A renderer's result at a mouse rate where the control PASSes reads INCONCLUSIVE (no discrimination); where the control did not run, INCONCLUSIVE (the control did not run).
  • .github/workflows/test-windows-resize-probe.yml: matrix windows-2022 and windows-2025; builds the control; the job passes when every drag ran, the Windows version is logged, hand-check took the asked path and every control step was at least 45 ms late. Verdicts are reported, not gated (WARP, Basic Render Driver).
  • Separate Docs commit: FR-19.8 criterion 4 described a DirectComposition Commit the window does not have; it now describes the CPU path (hide the GPU child, Skia raster into a DIB, BitBlt into the redirection surface before WM_SIZE returns) and the GPU path with DXC_RASTER_RESIZE=0 (ResizeBuffers, draw, Present, DwmFlush). The measure is unchanged.

CI matrix results

Run https://github.com/DarkPyonix/compose-rust/actions/runs/40280843111 (head f473b77). hand-check is the Kotlin/Native build from run 38807049709 (pinned in the workflow, as before). Each cell: probe verdict, frames with black inside the window, stale frames, median lag in ms. Full tables with holes, torn and px lag are in each job summary.

runner (build) scale path 16 ms / 8 px 8 ms / 4 px 1 ms / 1 px
windows-2022 (10.0.20348.5761) 100% CPU (new) PASS (black 0, stale 0, lag 14.5 ms) PASS (black 0, stale 0, lag 16.0 ms) PASS (black 0, stale 0, lag 16.6 ms)
windows-2022 (10.0.20348.5761) 100% GPU (old, DXC_RASTER_RESIZE=0) PASS (black 0, stale 0, lag 47.1 ms) PASS (black 0, stale 0, lag 32.5 ms) PASS (black 0, stale 0, lag 30.2 ms)
windows-2022 (10.0.20348.5761) 100% control (GPU, 50 ms late) FAIL (black 22, stale 47, lag 110.9 ms) FAIL (black 21, stale 47, lag 100.0 ms) FAIL (black 12, stale 25, lag 79.0 ms)
windows-2022 (10.0.20348.5761) 200% CPU (new) PASS (black 0, stale 0, lag 14.9 ms) PASS (black 0, stale 0, lag 23.8 ms) PASS (black 0, stale 0, lag 18.1 ms)
windows-2022 (10.0.20348.5761) 200% GPU (old, DXC_RASTER_RESIZE=0) PASS (black 0, stale 0, lag 31.0 ms) PASS (black 0, stale 0, lag 33.4 ms) PASS (black 0, stale 0, lag 29.9 ms)
windows-2022 (10.0.20348.5761) 200% control (GPU, 50 ms late) FAIL (black 57, stale 117, lag 109.3 ms) FAIL (black 58, stale 120, lag 115.9 ms) FAIL (black 29, stale 60, lag 93.9 ms)
windows-2025 (10.0.26100.33650) 100% CPU (new) PASS (black 0, stale 0, lag 31.5 ms) PASS (black 0, stale 0, lag 17.5 ms) PASS (black 0, stale 0, lag 20.1 ms)
windows-2025 (10.0.26100.33650) 100% GPU (old, DXC_RASTER_RESIZE=0) PASS (black 0, stale 0, lag 58.8 ms) FAIL (black 1, stale 1, lag 49.3 ms) PASS (black 0, stale 0, lag 30.9 ms)
windows-2025 (10.0.26100.33650) 100% control (GPU, 50 ms late) FAIL (black 18, stale 52, lag 123.8 ms) FAIL (black 17, stale 52, lag 113.8 ms) FAIL (black 10, stale 27, lag 109.9 ms)
windows-2025 (10.0.26100.33650) 200% CPU (new) PASS (black 0, stale 0, lag 20.5 ms) PASS (black 0, stale 0, lag 21.4 ms) PASS (black 0, stale 0, lag 22.7 ms)
windows-2025 (10.0.26100.33650) 200% GPU (old, DXC_RASTER_RESIZE=0) PASS (black 0, stale 0, lag 50.8 ms) PASS (black 0, stale 0, lag 50.2 ms) PASS (black 0, stale 0, lag 46.2 ms)
windows-2025 (10.0.26100.33650) 200% control (GPU, 50 ms late) FAIL (black 48, stale 122, lag 127.7 ms) FAIL (black 47, stale 125, lag 116.6 ms) FAIL (black 23, stale 62, lag 110.4 ms)

What it shows:

  • The probe discriminates on both builds: the 50 ms late control FAILs at every scale and rate on 20348 and on 26100 (black strips in 10 to 58 frames per drag, a stale picture in nearly every drag frame). So neither Server 2022 nor Server 2025 holds a window's new size back until its content is ready, and a PASS on these runners is a real PASS.
  • CPU path (default): PASS in all 12 drags, 0 black, 0 stale. Lag median 15 to 32 ms.
  • GPU path (DXC_RASTER_RESIZE=0): PASS in 11 of 12; on 26100 at 100% and 8 ms one frame was black and stale. The earlier run (40280134702, control broken on 2025 by its console window) had the same kind of single failure on 26100 at 200% and 1 ms (2 frames). None on 20348. Lag median 30 to 59 ms, about twice the CPU path's.
  • Limits: the runners draw with WARP on the Basic Render Driver, and both are Server builds, not 26H2 (26300). A real GPU presents asynchronously and can fail more on the GPU path than WARP does. Whether 26H2 hides lateness is for the owner's run below.

소유자 실행 안내 (26H2 기기)

목적: 26H2(빌드 26300)에서 Windows가 늦은 프레임을 스스로 가리는지(대조군이 PASS하는지)와, 그 환경에서 CPU 경로와 GPU 경로의 결과와 지연을 확인합니다.

  1. 키트 받기: https://github.com/DarkPyonix/compose-rust/actions/runs/40280843111 의 Artifacts에서 resize-probe-kit-windows를 내려받아 새 폴더(예: C:\probe-kit)에 풉니다. 명령줄로는 gh run download 40280843111 -R DarkPyonix/compose-rust -n resize-probe-kit-windows -D C:\probe-kit 입니다. 키트는 2026-11-25에 만료됩니다.
  2. 실행 전: 주 모니터(작업 표시줄 설정의 "주 디스플레이")에서 실행합니다. 다른 모니터에 창이 떠도 프로브가 주 모니터로 옮깁니다. 배율은 지금 쓰는 200% 그대로 두면 됩니다. "창을 끄는 동안 창 내용 표시"는 스크립트가 잠시 켜고 끝나면 되돌립니다.
  3. 실행: 폴더의 run-probe-v2.cmd를 두 번 누릅니다. PowerShell에서는 powershell -NoProfile -ExecutionPolicy Bypass -File C:\probe-kit\run-probe-v2.ps1 입니다. 서명 없는 실행 파일이라 SmartScreen이 막으면 "추가 정보", "실행"을 누릅니다. hand-check(CPU 경로, GPU 경로)와 대조군 창을 마우스 속도 세 가지로 모두 9번 끕니다. 약 5분 동안 마우스를 만지지 않습니다. "Done"이 나오면 Enter로 닫습니다.
  4. 보낼 것: 키트 폴더에 생긴 probe-logs.zip 하나입니다(안에 summary.md 표와 모든 로그가 있습니다). 끝날 때 콘솔에 나온 표의 스크린숏도 있으면 좋습니다.
  5. 가능하면 같은 키트를 26H2 이전 빌드(예: 24H2, 26100)의 실제 GPU 기기에서도 한 번 돌려 probe-logs.zip을 보냅니다. CI 러너는 Server와 WARP라서 "26H2 이전의 실제 기기에서 CPU 경로가 필요한가"는 그 비교로 답이 납니다.

결과 읽는 법: control late 줄이 FAIL이면 그 기기에서 프로브가 늦은 프레임을 봅니다. 그때 hand-check의 PASS와 FAIL은 그대로 유효합니다. control late가 PASS이면 Windows가 늦은 프레임을 가리는 것이고, hand-check 줄은 INCONCLUSIVE (no discrimination)로 나옵니다. 그 경우 차이는 lag ms 열(창 가장자리가 마우스를 얼마나 늦게 따라오는지)에만 남습니다.

…ut DirectComposition

The criterion said WM_SIZE returns after ResizeBuffers, the Skia draw,
Present and a DirectComposition Commit. The window has no DirectComposition:
during a size change it hides the GPU child, draws the frame with Skia's
raster backend into a DIB and copies it into the top-level window's
redirection surface with BitBlt before WM_SIZE returns, and with
DXC_RASTER_RESIZE=0 it presents on the GPU and waits with DwmFlush.
The measure of the criterion (no frame at another size) is unchanged.

Refs #353
…mes from prompt ones

On CI hand-check passes with resize frames on the CPU and on the GPU
alike, so the probe has never shown it can tell a late frame from a
prompt one, and Windows 11 26H2 may hold a window's new size back until
its content is ready, which would hide lateness on its own.

- resize-control.c: a negative control built like the GPU resize path
  (redirected top level, child with a copy-model swapchain, refit, draw,
  Present, DwmFlush inside WM_SIZE) that presents every new size
  DXC_RESIZE_PRESENT_DELAY_MS (50) late during a drag. It draws a ruler,
  so a stretched or misplaced picture moves.
- resize-probe.c: the Windows version with its UBR as the first line
  (resize-os-version.h, shared with the control); a stale check (the
  content's left zone must stay where it was at rest; FR-19.8 criterion 4
  counts a stretched or old frame as a failure); the lag of the window's
  edge behind the cursor per frame and per drag, in px and ms; the window
  is put on the primary monitor's work area by the probe itself when it
  is not there (--place-after, default 20 s), at whatever size it settles.
- run-probe-v2.ps1: drags the control at each rate too, writes the OS
  line at the top of each application log, and writes summary.md, where a
  renderer's result is INCONCLUSIVE (no discrimination) at a rate where
  the control passes.
- The probe workflow runs on windows-2022 (20348) and windows-2025
  (26100), checks the control was late, and puts each runner's table in
  the job summary.

Refs #353
@b-re-w b-re-w added the run-heavy-ci Run the heavy CI workflows on this pull request's head label Oct 26, 2026
…he backdrop

On windows-2025 the console window the control opened sat beside it,
above the probe's backdrop, and the probe stopped with "the backdrop does
not show beside the window" for five of six control drags.

Refs #353
@b-re-w b-re-w removed the run-heavy-ci Run the heavy CI workflows on this pull request's head label Nov 5, 2026
@b-re-w
b-re-w merged commit 05218d7 into develop Nov 16, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant