Instance Method

convertSparsePixelRegions(_:toTileRegions:withTileSize:alignmentMode:numRegions:)

Converts a list of regions, specified in pixel coordinates, to sparse tile units.

Declaration

optional func convertSparsePixelRegions(_ pixelRegions: UnsafePointer<MTLRegion>, toTileRegions tileRegions: UnsafeMutablePointer<MTLRegion>, withTileSize tileSize: MTLSize, alignmentMode mode: MTLSparseTextureRegionAlignmentMode, numRegions: Int)

Parameters

pixelRegions

An array of pixel regions to convert.

tileRegions

The location to write the results to.

tileSize

The size, in pixels, of a sparse tile.

alignmentMode

The alignment mode to use.

numRegions

The number of regions to convert.

See Also

Converting Between Pixel Regions and Sparse Tile Regions

enum MTLSparseTextureRegionAlignmentMode

Options used when converting between a pixel-based region within a texture to a tile-based region.