Repository navigation
fix(core): Fp32 array provided to a 64-bit attribute - #10570
Merged
Merged
Conversation
Greptile SummaryThe PR interleaves zero low components for WebGPU Float32-backed 64-bit attributes and propagates the split layout through GPU transition buffers.
Confidence Score: 4/5The PR is not yet safe to merge because WebGPU Float32-backed 64-bit attributes still use an incompatible buffer layout during spring transitions. The fix correctly repairs interpolation transitions, but spring transitions now receive double-width buffers while retaining single-width transform bindings and vertex-count calculations, causing low tuples to be processed as separate vertices. Files Needing Attention: modules/core/src/transitions/gpu-transition-utils.ts and modules/core/src/transitions/gpu-spring-transition.ts
|
| Filename | Overview |
|---|---|
| modules/core/src/lib/attribute/data-column.ts | Centralizes split-buffer detection and applies interleaving consistently to allocation, writes, accessors, and shader attribute bindings. |
| modules/core/src/transitions/gpu-transition-utils.ts | Extends transition sizing and padding to WebGPU Float32-backed fp64 buffers, exposing the spring transform's remaining single-width assumptions. |
| modules/core/src/transitions/gpu-interpolation-transition.ts | Correctly selects the existing fp64 interpolation transform for every interleaved double-precision buffer. |
| modules/core/src/transitions/gpu-transition.ts | Preserves the cloned attribute's interleaved stride when attaching a transition buffer. |
| test/modules/core/transitions/gpu-transition-utils.spec.ts | Verifies cloned and attached transition-buffer layouts but does not exercise an actual spring transform. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Float32-backed fp64 attribute] --> B[Interleaved high/low WebGPU buffer]
B --> C{Transition type}
C -->|Interpolation| D[Double-width layout and adjusted vertex count]
C -->|Spring| E[Double-width sizing and padding]
E --> F[Single-width transform layout]
F --> G[Low tuples processed as separate vertices]
Reviews (3): Last reviewed commit: "address comments" | Re-trigger Greptile
ibgreen-openai
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up of #10567
In WebGL, when a fp32 array is provided to a 64-bit attribute (e.g. instancePositions), the low part is specified as
{value: Float32Array([0, 0, 0]), constant: true}. WebGPU does not allow different strides in the same buffer slot, so one instance's low part ends up being resolved to the next instance's high part. See bug evidence in #10476 (comment)This fix interleaves 0,0,0 with the incoming fp32 value when using WebGPU.
Change List