One Logo Pool Ball
MetalPerformanceShaders · IOS API REFERENCE

MPSState

class · iOS 11.0+ · SDK 27.1

class MPSState

Members (23)

static · iOS 11.0+

temporaryState

TypeScript
static temporaryStateWith(cmdBuf: SDKHandle): MPSState
Swift declaration
class func temporaryState(with cmdBuf: any MTLCommandBuffer) -> Self
static · iOS 11.0+

temporaryState

TypeScript
static temporaryStateWithBufferSize(cmdBuf: SDKHandle, bufferSize: number): MPSState
Swift declaration
class func temporaryState(with cmdBuf: any MTLCommandBuffer, bufferSize: Int) -> Self
static · iOS 11.3+

temporaryState

TypeScript
static temporaryStateWithResourceList(commandBuffer: SDKHandle, resourceList: MPSStateResourceList): MPSState
Swift declaration
class func temporaryState(with commandBuffer: any MTLCommandBuffer, resourceList: MPSStateResourceList) -> Self
static · iOS 11.0+

temporaryState

TypeScript
static temporaryStateWithTextureDescriptor(cmdBuf: SDKHandle, descriptor: _Metal_MTLTextureDescriptor): MPSState
Swift declaration
class func temporaryState(with cmdBuf: any MTLCommandBuffer, textureDescriptor descriptor: MTLTextureDescriptor) -> Self
method · iOS 11.0+

bufferSize

TypeScript
bufferSize(index: number): number
Swift declaration
func bufferSize(at index: Int) -> Int
method · iOS 11.0+

destinationImageDescriptor

TypeScript
destinationImageDescriptor(sourceImages: Array<MPSImage>, sourceStates: (Array<MPSState>) | null, kernel: MPSKernel, inDescriptor: MPSImageDescriptor): MPSImageDescriptor
Swift declaration
func destinationImageDescriptor(forSourceImages sourceImages: [MPSImage], sourceStates: [MPSState]?, for kernel: MPSKernel, suggestedDescriptor inDescriptor: MPSImageDescriptor) -> MPSImageDescriptor
init · iOS 11.0+

init

TypeScript
static initDeviceBufferSize(device: SDKHandle, bufferSize: number): MPSState
Swift declaration
init(device: any MTLDevice, bufferSize: Int)
init · iOS 11.3+

init

TypeScript
static initDeviceResourceList(device: SDKHandle, resourceList: MPSStateResourceList): MPSState
Swift declaration
init(device: any MTLDevice, resourceList: MPSStateResourceList)
init · iOS 11.0+

init

TypeScript
static initDeviceTextureDescriptor(device: SDKHandle, descriptor: _Metal_MTLTextureDescriptor): MPSState
Swift declaration
init(device: any MTLDevice, textureDescriptor descriptor: MTLTextureDescriptor)
init · iOS 11.0+

init

TypeScript
static initResource(resource?: (SDKHandle) | null): MPSState
Swift declaration
init(resource: (any MTLResource)?)
init · iOS 11.0+

init

TypeScript
static initResources(resources?: (Array<SDKHandle>) | null): MPSState
Swift declaration
init(resources: [any MTLResource]?)
method · iOS 11.0+

resource

TypeScript
resourceAtAllocateMemory(index: number, allocateMemory: boolean): (SDKHandle) | null
Swift declaration
func resource(at index: Int, allocateMemory: Bool) -> (any MTLResource)?
method · iOS 11.3+

resourceSize

TypeScript
resourceSize(): number
Swift declaration
func resourceSize() -> Int
method · iOS 11.0+

resourceType

TypeScript
resourceType(index: number): MPSStateResourceType
Swift declaration
func resourceType(at index: Int) -> MPSStateResourceType
method · iOS 11.3+

synchronize

TypeScript
synchronize(commandBuffer: SDKHandle): void
Swift declaration
func synchronize(on commandBuffer: any MTLCommandBuffer)
method · iOS 11.0+

textureInfo

TypeScript
textureInfo(index: number): MPSStateTextureInfo
Swift declaration
func textureInfo(at index: Int) -> MPSStateTextureInfo
get · iOS 11.0+

isTemporary

TypeScript
get isTemporary(): boolean
Swift declaration
var isTemporary: Bool { get }
get · iOS 11.0+

label

TypeScript
get label(): (string) | null
Swift declaration
var label: String? { get set }
set · iOS 11.0+

label

TypeScript
set label(value: (string) | null)
Swift declaration
var label: String? { get set }
get · iOS 11.0+

readCount

TypeScript
get readCount(): number
Swift declaration
var readCount: Int { get set }
set · iOS 11.0+

readCount

TypeScript
set readCount(value: number)
Swift declaration
var readCount: Int { get set }
get · iOS 11.0+ · Deprecated in iOS 12.0

resource

TypeScript
get resource(): (SDKHandle) | null
Swift declaration
var resource: (any MTLResource)? { get }
get · iOS 11.0+

resourceCount

TypeScript
get resourceCount(): number
Swift declaration
var resourceCount: Int { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

MPSState.init()

inherited init: cannot prove legal (class declares 5 custom initializers)

All MetalPerformanceShaders types →