Skip to content

Remove centers array dependency from GSplatInfo interval check#8568

Merged
mvaligursky merged 1 commit intomainfrom
mv-gsplat-info-remove-centers-dep
Apr 1, 2026
Merged

Remove centers array dependency from GSplatInfo interval check#8568
mvaligursky merged 1 commit intomainfrom
mv-gsplat-info-remove-centers-dep

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

@mvaligursky mvaligursky commented Apr 1, 2026

Remove the only non-CPU-sort access to the centers Float32Array from GSplatInfo, replacing resource.centers?.length / 3 with resource.maxSplats to determine total splat capacity for the active-splat interval check.

Changes:

  • Use resource.maxSplats (already exposed by GSplatContainer) instead of reading the centers array length in GSplatInfo.updateIntervals
  • For GSplatContainer resources, behavior is identical — maxSplats returns the same pre-allocated capacity value
  • For non-container resources, maxSplats is undefined (falsy), so the block is skipped — same as before since activeSplats always equaled the total count

Performance:

  • Removes the last non-CPU-sort dependency on the centers Float32Array, enabling future work to skip allocating this ~114 MB buffer (for 10M splats) when using GPU sort or compute renderers

Use resource.maxSplats instead of resource.centers?.length / 3 to
determine total splat capacity. This removes the only non-CPU-sort
access to the centers Float32Array, allowing it to be skipped for
GPU sort and compute renderers in the future.

Made-with: Cursor
@mvaligursky mvaligursky self-assigned this Apr 1, 2026
@mvaligursky mvaligursky merged commit df6566f into main Apr 1, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-info-remove-centers-dep branch April 1, 2026 11:49
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