Repository navigation
feat(layers): use typed GPU attributes in ScatterplotLayer - #10882
Conversation
Codex Review SummaryThis 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: 01009fbbdf
ℹ️ 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 PR appears safe to merge; the earlier build-breaking damage is fixed. SummaryAdds borrowed typed GPU attributes and makes
No new actionable issues were found in the changes since the previous review.
|
Background
Attributes currently expose buffers and raw constants separately. Introduce typed GPU outputs and migrate
ScatterplotLayeras the first consumer, borrowing buffers without copying or transferring ownership.Change List
Attribute.getGPUVector()andAttributeManager.getGPUVectors()GPUVectorModelunderlib/luma-upstreamCI passes: coverage, WebGPU, website, and Python. Local lint, core types, new regressions, and WebGPU Scatterplot renders pass.
Note
Medium Risk
Changes core attribute-to-GPU binding and adds a parallel model path used by ScatterplotLayer; buffer borrowing and WebGPU constant-buffer splitting increase the chance of subtle rendering or lifetime bugs, though legacy layers keep the existing binding flow.
Overview
Introduces borrowed
GPUVector/GPUConstantviews from attributes viaAttribute.getGPUVector()andAttributeManager.getGPUVectors(), including transition overrides and fp64 / normalized-constant layout details. Constant handling is refactored so raw vertex-format bytes stay available for WebGPU buffer grouping while shader-facing values stay in sync.ScatterplotLayer is the first layer on the new path: it builds a
GPUVectorModelinstead ofModel, andLayerroutes attribute updates through typed columns plus existing packed buffer groups (with separate WebGPU bindings when vectors and constants mix in one layout). InternalGPUVectorModeluploads WebGPU-only constant vertex buffers and cleans them up on layout changes.Docs, unit/integration tests, and a scatterplot render case with strided external position buffers cover lifetimes, grouping, and regressions. Supplying GPU vectors via
data.attributesis explicitly out of scope for this integration.Reviewed by Cursor Bugbot for commit dc6d5d0. Bugbot is set up for automated code reviews on this repo. Configure here.