public interface MTLDevice
MTLDevice represents a processor capable of data parallel computations
| Modifier and Type | Interface and Description |
|---|---|
static interface |
MTLDevice.Block_newBufferWithBytesNoCopyLengthOptionsDeallocator |
static interface |
MTLDevice.Block_newComputePipelineStateWithDescriptorOptionsCompletionHandler |
static interface |
MTLDevice.Block_newComputePipelineStateWithFunctionCompletionHandler |
static interface |
MTLDevice.Block_newComputePipelineStateWithFunctionOptionsCompletionHandler |
static interface |
MTLDevice.Block_newLibraryWithSourceOptionsCompletionHandler |
static interface |
MTLDevice.Block_newLibraryWithStitchedDescriptorCompletionHandler |
static interface |
MTLDevice.Block_newRenderPipelineStateWithDescriptorCompletionHandler |
static interface |
MTLDevice.Block_newRenderPipelineStateWithDescriptorOptionsCompletionHandler |
static interface |
MTLDevice.Block_newRenderPipelineStateWithTileDescriptorOptionsCompletionHandler |
| Modifier and Type | Method and Description |
|---|---|
MTLAccelerationStructureSizes |
accelerationStructureSizesWithDescriptor(MTLAccelerationStructureDescriptor descriptor) |
boolean |
areBarycentricCoordsSupported()
[@property] barycentricsSupported
|
boolean |
areProgrammableSamplePositionsSupported()
[@property] programmableSaplePositionsSupported
|
boolean |
areRasterOrderGroupsSupported()
[@property] rasterOrderGroupsSupported
|
long |
argumentBuffersSupport()
[@property] argumentBuffersSupport
|
default void |
convertSparsePixelRegionsToTileRegionsWithTileSizeAlignmentModeNumRegions(MTLRegion pixelRegions,
MTLRegion tileRegions,
MTLSize tileSize,
long mode,
long numRegions)
* @method convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:
* @abstract Converts regions in pixels to regions in sparse tiles using specified alignment mode.
|
default void |
convertSparseTileRegionsToPixelRegionsWithTileSizeNumRegions(MTLRegion tileRegions,
MTLRegion pixelRegions,
MTLSize tileSize,
long numRegions)
* @method convertSparseTileRegions:toPixelRegions:withTileSize:numRegions:
* @abstract Convertes region in sparse tiles to region in pixels
Tile size can be obtained from tileSizeWithTextureType:pixelFormat:sampleCount: method.
|
NSArray<?> |
counterSets()
[@property] counterSets
|
long |
currentAllocatedSize()
[@property] currentAllocatedSize
|
void |
getDefaultSamplePositionsCount(MTLSamplePosition positions,
long count)
getDefaultSamplePositions:count:
|
boolean |
hasUnifiedMemory()
[@property] hasUnifiedMemory
|
MTLSizeAndAlign |
heapBufferSizeAndAlignWithLengthOptions(long length,
long options)
heapBufferSizeAndAlignWithLength:options:
|
MTLSizeAndAlign |
heapTextureSizeAndAlignWithDescriptor(MTLTextureDescriptor desc)
heapTextureSizeAndAlignWithDescriptor:
|
long |
maxArgumentBufferSamplerCount()
[@property] maxArgumentBufferSamplerCount
|
long |
maxBufferLength() |
long |
maxThreadgroupMemoryLength()
[@property] maxThreadgroupMemoryLength
|
MTLSize |
maxThreadsPerThreadgroup()
[@property] maxThreadsPerThreadgroup
|
long |
minimumLinearTextureAlignmentForPixelFormat(long format)
minimumLinearTextureAlignmentForPixelFormat:
|
long |
minimumTextureBufferAlignmentForPixelFormat(long format)
minimumTextureBufferAlignmentForPixelFormat:
|
java.lang.String |
name()
[@property] name
|
MTLAccelerationStructure |
newAccelerationStructureWithDescriptor(MTLAccelerationStructureDescriptor descriptor) |
MTLAccelerationStructure |
newAccelerationStructureWithSize(long size) |
MTLArgumentEncoder |
newArgumentEncoderWithArguments(NSArray<? extends MTLArgumentDescriptor> arguments)
newArgumentEncoderWithArguments:count:
|
MTLBinaryArchive |
newBinaryArchiveWithDescriptorError(MTLBinaryArchiveDescriptor descriptor,
org.moe.natj.general.ptr.Ptr<NSError> error)
newBinaryArchiveWithDescriptor:error:
|
MTLBuffer |
newBufferWithBytesLengthOptions(org.moe.natj.general.ptr.ConstVoidPtr pointer,
long length,
long options)
newBufferWithBytes:length:options:
|
MTLBuffer |
newBufferWithBytesNoCopyLengthOptionsDeallocator(org.moe.natj.general.ptr.VoidPtr pointer,
long length,
long options,
MTLDevice.Block_newBufferWithBytesNoCopyLengthOptionsDeallocator deallocator)
newBufferWithBytesNoCopy:length:options:deallocator:
|
MTLBuffer |
newBufferWithLengthOptions(long length,
long options)
newBufferWithLength:options:
|
MTLCommandQueue |
newCommandQueue()
newCommandQueue
|
MTLCommandQueue |
newCommandQueueWithMaxCommandBufferCount(long maxCommandBufferCount)
newCommandQueueWithMaxCommandBufferCount
|
void |
newComputePipelineStateWithDescriptorOptionsCompletionHandler(MTLComputePipelineDescriptor descriptor,
long options,
MTLDevice.Block_newComputePipelineStateWithDescriptorOptionsCompletionHandler completionHandler)
newComputePipelineStateWithDescriptor:options:completionHandler:
|
MTLComputePipelineState |
newComputePipelineStateWithDescriptorOptionsReflectionError(MTLComputePipelineDescriptor descriptor,
long options,
org.moe.natj.general.ptr.Ptr<MTLComputePipelineReflection> reflection,
org.moe.natj.general.ptr.Ptr<NSError> error)
newComputePipelineStateWithDescriptor:options:reflection:error:
|
void |
newComputePipelineStateWithFunctionCompletionHandler(MTLFunction computeFunction,
MTLDevice.Block_newComputePipelineStateWithFunctionCompletionHandler completionHandler)
newComputePipelineStateWithDescriptor:completionHandler:
|
MTLComputePipelineState |
newComputePipelineStateWithFunctionError(MTLFunction computeFunction,
org.moe.natj.general.ptr.Ptr<NSError> error)
newComputePipelineStateWithDescriptor:error:
|
void |
newComputePipelineStateWithFunctionOptionsCompletionHandler(MTLFunction computeFunction,
long options,
MTLDevice.Block_newComputePipelineStateWithFunctionOptionsCompletionHandler completionHandler)
newComputePipelineStateWithDescriptor:options:completionHandler:
|
MTLComputePipelineState |
newComputePipelineStateWithFunctionOptionsReflectionError(MTLFunction computeFunction,
long options,
org.moe.natj.general.ptr.Ptr<MTLComputePipelineReflection> reflection,
org.moe.natj.general.ptr.Ptr<NSError> error)
newComputePipelineStateWithDescriptor:options:reflection:error:
|
MTLCounterSampleBuffer |
newCounterSampleBufferWithDescriptorError(MTLCounterSampleBufferDescriptor descriptor,
org.moe.natj.general.ptr.Ptr<NSError> error)
newCounterSampleBufferWithDescriptor:error:
|
MTLLibrary |
newDefaultLibrary()
newDefaultLibrary
|
MTLLibrary |
newDefaultLibraryWithBundleError(NSBundle bundle,
org.moe.natj.general.ptr.Ptr<NSError> error)
newDefaultLibraryWithBundle:error:
|
MTLDepthStencilState |
newDepthStencilStateWithDescriptor(MTLDepthStencilDescriptor descriptor)
newDepthStencilStateWithDescriptor:
|
MTLDynamicLibrary |
newDynamicLibraryError(MTLLibrary library,
org.moe.natj.general.ptr.Ptr<NSError> error)
newDynamicLibrary:error:
|
MTLDynamicLibrary |
newDynamicLibraryWithURLError(NSURL url,
org.moe.natj.general.ptr.Ptr<NSError> error)
newDynamicLibraryWithURL:error:
|
MTLEvent |
newEvent()
newEvent
|
MTLFence |
newFence()
newFence
|
MTLHeap |
newHeapWithDescriptor(MTLHeapDescriptor descriptor)
newHeapWithDescriptor:
|
MTLIndirectCommandBuffer |
newIndirectCommandBufferWithDescriptorMaxCommandCountOptions(MTLIndirectCommandBufferDescriptor descriptor,
long maxCount,
long options)
newIndirectCommandBufferWithDescriptor:maxCommandCount:options
|
MTLLibrary |
newLibraryWithDataError(NSObject data,
org.moe.natj.general.ptr.Ptr<NSError> error)
newLibraryWithData:
|
MTLLibrary |
newLibraryWithFileError(java.lang.String filepath,
org.moe.natj.general.ptr.Ptr<NSError> error)
newLibraryWithFile:
|
void |
newLibraryWithSourceOptionsCompletionHandler(java.lang.String source,
MTLCompileOptions options,
MTLDevice.Block_newLibraryWithSourceOptionsCompletionHandler completionHandler)
newLibraryWithSource:options:completionHandler:
|
MTLLibrary |
newLibraryWithSourceOptionsError(java.lang.String source,
MTLCompileOptions options,
org.moe.natj.general.ptr.Ptr<NSError> error)
newLibraryWithSource:options:error:
|
void |
newLibraryWithStitchedDescriptorCompletionHandler(MTLStitchedLibraryDescriptor descriptor,
MTLDevice.Block_newLibraryWithStitchedDescriptorCompletionHandler completionHandler)
newLibraryWithStitchedDescriptor:completionHandler:
|
MTLLibrary |
newLibraryWithStitchedDescriptorError(MTLStitchedLibraryDescriptor descriptor,
org.moe.natj.general.ptr.Ptr<NSError> error)
newLibraryWithStitchedDescriptor:error:
|
MTLLibrary |
newLibraryWithURLError(NSURL url,
org.moe.natj.general.ptr.Ptr<NSError> error)
newLibraryWithURL:
|
MTLRasterizationRateMap |
newRasterizationRateMapWithDescriptor(MTLRasterizationRateMapDescriptor descriptor)
newRasterizationRateMapWithDescriptor:
|
void |
newRenderPipelineStateWithDescriptorCompletionHandler(MTLRenderPipelineDescriptor descriptor,
MTLDevice.Block_newRenderPipelineStateWithDescriptorCompletionHandler completionHandler)
newRenderPipelineState:completionHandler:
|
MTLRenderPipelineState |
newRenderPipelineStateWithDescriptorError(MTLRenderPipelineDescriptor descriptor,
org.moe.natj.general.ptr.Ptr<NSError> error)
newRenderPipelineStateWithDescriptor:error:
|
void |
newRenderPipelineStateWithDescriptorOptionsCompletionHandler(MTLRenderPipelineDescriptor descriptor,
long options,
MTLDevice.Block_newRenderPipelineStateWithDescriptorOptionsCompletionHandler completionHandler)
newRenderPipelineState:options:completionHandler:
|
MTLRenderPipelineState |
newRenderPipelineStateWithDescriptorOptionsReflectionError(MTLRenderPipelineDescriptor descriptor,
long options,
org.moe.natj.general.ptr.Ptr<MTLRenderPipelineReflection> reflection,
org.moe.natj.general.ptr.Ptr<NSError> error)
newRenderPipelineStateWithDescriptor:options:reflection:error:
|
void |
newRenderPipelineStateWithTileDescriptorOptionsCompletionHandler(MTLTileRenderPipelineDescriptor descriptor,
long options,
MTLDevice.Block_newRenderPipelineStateWithTileDescriptorOptionsCompletionHandler completionHandler)
newRenderPipelineStateWithTileDescriptor:options:completionHandler:
|
MTLRenderPipelineState |
newRenderPipelineStateWithTileDescriptorOptionsReflectionError(MTLTileRenderPipelineDescriptor descriptor,
long options,
org.moe.natj.general.ptr.Ptr<MTLRenderPipelineReflection> reflection,
org.moe.natj.general.ptr.Ptr<NSError> error)
newRenderPipelineStateWithTileDescriptor:options:reflection:error:
|
MTLSamplerState |
newSamplerStateWithDescriptor(MTLSamplerDescriptor descriptor)
newSamplerStateWithDescriptor:
|
MTLSharedEvent |
newSharedEvent()
newSharedEvent
|
MTLSharedEvent |
newSharedEventWithHandle(MTLSharedEventHandle sharedEventHandle)
newSharedEventWithHandle
|
MTLTexture |
newSharedTextureWithDescriptor(MTLTextureDescriptor descriptor)
newSharedTextureWithDescriptor
|
MTLTexture |
newSharedTextureWithHandle(MTLSharedTextureHandle sharedHandle)
newSharedTextureWithHandle
|
MTLTexture |
newTextureWithDescriptor(MTLTextureDescriptor descriptor)
newTextureWithDescriptor:
|
MTLTexture |
newTextureWithDescriptorIosurfacePlane(MTLTextureDescriptor descriptor,
IOSurfaceRef iosurface,
long plane)
newTextureWithDescriptor:iosurface:plane
|
long |
readWriteTextureSupport()
[@property] readWriteTextureSupport
|
long |
registryID()
[@property] registryID
|
void |
sampleTimestampsGpuTimestamp(org.moe.natj.general.ptr.LongPtr cpuTimestamp,
org.moe.natj.general.ptr.LongPtr gpuTimestamp)
sampleTimestamps:gpuTimestamp:
|
long |
sparseTileSizeInBytes()
[@property] sparseTileSizeInBytes
|
MTLSize |
sparseTileSizeWithTextureTypePixelFormatSampleCount(long textureType,
long pixelFormat,
long sampleCount)
sparseTileSizeWithTextureType:pixelFormat:sampleCount:
|
boolean |
supports32BitFloatFiltering()
[@property] supports32BitFloatFiltering
|
boolean |
supports32BitMSAA()
[@property] supports32BitMSAA
|
boolean |
supportsCounterSampling(long samplingPoint)
supportsCounterSampling:
|
boolean |
supportsDynamicLibraries()
[@property] supportsDynamicLibraries
|
boolean |
supportsFamily(long gpuFamily)
supportsFamily:
|
boolean |
supportsFeatureSet(long featureSet)
supportsFeatureSet:
|
boolean |
supportsFunctionPointers()
[@property] supportsFunctionPointers
|
boolean |
supportsFunctionPointersFromRender()
[@property] supportsFunctionPointersFromRender
|
boolean |
supportsPrimitiveMotionBlur()
[@property] supportsPrimitiveMotionBlur
|
boolean |
supportsPullModelInterpolation()
[@property] supportsPullModelInterpolation
|
boolean |
supportsQueryTextureLOD()
[@property] supportsQueryTextureLOD
|
boolean |
supportsRasterizationRateMapWithLayerCount(long layerCount)
supportsRasterizationRateMapWithLayerCount:
|
boolean |
supportsRaytracing()
[@property] supportsRaytracing
|
boolean |
supportsRaytracingFromRender()
[@property] supportsRaytracingFromRender
|
boolean |
supportsRenderDynamicLibraries()
[@property] supportsRenderDynamicLibraries
|
boolean |
supportsShaderBarycentricCoordinates()
[@property] supportsShaderBarycentricCoordinates
|
boolean |
supportsTextureSampleCount(long sampleCount)
supportsTextureSampleCount:
|
boolean |
supportsVertexAmplificationCount(long count)
[@property] supportsVertexAmplificationCount:
|
MTLSizeAndAlign heapBufferSizeAndAlignWithLengthOptions(long length, long options)
Determine the byte size of buffers when sub-allocated from a heap.
This method can be used to help determine the required heap size.
MTLSizeAndAlign heapTextureSizeAndAlignWithDescriptor(MTLTextureDescriptor desc)
Determine the byte size of textures when sub-allocated from a heap.
This method can be used to help determine the required heap size.
MTLSize maxThreadsPerThreadgroup()
The maximum number of threads along each dimension.
java.lang.String name()
The full name of the vendor device.
MTLBuffer newBufferWithBytesLengthOptions(org.moe.natj.general.ptr.ConstVoidPtr pointer, long length, long options)
Create a buffer by allocating new memory and specifing the initial contents to be copied into it.
MTLBuffer newBufferWithBytesNoCopyLengthOptionsDeallocator(org.moe.natj.general.ptr.VoidPtr pointer, long length, long options, MTLDevice.Block_newBufferWithBytesNoCopyLengthOptionsDeallocator deallocator)
Create a buffer by wrapping an existing part of the address space.
MTLBuffer newBufferWithLengthOptions(long length, long options)
Create a buffer by allocating new memory.
MTLCommandQueue newCommandQueue()
Create and return a new command queue. Command Queues created via this method will only allow up to 64 non-completed command buffers.
MTLCommandQueue newCommandQueueWithMaxCommandBufferCount(long maxCommandBufferCount)
Create and return a new command queue with a given upper bound on non-completed command buffers.
void newComputePipelineStateWithDescriptorOptionsCompletionHandler(MTLComputePipelineDescriptor descriptor, long options, MTLDevice.Block_newComputePipelineStateWithDescriptorOptionsCompletionHandler completionHandler)
Create and compile a new MTLComputePipelineState object asynchronously.
MTLComputePipelineState newComputePipelineStateWithDescriptorOptionsReflectionError(MTLComputePipelineDescriptor descriptor, long options, org.moe.natj.general.ptr.Ptr<MTLComputePipelineReflection> reflection, org.moe.natj.general.ptr.Ptr<NSError> error)
Create and compile a new MTLComputePipelineState object synchronously.
void newComputePipelineStateWithFunctionCompletionHandler(MTLFunction computeFunction, MTLDevice.Block_newComputePipelineStateWithFunctionCompletionHandler completionHandler)
Create and compile a new MTLComputePipelineState object asynchronously.
MTLComputePipelineState newComputePipelineStateWithFunctionError(MTLFunction computeFunction, org.moe.natj.general.ptr.Ptr<NSError> error)
Create and compile a new MTLComputePipelineState object synchronously.
void newComputePipelineStateWithFunctionOptionsCompletionHandler(MTLFunction computeFunction, long options, MTLDevice.Block_newComputePipelineStateWithFunctionOptionsCompletionHandler completionHandler)
Create and compile a new MTLComputePipelineState object asynchronously.
MTLComputePipelineState newComputePipelineStateWithFunctionOptionsReflectionError(MTLFunction computeFunction, long options, org.moe.natj.general.ptr.Ptr<MTLComputePipelineReflection> reflection, org.moe.natj.general.ptr.Ptr<NSError> error)
Create and compile a new MTLComputePipelineState object synchronously.
MTLLibrary newDefaultLibrary()
Returns the default library for the main bundle.
use newDefaultLibraryWithBundle:error: to get an NSError in case of failure.
MTLLibrary newDefaultLibraryWithBundleError(NSBundle bundle, org.moe.natj.general.ptr.Ptr<NSError> error)
Returns the default library for a given bundle.
MTLDepthStencilState newDepthStencilStateWithDescriptor(MTLDepthStencilDescriptor descriptor)
Create a depth/stencil test state object.
MTLFence newFence()
Create a new MTLFence object
MTLHeap newHeapWithDescriptor(MTLHeapDescriptor descriptor)
Create a new heap with the given descriptor.
MTLLibrary newLibraryWithDataError(NSObject data, org.moe.natj.general.ptr.Ptr<NSError> error)
Load a MTLLibrary from a dispatch_data_t
data - A metallib file already loaded as data in the form of dispatch_data_t.error - An error if we fail to open the metallib data.MTLLibrary newLibraryWithFileError(java.lang.String filepath, org.moe.natj.general.ptr.Ptr<NSError> error)
Load a MTLLibrary from a metallib file.
void newLibraryWithSourceOptionsCompletionHandler(java.lang.String source,
MTLCompileOptions options,
MTLDevice.Block_newLibraryWithSourceOptionsCompletionHandler completionHandler)
Load a MTLLibrary from source.
MTLLibrary newLibraryWithSourceOptionsError(java.lang.String source, MTLCompileOptions options, org.moe.natj.general.ptr.Ptr<NSError> error)
Load a MTLLibrary from source.
void newRenderPipelineStateWithDescriptorCompletionHandler(MTLRenderPipelineDescriptor descriptor, MTLDevice.Block_newRenderPipelineStateWithDescriptorCompletionHandler completionHandler)
Create and compile a new MTLRenderPipelineState object asynchronously.
MTLRenderPipelineState newRenderPipelineStateWithDescriptorError(MTLRenderPipelineDescriptor descriptor, org.moe.natj.general.ptr.Ptr<NSError> error)
Create and compile a new MTLRenderPipelineState object synchronously.
void newRenderPipelineStateWithDescriptorOptionsCompletionHandler(MTLRenderPipelineDescriptor descriptor, long options, MTLDevice.Block_newRenderPipelineStateWithDescriptorOptionsCompletionHandler completionHandler)
Create and compile a new MTLRenderPipelineState object asynchronously and returns additional reflection information
MTLRenderPipelineState newRenderPipelineStateWithDescriptorOptionsReflectionError(MTLRenderPipelineDescriptor descriptor, long options, org.moe.natj.general.ptr.Ptr<MTLRenderPipelineReflection> reflection, org.moe.natj.general.ptr.Ptr<NSError> error)
Create and compile a new MTLRenderPipelineState object synchronously and returns additional reflection information.
MTLSamplerState newSamplerStateWithDescriptor(MTLSamplerDescriptor descriptor)
Create a new sampler.
MTLTexture newTextureWithDescriptor(MTLTextureDescriptor descriptor)
Allocate a new texture with privately owned storage.
boolean supportsFeatureSet(long featureSet)
Returns TRUE if the feature set is supported by this MTLDevice.
boolean supportsTextureSampleCount(long sampleCount)
Query device if it support textures with a given sampleCount.
boolean areProgrammableSamplePositionsSupported()
Query device for programmable sample position support.
boolean areRasterOrderGroupsSupported()
Query device for raster order groups support.
long argumentBuffersSupport()
Query support tier for Argument Buffers.
long currentAllocatedSize()
The current size in bytes of all resources allocated by this device
void getDefaultSamplePositionsCount(MTLSamplePosition positions, long count)
Retrieve the default sample positions.
positions - The destination array for default sample position data.count - Specifies the sample count for which to retrieve the default positions, the length of the positions array, and must be set to a valid sample count.long maxThreadgroupMemoryLength()
The maximum threadgroup memory available, in bytes.
long minimumLinearTextureAlignmentForPixelFormat(long format)
Returns the minimum alignment required for offset and rowBytes when creating a linear texture. An error is thrown for queries with invalid pixel formats (depth, stencil, or compressed formats).
MTLArgumentEncoder newArgumentEncoderWithArguments(NSArray<? extends MTLArgumentDescriptor> arguments)
Creates an argument encoder for an array of argument descriptors which will be encoded sequentially.
MTLLibrary newLibraryWithURLError(NSURL url, org.moe.natj.general.ptr.Ptr<NSError> error)
Load a MTLLibrary from a metallib file.
void newRenderPipelineStateWithTileDescriptorOptionsCompletionHandler(MTLTileRenderPipelineDescriptor descriptor, long options, MTLDevice.Block_newRenderPipelineStateWithTileDescriptorOptionsCompletionHandler completionHandler)
Create and compile a new MTLRenderPipelineState object asynchronously given a MTLTileRenderPipelineDescriptor.
MTLRenderPipelineState newRenderPipelineStateWithTileDescriptorOptionsReflectionError(MTLTileRenderPipelineDescriptor descriptor, long options, org.moe.natj.general.ptr.Ptr<MTLRenderPipelineReflection> reflection, org.moe.natj.general.ptr.Ptr<NSError> error)
Create and compile a new MTLRenderPipelineState object synchronously given a MTLTileRenderPipelineDescriptor.
MTLTexture newTextureWithDescriptorIosurfacePlane(MTLTextureDescriptor descriptor, IOSurfaceRef iosurface, long plane)
Create a new texture from an IOSurface.
descriptor - A description of the properties for the new texture.iosurface - The IOSurface to use as storage for the new texture.plane - The plane within the IOSurface to use.long readWriteTextureSupport()
Query support tier for read-write texture formats.
long registryID()
Returns the IORegistry ID for the Metal device
The registryID value for a Metal device is global to all tasks, and may be used to identify the GPU across task boundaries.
default void convertSparsePixelRegionsToTileRegionsWithTileSizeAlignmentModeNumRegions(MTLRegion pixelRegions, MTLRegion tileRegions, MTLSize tileSize, long mode, long numRegions)
default void convertSparseTileRegionsToPixelRegionsWithTileSizeNumRegions(MTLRegion tileRegions, MTLRegion pixelRegions, MTLSize tileSize, long numRegions)
boolean hasUnifiedMemory()
Returns YES if this GPU shares its memory with the rest of the machine (CPU, etc.)
Some GPU architectures do not have dedicated local memory and instead only use the same memory shared with the rest of the machine. This property will return YES for GPUs that fall into that category.
long maxArgumentBufferSamplerCount()
The maximum number of unique argument buffer samplers per app.
This limit is only applicable to samplers that have their supportArgumentBuffers property set to true. A MTLSamplerState object is considered unique if the configuration of its originating MTLSamplerDescriptor properties is unique. For example, two samplers with equal minFilter values but different magFilter values are considered unique.
long maxBufferLength()
long minimumTextureBufferAlignmentForPixelFormat(long format)
Returns the minimum alignment required for offset and rowBytes when creating a texture buffer from a buffer.
MTLEvent newEvent()
Returns a new single-device non-shareable Metal event object
MTLIndirectCommandBuffer newIndirectCommandBufferWithDescriptorMaxCommandCountOptions(MTLIndirectCommandBufferDescriptor descriptor, long maxCount, long options)
Creates a new indirect command buffer with the given descriptor and count.
The returned buffer can be safely executed without first encoding into (but is wasteful).
descriptor - The descriptor encodes the maximum logical stride of each command.maxCount - The maximum number of commands that this buffer can contain.options - The options for the indirect command buffer.MTLRasterizationRateMap newRasterizationRateMapWithDescriptor(MTLRasterizationRateMapDescriptor descriptor)
Creates a new variable rasterization rate map with the given descriptor.
If '[self supportsRasterizationRateMapWithLayerCount:descriptor.layerCount]' returns NO, or descriptor.screenSize describes an empty region, the result will always be nil.
MTLSharedEvent newSharedEvent()
Returns a shareable multi-device event.
MTLSharedEvent newSharedEventWithHandle(MTLSharedEventHandle sharedEventHandle)
Creates a shareable multi-device event from an existing shared event handle.
MTLTexture newSharedTextureWithDescriptor(MTLTextureDescriptor descriptor)
Create a new texture that can be shared across process boundaries.
This texture can be shared between process boundaries but not between different GPUs, by passing its MTLSharedTextureHandle.
descriptor - A description of the properties for the new texture.MTLTexture newSharedTextureWithHandle(MTLSharedTextureHandle sharedHandle)
Recreate shared texture from received texture handle.
This texture was shared between process boundaries by other process using MTLSharedTextureHandle. Current process will now share it with other processes and will be able to interact with it (but still in scope of the same GPUs).
sharedHandle - Handle to shared texture in this process space.long sparseTileSizeInBytes()
Returns the number of bytes required to map one sparse texture tile.
MTLSize sparseTileSizeWithTextureTypePixelFormatSampleCount(long textureType, long pixelFormat, long sampleCount)
Returns tile size for sparse texture with given type, pixel format and sample count.
boolean supportsFamily(long gpuFamily)
Returns TRUE if the GPU Family is supported by this MTLDevice.
boolean supportsRasterizationRateMapWithLayerCount(long layerCount)
Query device for variable rasterization rate support with the given number of layers.
layerCount - The number of layers for which to query device support.boolean supportsVertexAmplificationCount(long count)
Query device for vertex amplification support.
count - The amplification count to checkMTLAccelerationStructureSizes accelerationStructureSizesWithDescriptor(MTLAccelerationStructureDescriptor descriptor)
boolean areBarycentricCoordsSupported()
Query device for Barycentric coordinates support; deprecated, use supportsShaderBarycentricCoordinates
NSArray<?> counterSets()
Returns the set of Counter Sets exposed by the device.
MTLAccelerationStructure newAccelerationStructureWithDescriptor(MTLAccelerationStructureDescriptor descriptor)
MTLAccelerationStructure newAccelerationStructureWithSize(long size)
MTLBinaryArchive newBinaryArchiveWithDescriptorError(MTLBinaryArchiveDescriptor descriptor, org.moe.natj.general.ptr.Ptr<NSError> error)
Creates a MTLBinaryArchive using the configuration in the descriptor.
descriptor - The descriptor for the configuration of the binary archive to create.error - If an error occurs during creation, this parameter is updated to describe the failure.MTLBinaryArchiveMTLCounterSampleBuffer newCounterSampleBufferWithDescriptorError(MTLCounterSampleBufferDescriptor descriptor, org.moe.natj.general.ptr.Ptr<NSError> error)
Given a counter sample buffer descriptor, allocate a new counter sample buffer. This may return nil if the counters may not all be collected simultaneously.
descriptor - The descriptor to create a sample buffer forerror - An error return on failure.MTLDynamicLibrary newDynamicLibraryError(MTLLibrary library, org.moe.natj.general.ptr.Ptr<NSError> error)
Creates a MTLDynamicLibrary by compiling the code in a MTLLibrary.
library - The MTLLibrary from which to compile code. This library must have .type set to MTLLibraryTypeDynamic.error - If an error occurs during creation, this parameter is updated to describe the failure.MTLDynamicLibraryMTLDynamicLibrary newDynamicLibraryWithURLError(NSURL url, org.moe.natj.general.ptr.Ptr<NSError> error)
Creates a MTLDynamicLibrary by loading compiled code from a file.
url - The file URL from which to load. If the file contains no compiled code for this device, compilation is attempted as with newDynamicLibrary:error:error - If an error occurs during creation, this parameter is updated to describe the failure.MTLDynamicLibraryvoid sampleTimestampsGpuTimestamp(org.moe.natj.general.ptr.LongPtr cpuTimestamp,
org.moe.natj.general.ptr.LongPtr gpuTimestamp)
Sample the CPU and GPU timestamps as closely as possible.
cpuTimestamp - The timestamp on the CPUgpuTimestamp - The timestamp on the GPUboolean supportsCounterSampling(long samplingPoint)
Query device for counter sampling points support.
samplingPoint - Query indexboolean supportsDynamicLibraries()
Query device support for creating and using dynamic libraries in a compute pipeline.
boolean supportsFunctionPointers()
Query device support for using function pointers from compute pipelines.
boolean supportsPullModelInterpolation()
Query device for pull model interpolation support which allows a fragment shader to compute multiple interpolations (at center, at centroid, at offset, at sample) of a fragment input.
boolean supportsRaytracing()
Query device support for using ray tracing from compute pipelines.
boolean supportsShaderBarycentricCoordinates()
Query device for Barycentric Coordinates support.
void newLibraryWithStitchedDescriptorCompletionHandler(MTLStitchedLibraryDescriptor descriptor, MTLDevice.Block_newLibraryWithStitchedDescriptorCompletionHandler completionHandler)
Generates a new library using the graphs in the descriptor.
MTLLibrary newLibraryWithStitchedDescriptorError(MTLStitchedLibraryDescriptor descriptor, org.moe.natj.general.ptr.Ptr<NSError> error)
Returns a library generated using the graphs in the descriptor.
boolean supports32BitFloatFiltering()
Query device for 32-bit Float texture filtering support. Specifically, R32Float, RG32Float, and RGBA32Float.
boolean supports32BitMSAA()
Query device for 32-bit MSAA texture support. Specifically, added support for allocating 32-bit Integer format textures (R32Uint, R32Sint, RG32Uint, RG32Sint, RGBA32Uint, and RGBA32Sint) and resolving 32-bit Float format textures (R32Float, RG32Float, and RGBA32Float).
boolean supportsFunctionPointersFromRender()
Query device support for using function pointers from render pipeline stages.
boolean supportsPrimitiveMotionBlur()
Query device support for using ray tracing primitive motion blur.
boolean supportsQueryTextureLOD()
Query device for whether it supports the `calculate_clampled_lod` and `calculate_unclamped_lod` Metal shading language functionality.
boolean supportsRaytracingFromRender()
Query device support for using ray tracing from render pipeline stages.
boolean supportsRenderDynamicLibraries()
Query device support for creating and using dynamic libraries in render pipeline stages.