Skip to content

test(composition): Wait for frames, not a second, on slow hosts - #25070

Merged
MartinZikmund merged 1 commit into
masterfrom
dev/mazi/webgpu-frame-driver
Oct 7, 2026
Merged

MartinZikmund merged 1 commit into
masterfrom
dev/mazi/webgpu-frame-driver

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes #25069

PR Type:

🏗️ Build or CI related changes

What changed? 🚀

The Given_CompositionTarget frame-driver tests added in #24735 counted frames over a fixed 1 s window and asserted at least 5, which the WASM WebGPU lane (Chrome's SwiftShader adapter, 2-4 fps with multi-second GPU stalls) never reaches. That made the lane red on master.

  • The counting tests now wait at least a second, and on a host too slow to present 5 frames in that time, until it has (capped at 30 s). Fast hosts behave as before.
  • The pause test asserted an absolute 100 ms first step, but one SwiftShader frame alone takes ~265 ms. It now checks the invariant directly: the first tick is not dated before the driver subscribed (a stale pre-pause timestamp would be).

Validated locally by publishing the WASM SamplesApp and running Given_CompositionTarget in Chrome with the CI flags (--use-webgpu-adapter=swiftshader): 7 failures before, all pass after, on both UNO_WEBGPU=1 and the default Skia backend.

The Given_ListViewBase failures in the same build pass locally on both the pre- and post-#24735 builds, so they look like the lane's existing slow-frame flakes rather than a regression.

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample (test-only change)
  • 📚 Docs have been added/updated following the documentation template (for bug fixes / features)
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes
  • 👀 Reviewed 2 other open pull requests (optional but appreciated!)

🤖 Generated with Claude Code

https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z

The frame-driver tests counted frames over a fixed 1s window and
asserted at least 5, which the SwiftShader WebGPU lane on WASM
(2-4 fps, multi-second GPU stalls) never reaches. Wait at least a
second and then until 5 frames arrived, and check the pause test's
invariant directly: the first tick is not dated before the driver
subscribed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z
Copilot AI balanced review requested due to automatic review settings October 7, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 17s —— View job


Review of #25070

Verdict: ship. I found no blocking issues, so I posted no inline comments. This was a review by inspection of the diff. I did not build or run anything.

Issues by severity: 0 blocking, 0 major, 2 minor notes (below).

What the change does

  • WaitForFrames keeps the old 1 s minimum, so fast hosts behave as before. Slow hosts keep waiting until the frame count reaches the minimum, up to a 30 s cap.
  • The pause test no longer asserts an absolute 100 ms first step. It now asserts that the first tick isn't dated before the driver subscribed. A stale pre-pause timestamp would fail that check directly, so it fits the invariant better than the time bound did.

Minor notes (non-blocking)

  • The pause test used to require 3 ticks and now requires 1. That is enough for the "first tick is not stale" check. It would be worth confirming that Compositor.TimestampInTicks and the FrameStarting timestamp use the same clock and unit. If they don't, staleBy <= 0 could pass or fail for the wrong reason. The PR reports it passing locally on both backends, which suggests they do match.
  • WaitForFrames polls every 50 ms and reads counters that are updated from event handlers. That is safe if the test body and the handlers share the UI thread, as they appear to. If a handler ever fires off-thread, int reads without Volatile.Read could be stale. This is theoretical here.

Process

  • The PR title and commit follow Conventional Commits, and the PR links its issue.
  • The tests are not skipped or ignored, and there are no style violations.
  • The Given_ListViewBase failures are called out as pre-existing flakes. I haven't verified that.

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 237859 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1162

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • DisplayInformation.png-dark
    • DropDownButtonPage.png-dark
    • Examples.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
  • skia-windows-screenshots: 1162 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AppBarButtonWithIconTest.png-dark
    • AutomationProperties_Relations.png-dark
    • AutoSuggestBox_Icons.png-dark
    • AutoSuggestBox_Icons.png
    • Basics_Automated.png-dark
    • Basics_Automated.png
    • BorderTopwithmargins.png-dark
    • BorderTopwithmargins.png
    • CalendarDatePicker_Description.png-dark
    • CalendarDatePicker_Description.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ComboBox_DropDownPlacement.png-dark
    • ComboBox_DropDownPlacement.png
    • ComboBox_Popover.png-dark
    • ComboBox_Popover.png
    • CommandBarFlyoutMainPage.png-dark
    • CommandBarFlyoutMainPage.png
    • ContentControl_ComboBoxSetNull.png-dark

@mergify

mergify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@MartinZikmund
MartinZikmund merged commit 7b82dfb into master Oct 7, 2026
56 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/webgpu-frame-driver branch October 7, 2026 14:30
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.

[WASM][WebGPU] Given_CompositionTarget frame-driver tests fail on the SwiftShader lane

4 participants