Repository navigation
ContourLayer: aggregate on WebGPU before CPU contour generation - #11079
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge based on this follow-up review. SummaryThis PR adds WebGPU aggregation to
The follow-up adds the requested TSDoc to the test helper. All supplied previous documentation findings are addressed. No new issues found. Reviews (9) · Last reviewed commit: "Document the Contour computation test he..." · Reviewed by Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6e3ab66. Configure here.
|
Reviewed 2ced2cc; comments only at this point. One P1: on WebGPU, ContourLayer now draws nothing for 1 to 4+ frames after each change. On swiftshader WebGPU, empty bins read NaN on both paths. Contour line and band counts match the WebGL GPU path for SUM, MEAN, MIN and MAX on the SF bike-parking points. Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional. |
chrisgervang
left a comment
There was a problem hiding this comment.
Reviewed ad74807; recommend approval. The P1 and both docs items are addressed.
On swiftshader WebGPU with cellSize 200, 800, 100, the previous contours stay until the new ones arrive, so no frame is empty after the first load. Contour counts are unchanged from 2ced2cc.
Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.

For #10712.
Background
ContourLayer renders on WebGPU but aggregates on the CPU. Use compute reduction and asynchronous value copies for existing CPU contour generation. Keep completed contours and their transforms visible until replacement results arrive.
Change List
Verified 19 contour tests, scoped typechecking, lint, and 119 node tests. Extensions retain CPU aggregation. Parity tests isolate computation because polygon/path resource-count checks also fail on the existing CPU path.
Note
Medium Risk
Adds WebGPU compute shader pipelines and GPU buffer copy retention logic across aggregation layers, though risks are mitigated by automatic CPU fallbacks.
Overview
Enables WebGPU compute aggregation for
ContourLayerwhengpuAggregationis enabled, performing point reduction in a compute shader before generating isolines and isobands on the CPU.Completed contours and their transforms are now retained during updates, keeping previous geometry visible until asynchronous aggregate readbacks arrive. The layer automatically falls back to CPU aggregation when layer extensions are present or when inputs exceed device buffer limits.
Additionally updates base
AggregationLayerto copy and retain GPU-only cell buffers during transitions to automatic domains or CPU distribution scales, preventing in-flight updates from corrupting displayed cells.Reviewed by Cursor Bugbot for commit a37002d. Bugbot is set up for automated code reviews on this repo. Configure here.
Review follow-up: integrates merged Hexagon and graph ScreenGrid changes. Also preserves GPU-only Grid/Hexagon cells when an update enables automatic domains or CPU distribution scales, copying GPU outputs only for that transition and releasing the copies when replacement metadata is ready.