{"abstract":[{"text":"Options for sparse texture mapping.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/com.apple.documentation\/documentation\/technologies","doc:\/\/com.apple.metal\/documentation\/Metal"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode"},"kind":"symbol","legalNotices":{"copyright":"Copyright &copy; 2026 Apple Inc. All rights reserved.","privacyPolicy":"https:\/\/www.apple.com\/privacy\/privacy-policy","termsOfUse":"https:\/\/www.apple.com\/legal\/internet-services\/terms\/site.html"},"metadata":{"availableLanguages":["de-DE","en-US","es-419","fr-FR","it-IT","ja-JP","ko-KR","pt-BR","zh-CN"],"externalID":"c:@E@MTLSparseTextureMappingMode","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"MTLSparseTextureMappingMode"}],"modules":[{"name":"Metal"}],"navigatorTitle":[{"kind":"identifier","text":"MTLSparseTextureMappingMode"}],"platforms":[{"introducedAt":"13.0","name":"iOS"},{"introducedAt":"13.0","name":"iPadOS"},{"introducedAt":"14.0","name":"Mac Catalyst"},{"introducedAt":"11.0","name":"macOS"},{"introducedAt":"16.0","name":"tvOS"},{"introducedAt":"1.0","name":"visionOS"}],"role":"symbol","roleHeading":"Enumeration","symbolKind":"enum","title":"MTLSparseTextureMappingMode"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["iOS","iPadOS","Mac Catalyst","macOS","tvOS","visionOS"],"tokens":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"MTLSparseTextureMappingMode"}]}],"kind":"declarations"}],"relationshipsSections":[{"identifiers":["doc:\/\/com.apple.documentation\/documentation\/Swift\/BitwiseCopyable","doc:\/\/com.apple.documentation\/documentation\/Swift\/Equatable","doc:\/\/com.apple.documentation\/documentation\/Swift\/Hashable","doc:\/\/com.apple.documentation\/documentation\/Swift\/RawRepresentable","doc:\/\/com.apple.documentation\/documentation\/Swift\/Sendable","doc:\/\/com.apple.documentation\/documentation\/Swift\/SendableMetatype"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"seeAlsoSections":[{"anchor":"Updating-texture-memory-assignments","generated":true,"identifiers":["doc:\/\/com.apple.metal\/documentation\/Metal\/MTLResourceStateCommandEncoder\/updateTextureMapping(_:mode:region:mipLevel:slice:)","doc:\/\/com.apple.metal\/documentation\/Metal\/MTLResourceStateCommandEncoder\/updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)"],"title":"Updating texture memory assignments"}],"topicSections":[{"anchor":"Specifying-the-mapping-mode","identifiers":["doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode\/map","doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode\/unmap"],"title":"Specifying the mapping mode"},{"anchor":"Initializers","generated":true,"identifiers":["doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode\/init(rawValue:)"],"title":"Initializers"}],"variants":[{"paths":["\/documentation\/metal\/mtlsparsetexturemappingmode"],"traits":[{"interfaceLanguage":"swift"}]},{"paths":["\/documentation\/metal\/mtlsparsetexturemappingmode"],"traits":[{"interfaceLanguage":"occ"}]}],"references":{"doc://com.apple.documentation/documentation/ObjectiveC/NSUInteger":{"abstract":[{"text":"Describes an unsigned integer.","type":"text"}],"fragments":[{"kind":"identifier","text":"NSUInteger"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/ObjectiveC\/NSUInteger","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"NSUInteger"}],"role":"symbol","title":"NSUInteger","type":"topic","url":"\/documentation\/objectivec\/nsuinteger"},"doc://com.apple.documentation/documentation/Swift/BitwiseCopyable":{"abstract":[],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"BitwiseCopyable"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/Swift\/BitwiseCopyable","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"BitwiseCopyable"}],"role":"symbol","title":"BitwiseCopyable","type":"topic","url":"\/documentation\/swift\/bitwisecopyable"},"doc://com.apple.documentation/documentation/Swift/Equatable":{"abstract":[{"text":"A type that can be compared for value equality.","type":"text"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"Equatable"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/Swift\/Equatable","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Equatable"}],"role":"symbol","title":"Equatable","type":"topic","url":"\/documentation\/swift\/equatable"},"doc://com.apple.documentation/documentation/Swift/Hashable":{"abstract":[{"text":"A type that can be hashed into a ","type":"text"},{"code":"Hasher","type":"codeVoice"},{"text":" to produce an integer hash value.","type":"text"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"Hashable"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/Swift\/Hashable","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Hashable"}],"role":"symbol","title":"Hashable","type":"topic","url":"\/documentation\/swift\/hashable"},"doc://com.apple.documentation/documentation/Swift/RawRepresentable":{"abstract":[{"text":"A type that can be converted to and from an associated raw value.","type":"text"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"RawRepresentable"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/Swift\/RawRepresentable","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"RawRepresentable"}],"role":"symbol","title":"RawRepresentable","type":"topic","url":"\/documentation\/swift\/rawrepresentable"},"doc://com.apple.documentation/documentation/Swift/Sendable":{"abstract":[{"text":"A thread-safe type whose values can be shared across arbitrary concurrent","type":"text"},{"text":" ","type":"text"},{"text":"contexts without introducing a risk of data races.","type":"text"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"Sendable"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/Swift\/Sendable","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Sendable"}],"role":"symbol","title":"Sendable","type":"topic","url":"\/documentation\/swift\/sendable"},"doc://com.apple.documentation/documentation/Swift/SendableMetatype":{"abstract":[{"text":"A type whose metatype can be shared across arbitrary isolation domains","type":"text"},{"text":" ","type":"text"},{"text":"without introducing a risk of data races.","type":"text"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SendableMetatype"}],"identifier":"doc:\/\/com.apple.documentation\/documentation\/Swift\/SendableMetatype","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"SendableMetatype"}],"role":"symbol","title":"SendableMetatype","type":"topic","url":"\/documentation\/swift\/sendablemetatype"},"doc://com.apple.documentation/documentation/technologies":{"abstract":[],"identifier":"doc:\/\/com.apple.documentation\/documentation\/technologies","kind":"technologies","role":"overview","title":"Technologies","type":"topic","url":"\/documentation\/technologies"},"doc://com.apple.metal/documentation/Metal":{"abstract":[{"text":"Render advanced 3D graphics and compute data in parallel with graphics processors.","type":"text"}],"identifier":"doc:\/\/com.apple.metal\/documentation\/Metal","kind":"symbol","navigatorTitle":[{"kind":"text","text":"Metal"}],"role":"collection","title":"Metal","type":"topic","url":"\/documentation\/metal"},"doc://com.apple.metal/documentation/Metal/MTLResourceStateCommandEncoder/updateTextureMapping(_:mode:region:mipLevel:slice:)":{"abstract":[{"text":"Encodes a command to update the texture mappings for a region in a single texture mipmap.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"updateTextureMapping"},{"kind":"text","text":"(any "},{"kind":"typeIdentifier","preciseIdentifier":"c:objc(pl)MTLTexture","text":"MTLTexture"},{"kind":"text","text":", "},{"kind":"externalParam","text":"mode"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"c:@E@MTLSparseTextureMappingMode","text":"MTLSparseTextureMappingMode"},{"kind":"text","text":", "},{"kind":"externalParam","text":"region"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"c:@SA@MTLRegion","text":"MTLRegion"},{"kind":"text","text":", "},{"kind":"externalParam","text":"mipLevel"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Si","text":"Int"},{"kind":"text","text":", "},{"kind":"externalParam","text":"slice"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Si","text":"Int"},{"kind":"text","text":")"}],"identifier":"doc:\/\/com.apple.metal\/documentation\/Metal\/MTLResourceStateCommandEncoder\/updateTextureMapping(_:mode:region:mipLevel:slice:)","kind":"symbol","navigatorTitle":[{"kind":"text","text":"- "},{"kind":"identifier","text":"updateTextureMapping:mode:region:mipLevel:slice:"}],"role":"symbol","title":"updateTextureMapping(_:mode:region:mipLevel:slice:)","type":"topic","url":"\/documentation\/metal\/mtlresourcestatecommandencoder\/updatetexturemapping(_:mode:region:miplevel:slice:)"},"doc://com.apple.metal/documentation/Metal/MTLResourceStateCommandEncoder/updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)":{"abstract":[{"text":"Encodes a command to update memory mappings for multiple regions inside a texture.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"updateTextureMappings"},{"kind":"text","text":"(any "},{"kind":"typeIdentifier","preciseIdentifier":"c:objc(pl)MTLTexture","text":"MTLTexture"},{"kind":"text","text":", "},{"kind":"externalParam","text":"mode"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"c:@E@MTLSparseTextureMappingMode","text":"MTLSparseTextureMappingMode"},{"kind":"text","text":", "},{"kind":"externalParam","text":"regions"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SP","text":"UnsafePointer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"c:@SA@MTLRegion","text":"MTLRegion"},{"kind":"text","text":">, "},{"kind":"externalParam","text":"mipLevels"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SP","text":"UnsafePointer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:Si","text":"Int"},{"kind":"text","text":">, "},{"kind":"externalParam","text":"slices"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SP","text":"UnsafePointer"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:Si","text":"Int"},{"kind":"text","text":">, "},{"kind":"externalParam","text":"numRegions"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Si","text":"Int"},{"kind":"text","text":")"}],"identifier":"doc:\/\/com.apple.metal\/documentation\/Metal\/MTLResourceStateCommandEncoder\/updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)","kind":"symbol","navigatorTitle":[{"kind":"text","text":"- "},{"kind":"identifier","text":"updateTextureMappings:mode:regions:mipLevels:slices:numRegions:"}],"role":"symbol","title":"updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)","type":"topic","url":"\/documentation\/metal\/mtlresourcestatecommandencoder\/updatetexturemappings(_:mode:regions:miplevels:slices:numregions:)"},"doc://com.apple.metal/documentation/Metal/MTLSparseTextureMappingMode":{"abstract":[{"text":"Options for sparse texture mapping.","type":"text"}],"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"MTLSparseTextureMappingMode"}],"identifier":"doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"MTLSparseTextureMappingMode"}],"role":"symbol","title":"MTLSparseTextureMappingMode","type":"topic","url":"\/documentation\/metal\/mtlsparsetexturemappingmode"},"doc://com.apple.metal/documentation/Metal/MTLSparseTextureMappingMode/init(rawValue:)":{"abstract":[],"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"?("},{"kind":"externalParam","text":"rawValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Su","text":"UInt"},{"kind":"text","text":")"}],"identifier":"doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode\/init(rawValue:)","kind":"symbol","role":"symbol","title":"init(rawValue:)","type":"topic","url":"\/documentation\/metal\/mtlsparsetexturemappingmode\/init(rawvalue:)"},"doc://com.apple.metal/documentation/Metal/MTLSparseTextureMappingMode/map":{"abstract":[{"text":"A request to map sparse tiles from the heap to a region in the texture.","type":"text"}],"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"map"}],"identifier":"doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode\/map","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"MTLSparseTextureMappingModeMap"}],"role":"symbol","title":"MTLSparseTextureMappingMode.map","type":"topic","url":"\/documentation\/metal\/mtlsparsetexturemappingmode\/map"},"doc://com.apple.metal/documentation/Metal/MTLSparseTextureMappingMode/unmap":{"abstract":[{"text":"A request to remove any mappings for a region in the texture.","type":"text"}],"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"unmap"}],"identifier":"doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode\/unmap","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"MTLSparseTextureMappingModeUnmap"}],"role":"symbol","title":"MTLSparseTextureMappingMode.unmap","type":"topic","url":"\/documentation\/metal\/mtlsparsetexturemappingmode\/unmap"}},"variantOverrides":[{"patch":[{"op":"replace","path":"\/identifier\/interfaceLanguage","value":"occ"},{"op":"replace","path":"\/metadata\/platforms","value":[{"introducedAt":"13.0","name":"iOS"},{"introducedAt":"13.0","name":"iPadOS"},{"introducedAt":"14.0","name":"Mac Catalyst"},{"introducedAt":"11.0","name":"macOS"},{"introducedAt":"16.0","name":"tvOS"},{"introducedAt":"1.0","name":"visionOS"}]},{"op":"replace","path":"\/metadata\/roleHeading","value":"Enumeration"},{"op":"replace","path":"\/metadata\/title","value":"MTLSparseTextureMappingMode"},{"op":"replace","path":"\/metadata\/symbolKind","value":"enum"},{"op":"replace","path":"\/metadata\/fragments","value":[{"kind":"identifier","text":"MTLSparseTextureMappingMode"}]},{"op":"replace","path":"\/metadata\/navigatorTitle","value":[{"kind":"identifier","text":"MTLSparseTextureMappingMode"}]},{"op":"replace","path":"\/hierarchy","value":{"paths":[["doc:\/\/com.apple.documentation\/documentation\/technologies","doc:\/\/com.apple.metal\/documentation\/Metal"]]}},{"op":"replace","path":"\/topicSections","value":[{"anchor":"Specifying-the-mapping-mode","identifiers":["doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode\/map","doc:\/\/com.apple.metal\/documentation\/Metal\/MTLSparseTextureMappingMode\/unmap"],"title":"Specifying the mapping mode"}]},{"op":"replace","path":"\/relationshipsSections","value":null},{"op":"replace","path":"\/seeAlsoSections","value":[{"anchor":"Updating-texture-memory-assignments","generated":true,"identifiers":["doc:\/\/com.apple.metal\/documentation\/Metal\/MTLResourceStateCommandEncoder\/updateTextureMapping(_:mode:region:mipLevel:slice:)","doc:\/\/com.apple.metal\/documentation\/Metal\/MTLResourceStateCommandEncoder\/updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)"],"title":"Updating texture memory assignments"}]},{"op":"replace","path":"\/primaryContentSections\/0","value":{"declarations":[{"languages":["occ"],"platforms":["iOS","iPadOS","Mac Catalyst","macOS","tvOS","visionOS"],"tokens":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"MTLSparseTextureMappingMode"},{"kind":"text","text":" : "},{"identifier":"doc:\/\/com.apple.documentation\/documentation\/ObjectiveC\/NSUInteger","kind":"typeIdentifier","preciseIdentifier":"c:@T@NSUInteger","text":"NSUInteger"},{"kind":"text","text":";"}]}],"kind":"declarations"}},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLResourceStateCommandEncoder~1updateTextureMapping(_:mode:region:mipLevel:slice:)\/title","value":"updateTextureMapping:mode:region:mipLevel:slice:"},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLResourceStateCommandEncoder~1updateTextureMapping(_:mode:region:mipLevel:slice:)\/fragments","value":[{"kind":"text","text":"- "},{"kind":"identifier","text":"updateTextureMapping:mode:region:mipLevel:slice:"}]},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLResourceStateCommandEncoder~1updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)\/title","value":"updateTextureMappings:mode:regions:mipLevels:slices:numRegions:"},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLResourceStateCommandEncoder~1updateTextureMappings(_:mode:regions:mipLevels:slices:numRegions:)\/fragments","value":[{"kind":"text","text":"- "},{"kind":"identifier","text":"updateTextureMappings:mode:regions:mipLevels:slices:numRegions:"}]},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLSparseTextureMappingMode\/title","value":"MTLSparseTextureMappingMode"},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLSparseTextureMappingMode\/fragments","value":[{"kind":"identifier","text":"MTLSparseTextureMappingMode"}]},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLSparseTextureMappingMode\/navigatorTitle","value":[{"kind":"identifier","text":"MTLSparseTextureMappingMode"}]},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLSparseTextureMappingMode~1map\/title","value":"MTLSparseTextureMappingModeMap"},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLSparseTextureMappingMode~1map\/fragments","value":[{"kind":"identifier","text":"MTLSparseTextureMappingModeMap"}]},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLSparseTextureMappingMode~1unmap\/title","value":"MTLSparseTextureMappingModeUnmap"},{"op":"replace","path":"\/references\/doc:~1~1com.apple.metal~1documentation~1Metal~1MTLSparseTextureMappingMode~1unmap\/fragments","value":[{"kind":"identifier","text":"MTLSparseTextureMappingModeUnmap"}]}],"traits":[{"interfaceLanguage":"occ"}]}]}