presenting-metal-drawables
Installation
SKILL.md
Metal 4 Presentation & Frame Pacing
Overview
Metal 4 splits the cmd-buffer-level [cmd presentDrawable:] into a queue-level sequence: [queue waitForDrawable:] before commit, [queue signalDrawable:] after commit, and [drawable present]. The conceptual flow — acquire drawable, encode, present, submit — is unchanged; only the API surface is more explicit. MTL4CommandBuffer does not expose presentDrawable:, so any code path using MTL4CommandQueue must use the queue-level form. Code paths still using the Metal 3 MTLCommandQueue keep [cmd presentDrawable:] and remain correct in a Metal 4 app.
Ownership
Owns:
- Drawable lifecycle (
nextDrawable,waitForDrawable,signalDrawable,present) CAMetalLayerconfiguration and properties- Vsync semantics (
displaySyncEnabled,presentAfterMinimumDuration:) CAMetalDisplayLinkAPI basics; variable refresh rate detection- HDR/EDR layer configuration; pixel format ↔ colorspace pairing
- Direct-to-display vs composited presentation rules
- Drawable residency set (the layer-owned read-only
residencySet) - Apply-after-present rule