Contents

optimizeContentsForCPUAccess(texture:slice:level:)

Encodes a command that improves the performance of CPU memory operations with a specific portion of a texture.

Declaration

func optimizeContentsForCPUAccess(texture: any MTLTexture, slice: Int, level: Int)

Parameters

  • texture:

    A texture the command optimizes.

  • slice:

    A slice within texture.

  • level:

    A mipmap level within texture.

Mentioned in

Discussion

This command can reduce the time it takes the CPU to access a texture. Apps typically run the command for:

When a blit pass runs this command, the GPU only applies lossless changes to the texture’s underlying data.

See Also

Optimizing textures for CPU access