runtime(zones,#804): Metal — MODE_ZONES composite, binary wish, opt-in feather - #811
Open
dfattal wants to merge 1 commit into
Open
runtime(zones,#804): Metal — MODE_ZONES composite, binary wish, opt-in feather#811dfattal wants to merge 1 commit into
dfattal wants to merge 1 commit into
Conversation
…one opt-in feather Metal leg of the #801/#803 backend-parity port (mirrors the VK reference and the D3D11/D3D12 legs, #809/#810): #801: - masked_composite_fragment: alpha_over -> composite_mode (0 hard M-lerp / 1 #491 premul over / 2 MODE_ZONES: final = twod + (1-a)*(M*weave)). - The auto wish CPU raster goes BINARY (memset 255 per zone rect, no 16px distance ramp) - the wish is HARDWARE-only (ADR-027), hard by default (#800). - The composite mask is ALWAYS the binary zone raster; an explicit frame wish stages (replaceRegion of current authored bytes) and routes to the DP publish only - never a compositor blend gate. #803 (XrDisplayZoneFeatherDXR): - New metal_update_zone_feather_mask into its own CPU buffer + texture: per-zone hard (255) or TRUE per-pixel inward distance ramp clamp(dist_inside/radius) - the Metal CPU idiom, smoother profile than the GPU legs' stepped rings - max() across overlapping zones. Dirty-checked on rects + radii + dims; published wish stays binary; raster failure falls back to the binary mask. One-shot "Metal Local2D composite ... (mode=N)" log. Legacy frames byte-identical (zones_frame-gated; LERP/ALPHA_OVER semantics unchanged). Compile check rides the macOS CI (no Metal toolchain on this box); hardware eyeball on the mac box with cube_zones_texture_metal_macos. Refs #800, #801, #803. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Metal leg of #804 (leg 4; legs 1-3 = #808/#809/#810). Mirrors the VK reference (#801/#803) onto
comp_metal_compositor.m.#801
masked_composite_fragment:alpha_over→composite_mode(2 = MODE_ZONES:twod + (1−a)·(M·weave)).#803
metal_update_zone_feather_mask(own CPU buffer + texture): per-zone hard or true per-pixel inward distance rampclamp(dist_inside/radius)— the Metal CPU idiom (smoother profile than the GPU legs' stepped rings), max() across overlapping zones. Published wish stays binary; failure falls back binary.One-shot
Metal Local2D composite … (mode=N)log.Verification
cube_zones_texture_metal_macoson the mac box — expected deltas: hard zone edges unless feather requested; Local2D overlays composite by alpha inside zones. Legacy frames pixel-identical (zones_frame-gated).Refs #800 #801 #803 #804.
🤖 Generated with Claude Code