Skip to content

Fix Xcode 26 C++ build + iPhone 17 Pro depth visualization corruption#1

Closed
wonmor wants to merge 16 commits into
antonsarg:masterfrom
wonmor:master
Closed

Fix Xcode 26 C++ build + iPhone 17 Pro depth visualization corruption#1
wonmor wants to merge 16 commits into
antonsarg:masterfrom
wonmor:master

Conversation

@wonmor
Copy link
Copy Markdown

@wonmor wonmor commented May 7, 2026

Summary

Two independent fixes that affect anyone shipping a TrueDepth scanning app on current Apple hardware/toolchains:

  1. C++ compat for Xcode 26 + static linking (671a57e) — addresses build failures that show up in Xcode 26 with the modern C++ toolchain, and switches some targets to static linking to play nicer with downstream Swift apps.

  2. iPhone 17 Pro depth visualization corruption (416bcfa) — the depth CVPixelBuffer-backed MTLTexture in DepthColoringFilter._metalTexture(fromDepthBuffer:) was created with MTLTextureUsage.shaderWrite despite the texture being read (it's the source of an MPSImageGaussianBlur, never a destination). The A17 Pro (iPhone 15 Pro Max) silently tolerated the wrong flag, but the A19 GPU on the iPhone 17 Pro enforces it strictly — produces blocky purple/blue artifacts on the depth-coloring overlay during scanning. One-line fix: .shaderWrite.shaderRead.

Test plan

  • Builds cleanly in Xcode 26
  • Depth-coloring overlay renders correctly on iPhone 17 Pro front-facing TrueDepth scan
  • No regression on iPhone 15 Pro Max
  • Verify on iPhone 16 Pro / 14 Pro family (older A-series) — expected unaffected

🤖 Generated with Claude Code

Anton Sarg and others added 16 commits April 19, 2026 16:52
# Conflicts:
#	StandardCyborgFusion/Sources/include/StandardCyborgFusion/SceneKit+Lines.hpp
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>
@wonmor
Copy link
Copy Markdown
Author

wonmor commented May 7, 2026

Closing — wonmor/StandardCyborgCocoa has been rebased onto StandardCyborg/StandardCyborgCocoa upstream. The depth fix is now tracked in StandardCyborg#57 instead.

@wonmor wonmor closed this May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants