---
title: "sparseTileSize(textureType:pixelFormat:sampleCount:sparsePageSize:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/sparsetilesize(texturetype:pixelformat:samplecount:sparsepagesize:)"
---

# sparseTileSize(textureType:pixelFormat:sampleCount:sparsePageSize:)

Returns the dimensions of a sparse tile for a texture that has a specific sparse page size.

## Declaration

```swift
func sparseTileSize(textureType: MTLTextureType, pixelFormat: MTLPixelFormat, sampleCount: Int, sparsePageSize: MTLSparsePageSize) -> MTLSize
```

## Parameters

- `textureType`: An doc://com.apple.metal/documentation/Metal/MTLTextureType instance.
- `pixelFormat`: An doc://com.apple.metal/documentation/Metal/MTLPixelFormat instance.
- `sampleCount`: The number of samples for each pixel.
- `sparsePageSize`: An doc://com.apple.metal/documentation/Metal/MTLSparsePageSize instance.

## Return Value

Return Value A new MTLSize instance.

## See Also

### Working with sparse textures

- [sparseTileSize(with:pixelFormat:sampleCount:)](metal/mtldevice/sparsetilesize(with:pixelformat:samplecount:).md)
- [sparseTileSizeInBytes(sparsePageSize:)](metal/mtldevice/sparsetilesizeinbytes(sparsepagesize:).md)
- [sparseTileSizeInBytes](metal/mtldevice/sparsetilesizeinbytes.md)
- [convertSparsePixelRegions(_:toTileRegions:withTileSize:alignmentMode:numRegions:)](metal/mtldevice/convertsparsepixelregions(_:totileregions:withtilesize:alignmentmode:numregions:).md)
- [convertSparseTileRegions(_:toPixelRegions:withTileSize:numRegions:)](metal/mtldevice/convertsparsetileregions(_:topixelregions:withtilesize:numregions:).md)
- [MTLSparsePageSize](metal/mtlsparsepagesize.md)
- [MTLSparseTextureRegionAlignmentMode](metal/mtlsparsetextureregionalignmentmode.md)
