Add immutable Metal Gaussian attribute residency - #112
Merged
Merged
Conversation
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
Metal Gaussian compute tests previously uploaded every source attribute on each frame. Add a backend-private resident attribute store and bind its immutable buffers in the prepare/sort/gather/indirect-raster harness. Static, camera, transform and visibility changes reuse buffers; edits with a matching base revision stage only the affected particle ranges, copying old attribute versions on the GPU before patching them.
Updates publish transactionally after submission. Completion handlers retain staging and previous versions, and a live-byte budget includes unfinished submissions. Source changes, resource generations, revision gaps and count/SH layout changes reconcile safely.
Impact
preferstill falls back andrequirerejects.Verification
Apple M3, macOS 15.7.9, with Metal API and shader validation enabled:
After extending the in-flight budget assertion, the Debug residency test was rebuilt and rerun successfully; the Release full run includes that assertion. Final builds pass in both configurations. Existing SDK warnings remain.
CI runs for this PR:
Review checklist