Skip to content

fix(cli): check no longer reports GPU stalls from its own pixel reads - #7736

Open
miguel-heygen wants to merge 1 commit into
mainfrom
fix/check-gl-readpixels-warning
Open

miguel-heygen wants to merge 1 commit into
mainfrom
fix/check-gl-readpixels-warning

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

hyperframes check no longer lists Chrome's "GPU stall due to ReadPixels" notes as warnings from the composition. Check causes them itself.

Why

To tell whether a canvas moved, check's motion signature copies each canvas into a 2D context and reads its pixels (motion-signature.browser.js, drawImage then getImageData). On a WebGL canvas that readback makes Chrome log a GL driver note such as:

[.WebGL-0x2c84001d4800]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels

Check then reported each one as a console_warning from the film. A WebGL composition that draws only from hf-seek got six of them, none caused by its own code, so authors were told to fix something they did not write.

Related work

None.

How

  • wireRuntimeListeners (packages/cli/src/utils/checkBrowser.ts), the one place console output becomes runtime findings, skips warnings that are Chrome GL driver Performance notes ([.WebGL-…]GL Driver Message (<source>, Performance, …). Other GL driver message types, such as errors, are still reported.

Test plan

  • Unit test added in checkBrowser.test.ts: a GPU stall note and an ordinary warning reach the console listener; only the ordinary warning is reported.
  • fails without the fix: does not report Chrome's GPU stall notes for check's own pixel reads as the film's warnings goes red with the checkBrowser.ts change reverted (1 failed, 74 passed); with it, 75 passed, 3 runs in a row.
  • Real hyperframes check --json on a WebGL2 shader composition drawn from hf-seek: before, 6 console_warning findings for GPU stalls; after, 0.
  • oxfmt --check, oxlint on both files, tsc --noEmit for packages/cli: clean.
  • Documentation updated: not needed, no documented behaviour changes.
  • Comments follow CONTRIBUTING.md "Comments".

… as the film's warnings

check copies each canvas into a 2D context to see whether it moved. On WebGL
that readback makes Chrome log a GL driver Performance note, which check then
listed as a console warning from the composition.
@github-actions

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 97 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (8)

Unstable (1)

  • seqplainkeys-none-pct-r0-nested-z100: tracking 0.05, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true

This branch has not been deployed

No deployments
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