編輯

共用方式為


MTLDevice_Extensions Class

Definition

Extension methods to the IMTLDevice interface to support all the methods from the MTLDevice protocol.

public static class MTLDevice_Extensions
type MTLDevice_Extensions = class
Inheritance
MTLDevice_Extensions

Remarks

The extension methods for IMTLDevice allow developers to treat instances of the interface as having all the optional methods of the original MTLDevice protocol. Since the interface only contains the required members, these extension methods allow developers to call the optional members of the protocol.

Methods

CreateArgumentEncoder(IMTLDevice, MTLArgumentDescriptor[])

Creates an encoder for the specified array of arguments.

CreateBuffer<T>(IMTLDevice, T[], MTLResourceOptions)

Creates and returns a new buffer with a copy of the specified data.

CreateBufferNoCopy<T>(IMTLDevice, T[], MTLResourceOptions, MTLDeallocator)

Creates and returns a new buffer that is wrapped around the specified data, and runs an optional deallocator when the memory is deallocated.

CreateComputePipelineState(IMTLDevice, MTLComputePipelineDescriptor, MTLPipelineOption, MTLComputePipelineReflection, NSError)

Creates a new pipeline state from the specified compute pipeline descriptor, options, and completion handler, and stores reflection information in the reflectionout parameter.

CreateComputePipelineState(IMTLDevice, MTLComputePipelineDescriptor, MTLPipelineOption, MTLNewComputePipelineStateWithReflectionCompletionHandler)

Creates a new pipeline state from the specified compute pipeline descriptor, options, and completion handler.

CreateEvent(IMTLDevice)
CreateFence(IMTLDevice)

Creates and returns a new fence for tracking and managing dependencies between command encoders.

CreateHeap(IMTLDevice, MTLHeapDescriptor)

Creates and returns a new heap.

CreateIndirectCommandBuffer(IMTLDevice, MTLIndirectCommandBufferDescriptor, nuint, MTLResourceOptions)
CreateLibrary(IMTLDevice, NSBundle, NSError)

Creates and returns a new library from the functions in the specified bundle.

CreateLibrary(IMTLDevice, NSUrl, NSError)

Creates and returns a new library from the functions at the specified URL.

CreateRenderPipelineState(IMTLDevice, MTLTileRenderPipelineDescriptor, MTLPipelineOption, MTLNewRenderPipelineStateWithReflectionCompletionHandler)
CreateRenderPipelineState(IMTLDevice, MTLTileRenderPipelineDescriptor, MTLPipelineOption, MTLRenderPipelineReflection, NSError)
CreateSharedEvent(IMTLDevice, MTLSharedEventHandle)
CreateSharedEvent(IMTLDevice)
CreateSharedTexture(IMTLDevice, MTLSharedTextureHandle)
CreateSharedTexture(IMTLDevice, MTLTextureDescriptor)
CreateTexture(IMTLDevice, MTLTextureDescriptor, IOSurface, nuint)

Creates a Metal texture with the specified values.

GetArgumentBuffersSupport(IMTLDevice)

Returns the argument buffer support tier.

GetCurrentAllocatedSize(IMTLDevice)

Gets the size, in bytes, of all the resources that the device has allocated.

GetDefaultSamplePositions(IMTLDevice, IntPtr, nuint)

Provides the default sample positions for the specified sample count.

GetDefaultSamplePositions(IMTLDevice, MTLSamplePosition[], nuint)

Provides the default sample positions for the specified sample count.

GetDepth24Stencil8PixelFormatSupported(IMTLDevice)
GetHeadless(IMTLDevice)
GetHeapBufferSizeAndAlignWithLength(IMTLDevice, nuint, MTLResourceOptions)
GetHeapTextureSizeAndAlign(IMTLDevice, MTLTextureDescriptor)

Gets the size and alignment of a texture with specified description, when allocated from a heap.

GetLowPower(IMTLDevice)
GetMaxArgumentBufferSamplerCount(IMTLDevice)
GetMaxBufferLength(IMTLDevice)
GetMaxThreadgroupMemoryLength(IMTLDevice)

Gets the largest available length of memory for threadgroups.

GetMaxThreadsPerThreadgroup(IMTLDevice)

Returns the number of threads per threadgroup on the device.

GetMinimumLinearTextureAlignment(IMTLDevice, MTLPixelFormat)

Gets the minimum alignment required for a linear texture in the given pixel format.

GetMinimumTextureBufferAlignment(IMTLDevice, MTLPixelFormat)
GetProgrammableSamplePositionsSupported(IMTLDevice)

Returns a Boolean value that tells whether programmable sample positions are supported.

GetRasterOrderGroupsSupported(IMTLDevice)

Returns a Boolean value that tells whether raster order groups are supported.

GetReadWriteTextureSupport(IMTLDevice)

Gets the texture read-write support tier.

GetRecommendedMaxWorkingSetSize(IMTLDevice)
GetRegistryId(IMTLDevice)

Gets the registry ID.

GetRemovable(IMTLDevice)
SupportsTextureSampleCount(IMTLDevice, nuint)

Returns a Boolean value that tells whether the device supports the specified texture count.

Applies to