Repository navigation
Generate ContourLayer isolines on WebGPU - #11230
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9e38cca58
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[Medium impact] The reviewed changes appear safe to merge; no new blocking issues were found. SummaryAdds optional WebGPU isolines that draw directly from GPU-generated endpoints, while keeping CPU geometry for unsupported configurations.
No new actionable issues found. The earlier callback and release-note findings remain addressed. Reviews (5) · Last reviewed commit: "Preserve contour readback and retire rep..." · Reviewed by Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ 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 266d3c8. Configure here.
chrisgervang
left a comment
There was a problem hiding this comment.
Reviewed a984986 after merge; follow-ups below. No P1s.
The WGSL pass uses the same cell corners, >= threshold, missing-value rule, saddle mean and reference vertex as the CPU getCode/getLines path.
Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.
Generated by Claude Code
| Set the experimental `gpuGeometry` prop to `true` to generate isolines from the bin | ||
| buffer and draw them without readback. This path supports numeric thresholds, with | ||
| picking disabled and no line sublayer overrides or rendering extensions. | ||
| Isobands and other configurations use CPU contour geometry. |
There was a problem hiding this comment.
P2: gpuGeometry has no prop entry with a default or anchor, so readers only find it in this paragraph. The opening of this section still says contours are generated on the CPU and lag a frame.
Could we add a gpuGeometry (boolean, optional) entry under Aggregation Options with * Default: false, link it from here, and qualify the CPU sentence?
Details
- Still true on master.
- Sub Layers lists only
lines(PathLayer). GPU isolines render as LineLayer sublayers.
Generated by Claude Code
| xRange, | ||
| yRange | ||
| }); | ||
| expect(expected.lines).toHaveLength(4); |
There was a problem hiding this comment.
Non-blocking: The CPU parity check uses one bin, so it only hits codes 1, 2, 4 and 8. Could a diagonal 2x2 case cover the saddle codes 5 and 10?
Generated by Claude Code
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.

Background
ContourLayer reads back its bins to generate paths. This PR adds an opt-in isoline path that passes GPU-generated endpoints directly to LineLayer.
Change List
gpuGeometryprop for non-pickable isolinesCore and aggregation package builds, Contour headless tests, and lint passed.
TODO
GPU isobands and segment picking. These use the existing CPU geometry path.
Note
Medium Risk
Introduces a new WebGPU compute shader pipeline for marching squares geometry generation and alters extension handling during aggregation shader assembly.
Overview
Adds an experimental
gpuGeometryprop toContourLayerthat generates and renders isolines entirely on WebGPU. When enabled for numeric thresholds, a compute shader performs marching squares directly against the aggregation bin buffer and supplies interleaved line coordinates directly toLineLayersublayers, eliminating the CPU readback stage.Additionally refines extension filtering during GPU aggregation.
Layer.getShaders()now accepts an optionalextensionsarray, allowingContourLayerto restrict aggregation compute shaders to input-filtering extensions while applying rendering extensions (such asPathStyleExtension,FillStyleExtension, andMaskExtension) to output geometry without falling back to CPU aggregation.Reviewed by Cursor Bugbot for commit a984986. Bugbot is set up for automated code reviews on this repo. Configure here.