Symbols: 58.9% of Apple's iOS API (66 of 112, exact) · Rows: 4: 2 ✅ 1 🟡 1 ❌ · iOS: 9.0+
Area: GPU · Apple: MetalKit · Issues: area:gpu
- Adapted: isim's Swift implementation (
isim/swift/overlays/MetalKit), over isim's Metal, which renders on the CPU (see Metal, #329).import MetalKitre-exports Metal and QuartzCore, as on iOS. MTKView:- It is a
UIViewwhose layer is aCAMetalLayer(see QuartzCore). - A
CADisplayLinkcallsdraw()atpreferredFramesPerSecond, or aftersetNeedsDisplay()whenenableSetNeedsDisplayis set.draw()calls the delegate'sdraw(in:), or a subclass'sdraw(_:). isim's view rendering does not call thatdraw(_:)itself (UIView_isim_skipsDrawRect). currentRenderPassDescriptorclears the current drawable and the view's depth / stencil and multisample textures, which are made at the drawable's size.
- It is a
MTKTextureLoader: decodes images with UIKit (UIImage: PNG, JPEG and the formats isim reads, and asset catalog images by name) into RGBA8 textures:_srgbunlessSRGBis false;- straight alpha;
- optionally flipped by
origin; - mipmaps generated by a blit.
- Objective-C: headers in
isim/sdk-src/Frameworks/MetalKitover the Swift classes.MetalKit.frameworkre-exports the overlay, andisim/frameworks/MetalKit/MetalKit.mholds theMTKTextureLoaderoption constants. - Versus Apple's Simulator: the frames are drawn by the CPU, so a large view at full resolution draws fewer frames
per second. Multisampling holds one sample per pixel (not antialiased). KTX / PVR files,
MDLTexture,MTKMeshand the Model I/O bridges are not provided.
| API / feature | Status | iOS | Notes |
|---|---|---|---|
MTKView (init(frame:device:), delegate, device, colorPixelFormat, depthStencilPixelFormat, sampleCount, clearColor / clearDepth / clearStencil, currentDrawable, currentRenderPassDescriptor, depthStencilTexture, multisampleColorTexture, preferredFramesPerSecond, enableSetNeedsDisplay, isPaused, autoResizeDrawable, drawableSize, preferredDrawableSize, framebufferOnly, draw(), releaseDrawables()) |
✅ | ≤17 | adapted: frames rendered by isim's Metal on the CPU; multisample textures hold one sample per pixel. Tested (HelloMetalKit, test_metalkit) |
MTKViewDelegate (mtkView(_:drawableSizeWillChange:), draw(in:)) |
✅ | ≤17 | Tested (HelloMetalKit, test_metalkit) |
MTKTextureLoader (newTexture(URL:options:), newTexture(data:options:), newTexture(cgImage:options:), newTexture(name:scaleFactor:bundle:options:), the completion-handler and async forms, newTextures(URLs:options:)), MTKTextureLoader.Option (SRGB, generateMipmaps, allocateMipmaps, textureUsage, textureStorageMode, origin) |
🟡 | ≤17 | adapted: images decoded by UIKit into RGBA8 textures; KTX, PVR and MDLTexture are not supported (an error); cubeLayout and loadAsArray are ignored. Tested (HelloMetalKit: a generated image with mipmaps) |
MTKMesh, MTKSubmesh, MTKMeshBufferAllocator, MTKModelIOVertexDescriptorFromMetal |
❌ | ≤17 | need Model I/O, which isim does not have |
46 symbols Apple documents for iOS that isim does not have (exact; Apple snapshot 2026-10-14). Each links to Apple's documentation.
List
MTKMeshinit(mesh: MDLMesh, device: any MTLDevice) throwsvar name: Stringclass func newMeshes(asset: MDLAsset, device: any MTLDevice) throws -> (modelIOMeshes: [MDLMesh], metalKitMeshes: [MTKMesh])var submeshes: [MTKSubmesh]var vertexBuffers: [MTKMeshBuffer]var vertexCount: Intvar vertexDescriptor: MDLVertexDescriptorMTKMeshBuffervar allocator: MTKMeshBufferAllocatorvar buffer: any MTLBuffervar length: Intvar offset: Intvar type: MDLMeshBufferTypefunc zone() -> (any MDLMeshBufferZone)?MTKMeshBufferAllocatorvar device: any MTLDeviceinit(device: any MTLDevice)func MTKMetalVertexDescriptorFromModelIO(MDLVertexDescriptor) -> MTLVertexDescriptor?func MTKMetalVertexDescriptorFromModelIOWithError(MDLVertexDescriptor) throws -> MTLVertexDescriptor?func MTKMetalVertexFormatFromModelIO(MDLVertexFormat) -> MTLVertexFormatMTKModelErrorstatic let domain: MTKModelErrorinit(rawValue: String)static let key: MTKModelErrorfunc MTKModelIOVertexDescriptorFromMetal(MTLVertexDescriptor) -> MDLVertexDescriptorfunc MTKModelIOVertexDescriptorFromMetalWithError(MTLVertexDescriptor) throws -> MDLVertexDescriptorfunc MTKModelIOVertexFormatFromMetal(MTLVertexFormat) -> MDLVertexFormatMTKSubmeshvar indexBuffer: MTKMeshBuffervar indexCount: Intvar indexType: MTLIndexTypevar mesh: MTKMesh?var name: Stringvar primitiveType: MTLPrimitiveTypeMTKTextureLoader.Errorstatic let domain: MTKTextureLoader.Errorinit(rawValue: String)static let key: MTKTextureLoader.Errorfunc newTexture(texture: MDLTexture, options: [MTKTextureLoader.Option : Any]?) throws -> any MTLTexturefunc newTexture(texture: MDLTexture, options: [MTKTextureLoader.Option : Any]?, completionHandler: ((any MTLTexture)?, (any Error)?) -> Void)func newTextures(names: [String], scaleFactor: CGFloat, bundle: Bundle?, options: [MTKTextureLoader.Option : Any]?, completionHandler: ([any MTLTexture], (any Error)?) -> Void)func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]?, completionHandler: ([any MTLTexture], (any Error)?) -> Void)func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]?, error: NSErrorPointer) -> [any MTLTexture]var currentMTL4RenderPassDescriptor: MTL4RenderPassDescriptor?var residencySet: any MTLResidencySet