fix(gsplat): tile interval-scatter dispatch over workgroup limit#8841
Merged
Conversation
The interval-compaction scatter pass dispatched one workgroup per visible interval as a 1D dispatch, assuming the interval count stays below the device's max workgroups per dimension (65535). Large GPU-sorted scenes (e.g. many gsplat instances across the full LOD range) exceed that limit and trigger a WebGPU GPUValidationError. Tile the scatter dispatch across X and Y via Compute.calcDispatchSize and reconstruct the linear interval index in the shader from the 2D workgroup id. The existing numIntervals bounds check discards over-dispatched workgroups. Behavior is unchanged for scenes under the limit and for the CPU-sort path.
mvaligursky
added a commit
that referenced
this pull request
Jun 4, 2026
The interval-compaction scatter pass dispatched one workgroup per visible interval as a 1D dispatch, assuming the interval count stays below the device's max workgroups per dimension (65535). Large GPU-sorted scenes (e.g. many gsplat instances across the full LOD range) exceed that limit and trigger a WebGPU GPUValidationError. Tile the scatter dispatch across X and Y via Compute.calcDispatchSize and reconstruct the linear interval index in the shader from the 2D workgroup id. The existing numIntervals bounds check discards over-dispatched workgroups. Behavior is unchanged for scenes under the limit and for the CPU-sort path. Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
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.
Fix a WebGPU GPUValidationError when rendering very large GPU-sorted gsplat scenes.
The interval-compaction "scatter" pass dispatched one workgroup per visible interval as a 1D dispatch, assuming the interval count stays below the device's max workgroups per dimension (65535). Scenes with a high visible-interval count (e.g. many gsplat instances across the full LOD range) exceed that limit and trigger: "Dispatch workgroup count X exceeds max compute workgroups per dimension".
Changes:
Compute.calcDispatchSize, usingdevice.limits.maxComputeWorkgroupsPerDimension. Behavior is unchanged for scenes under the limit (stays a 1D dispatch).wgId.y * numWorkgroups.x + wgId.x); the existingintervalIdx >= numIntervalsbounds check discards over-dispatched workgroups.Only affects the WebGPU GPU-sort path; the WebGL/CPU-sort path is unchanged.