fix(radix-sort): OneSweep on NVIDIA, indirect bind fix, GSplat bit alignment#8657
Merged
Conversation
…ignment Select OneSweep under RADIX_SORT_AUTO when subgroup min size allows 32-lane ballots; fix shared BindStorageBufferFormat slot corruption in indirect OneSweep; align GSplat GPU sort key bits to gpuSorter.radixBits; update the indirect radix sort example for multi-slot prepareIndirect.
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.
Summary
Improves automatic OneSweep selection on NVIDIA WebGPU, fixes indirect OneSweep bind group creation, aligns GSplat GPU radix sort key bit counts with the active sorter radix width, and updates the indirect radix sort example so it matches production
prepareIndirect/ multi-slot behaviour.Changes
compute-radix-sort.js:_canUseOneSweepno longer rejects NVIDIA when the adapter reports a highmaxSubgroupSize(D3D12 ceiling) or omits subgroup size (minSubgroupSize0). Only refuses whenminSubgroupSize > 32, which would break 32-bit subgroup ballot masks in the binning shader. ClarifiedDebug.warnOncefor explicitRADIX_SORT_ONESWEEPon non-validated hardware.compute-radix-sort-onesweep.js: Constructor assert aligned with the sameminSubgroupSizepolicy. Indirect bind groups: use three separateBindStorageBufferFormat('b_sortElementCount')instances soBindGroupFormatslot assignment is not overwritten across histogram / scan / binning layouts (fixes WebGPUbinding index 7 not presentvalidation errors).gsplat-manager.js: InsortGpu, roundnumBitswithgpuSorter.radixBitsinstead of hardcoded 4 so OneSweep receives a multiple of 8. JSDoc fordispatchGpuSortupdated accordingly.radix-sort-indirect-compute.example.mjs:ComputeRadixSortconstructed with{ indirect: true }; prepare pass usesprepareIndirect()metadata, reservesslotCountdispatch slots, and writes per-slot workgroup counts with correct granularities; UI bit options filtered byradixSort.radixBits.Testing
radix-sort-indirect-computeexample — no bind validation errors, no device hang.Public API
None.