Integrate Metal Gaussian GPU execution into renderer - #114
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 previously exposed GPU Gaussian preparation, sorting and gather only through a private test harness. Renderer frames still prepared/sorted particles on the CPU,
preferfell back, andrequirerejected execution. This change connects immutable attribute residency and the completion-safe executor to renderer frame contexts and indirect raster. GPU camera frames perform no CPU particle preparation, prepared-stream upload or warmed GPU allocation.preferandrequire; Metal Tiled falls back to GPU SortedStream inpreferand reports Unsupported inrequire. Capacity failures fall back to CPU inpreferand report the original error inrequire.Impact
Verification
Apple M3, macOS 15.7.9, Apple clang 17, Slang 2026.8. Debug uses the existing macOS 14.5 SDK configuration; Release uses the Xcode 16.4 SDK. Runtime tests ran outside the sandbox with Metal API/GPU validation enabled.
Renderer tests compare RGBA8 within 2 channel units and exact depth/resource/particle IDs through camera motion, resize, mesh composition, edits, visibility, removal/reintroduction and all-rejected frames. Coverage includes range-only uploads, source replacement, unresolved submissions, AOV leases, budget fallback/recovery and post-compute render failure. The install consumer executes the embedded GPU path. CLI budget parsing rejects zero, negative and overflowing values.
At 1,048,576 particles and 1024x768 without image readback, 12-sample camera wall-time medians were 133.5 ms CPU / 29.0 ms GPU. Static medians were 13.4 ms CPU / 28.8 ms GPU because GPU frames still recompute while the CPU path reuses its prepared stream. These are local synthetic measurements, not a universal performance claim; backend construction and source edits are outside the timer. Raw measurements remain local under the report policy.
Interactive checks displayed a local 5,834,784-particle SH-degree-3 Garden stage in both usdview/HgiMetal GPU-copy presentation and the dedicated Metal viewport, using a 3 GiB residency budget. Telemetry confirmed GPU raster, zero CPU preparation and zero steady attribute uploads. usdview also exercised Tiled Prefer fallback. The scene and screenshots are not included, and these checks do not establish general host parity.
Existing SDK-header/deprecation and duplicate-library warnings remain; no new Gaussian-code warning was observed. Vulkan runtime and non-Apple hardware were not exercised locally.
Review checklist