Fix Xcode 26 C++ build + iPhone 17 Pro depth visualization corruption#57
Open
wonmor wants to merge 1 commit intoStandardCyborg:masterfrom
Open
Fix Xcode 26 C++ build + iPhone 17 Pro depth visualization corruption#57wonmor wants to merge 1 commit intoStandardCyborg:masterfrom
wonmor wants to merge 1 commit intoStandardCyborg:masterfrom
Conversation
Depth CVPixelBuffer-backed Metal texture was created with MTLTextureUsage.shaderWrite but is actually used as the source of an MPSImageGaussianBlur (read-only). The A19 GPU on iPhone 17 Pro enforces this strictly, producing blocky purple/blue artifacts on the depth-coloring overlay; the A17 Pro silently tolerated the wrong flag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
Collaborator
|
Thanks for the fix! I don’t see your first commit in here, does the build work for you without it? |
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
Two independent fixes that affect anyone shipping a TrueDepth scanning app on current Apple hardware/toolchains:
C++ compat for Xcode 26 + static linking (671a57e) — addresses build failures in Xcode 26 with the modern C++ toolchain, and switches some targets to static linking to play nicer with downstream Swift apps.
iPhone 17 Pro depth visualization corruption (416bcfa) — the depth
CVPixelBuffer-backedMTLTextureinDepthColoringFilter._metalTexture(fromDepthBuffer:)was created withMTLTextureUsage.shaderWrite, but the texture is read (it's the source of anMPSImageGaussianBlur, never a destination). The A17 Pro (iPhone 15 Pro Max) silently tolerated the wrong flag; the A19 GPU on iPhone 17 Pro enforces it strictly and produces blocky purple/blue artifacts on the depth-coloring overlay during scanning. One-line fix:.shaderWrite→.shaderRead.Test plan
🤖 Generated with Claude Code