You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(gpui_apple): cut the cost of a filtered layer on metal - #53
No actionable comments were generated in the recent review.
Summary
This change reduces Metal filtered-layer cost by wiping only each layer's read-back region and compositing closing layers in the parent's pass. It touches metal_renderer.rs and adds a clear_fragment shader to shaders.metal.
Layer targets are cleared only within expanded source bounds. Adjacent effects merge only when their wipe bounds are covered. Layer compositing uses an encoder that remains open for parent drawing. Backdrop composition samples each open layer only within the intersection of its wiped region and the requested clip.
Merge Risk: Minimal · up to 8781a
This change limits the layer-target clears and the backdrop sampling in the Metal renderer to the regions that are actually read, which should reduce the cost of filtered layers. No concrete problems were found, so merge risk is minimal.
Security architecture risk: Minimal · up to 8781a
The optimization does not expand access or privileges. Inspection found no material regression in security, ownership or failure containment.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The supported exposure is the current renderer's image content: its filter pool feeds the displayed frame or feature-gated image capture. The inspected path does not introduce a separate service, tenant or credential authority.
Trust Boundaries and Controls
inferred — The inspected consumers do not establish a path from unwiped texels to visible output. Backdrops restrict reads to the wipe; final composites clamp samples to source bounds; and Gaussian separation limits the consumed source footprint to one kernel radius per axis. Extra horizontal-pass fringe reads are not themselves evidence of disclosure. Nested writes outside a parent's wipe likewise do not establish disclosure without a consumer that reads them.
Resilience and Maintainability Implications
observed — Encoder ownership remains within one command-buffer flow. Both close paths end the child encoder before obtaining the parent encoder, the parent pass loads existing contents, and scoped clear/composite draws restore the full-target scissor before subsequent parent draws.
Warning
Some tools did not complete. Review the errors below.
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
macoschanges the macOS backendrenderingchanges the scene, shaders or a renderer
1 participant
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