pub struct Device(/* private fields */);
Implementations§
Methods from Deref<Target = DeviceRef>§
pub fn name(&self) -> &str
pub fn registry_id(&self) -> u64
pub fn location(&self) -> MTLDeviceLocation
pub fn location_number(&self) -> u64
pub fn max_threadgroup_memory_length(&self) -> u64
pub fn max_threads_per_threadgroup(&self) -> MTLSize
pub fn is_low_power(&self) -> bool
pub fn is_headless(&self) -> bool
pub fn is_removable(&self) -> bool
Sourcepub fn supports_raytracing(&self) -> bool
pub fn supports_raytracing(&self) -> bool
Only available on (macos(11.0), ios(14.0))
pub fn has_unified_memory(&self) -> bool
pub fn recommended_max_working_set_size(&self) -> u64
pub fn max_transfer_rate(&self) -> u64
pub fn supports_feature_set(&self, feature: MTLFeatureSet) -> bool
pub fn supports_family(&self, family: MTLGPUFamily) -> bool
pub fn supports_vertex_amplification_count(&self, count: u64) -> bool
pub fn supports_texture_sample_count(&self, count: u64) -> bool
pub fn supports_shader_barycentric_coordinates(&self) -> bool
pub fn supports_function_pointers(&self) -> bool
Sourcepub fn supports_dynamic_libraries(&self) -> bool
pub fn supports_dynamic_libraries(&self) -> bool
Only available on (macos(11.0), ios(14.0))
Sourcepub fn supports_counter_sampling(
&self,
sampling_point: MTLCounterSamplingPoint,
) -> bool
pub fn supports_counter_sampling( &self, sampling_point: MTLCounterSamplingPoint, ) -> bool
Only available on (macos(11.0), ios(14.0))
pub fn d24_s8_supported(&self) -> bool
pub fn new_fence(&self) -> Fence
pub fn new_command_queue(&self) -> CommandQueue
pub fn new_command_queue_with_max_command_buffer_count( &self, count: u64, ) -> CommandQueue
pub fn new_default_library(&self) -> Library
pub fn new_library_with_source( &self, src: &str, options: &CompileOptionsRef, ) -> Result<Library, String>
pub fn new_library_with_file<P>(&self, file: P) -> Result<Library, String>
pub fn new_library_with_data( &self, library_data: &[u8], ) -> Result<Library, String>
Sourcepub fn new_dynamic_library(
&self,
library: &LibraryRef,
) -> Result<DynamicLibrary, String>
pub fn new_dynamic_library( &self, library: &LibraryRef, ) -> Result<DynamicLibrary, String>
Only available on (macos(11.0), ios(14.0))
Sourcepub fn new_dynamic_library_with_url(
&self,
url: &URLRef,
) -> Result<DynamicLibrary, String>
pub fn new_dynamic_library_with_url( &self, url: &URLRef, ) -> Result<DynamicLibrary, String>
Only available on (macos(11.0), ios(14.0))
Sourcepub fn new_binary_archive_with_descriptor(
&self,
descriptor: &BinaryArchiveDescriptorRef,
) -> Result<BinaryArchive, String>
pub fn new_binary_archive_with_descriptor( &self, descriptor: &BinaryArchiveDescriptorRef, ) -> Result<BinaryArchive, String>
Only available on (macos(11.0), ios(14.0))
Sourcepub fn new_render_pipeline_state_with_reflection(
&self,
descriptor: &RenderPipelineDescriptorRef,
reflection_options: MTLPipelineOption,
) -> Result<(RenderPipelineState, RenderPipelineReflection), String>
pub fn new_render_pipeline_state_with_reflection( &self, descriptor: &RenderPipelineDescriptorRef, reflection_options: MTLPipelineOption, ) -> Result<(RenderPipelineState, RenderPipelineReflection), String>
Synchronously creates a render pipeline state object and associated reflection information.
pub fn new_render_pipeline_state( &self, descriptor: &RenderPipelineDescriptorRef, ) -> Result<RenderPipelineState, String>
Sourcepub fn new_mesh_render_pipeline_state_with_reflection(
&self,
descriptor: &MeshRenderPipelineDescriptorRef,
reflection_options: MTLPipelineOption,
) -> Result<(RenderPipelineState, RenderPipelineReflection), String>
pub fn new_mesh_render_pipeline_state_with_reflection( &self, descriptor: &MeshRenderPipelineDescriptorRef, reflection_options: MTLPipelineOption, ) -> Result<(RenderPipelineState, RenderPipelineReflection), String>
Only available on (macos(13.0), ios(16.0))
Sourcepub fn new_mesh_render_pipeline_state(
&self,
descriptor: &MeshRenderPipelineDescriptorRef,
) -> Result<RenderPipelineState, String>
pub fn new_mesh_render_pipeline_state( &self, descriptor: &MeshRenderPipelineDescriptorRef, ) -> Result<RenderPipelineState, String>
Only available on (macos(13.0), ios(16.0))
pub fn new_compute_pipeline_state_with_function( &self, function: &FunctionRef, ) -> Result<ComputePipelineState, String>
pub fn new_compute_pipeline_state( &self, descriptor: &ComputePipelineDescriptorRef, ) -> Result<ComputePipelineState, String>
Sourcepub fn new_compute_pipeline_state_with_reflection(
&self,
descriptor: &ComputePipelineDescriptorRef,
reflection_options: MTLPipelineOption,
) -> Result<(ComputePipelineState, ComputePipelineReflection), String>
pub fn new_compute_pipeline_state_with_reflection( &self, descriptor: &ComputePipelineDescriptorRef, reflection_options: MTLPipelineOption, ) -> Result<(ComputePipelineState, ComputePipelineReflection), String>
Synchronously creates a compute pipeline state object and associated reflection information, using a compute pipeline descriptor.
pub fn new_buffer(&self, length: u64, options: MTLResourceOptions) -> Buffer
pub fn new_buffer_with_bytes_no_copy( &self, bytes: *const c_void, length: u64, options: MTLResourceOptions, deallocator: Option<&Block<(*const c_void, u64), ()>>, ) -> Buffer
pub fn new_buffer_with_data( &self, bytes: *const c_void, length: u64, options: MTLResourceOptions, ) -> Buffer
pub fn new_counter_sample_buffer_with_descriptor( &self, descriptor: &CounterSampleBufferDescriptorRef, ) -> Result<CounterSampleBuffer, String>
pub fn new_indirect_command_buffer_with_descriptor( &self, descriptor: &IndirectCommandBufferDescriptorRef, max_command_count: u64, options: MTLResourceOptions, ) -> IndirectCommandBuffer
pub fn new_texture(&self, descriptor: &TextureDescriptorRef) -> Texture
pub fn new_sampler(&self, descriptor: &SamplerDescriptorRef) -> SamplerState
pub fn new_depth_stencil_state( &self, descriptor: &DepthStencilDescriptorRef, ) -> DepthStencilState
pub fn argument_buffers_support(&self) -> MTLArgumentBuffersTier
pub fn read_write_texture_support(&self) -> MTLReadWriteTextureTier
pub fn raster_order_groups_supported(&self) -> bool
Sourcepub fn supports_32bit_float_filtering(&self) -> bool
pub fn supports_32bit_float_filtering(&self) -> bool
Only available on (macos(11.0), ios(14.0))
Sourcepub fn supports_32bit_MSAA(&self) -> bool
pub fn supports_32bit_MSAA(&self) -> bool
Only available on (macos(11.0), ios(14.0))
Sourcepub fn supports_query_texture_LOD(&self) -> bool
pub fn supports_query_texture_LOD(&self) -> bool
Only available on (macos(11.0), ios(14.0))
Sourcepub fn supports_BC_texture_compression(&self) -> bool
pub fn supports_BC_texture_compression(&self) -> bool
Only available on (macos(11.0), ios(14.0))
Sourcepub fn supports_pull_model_interpolation(&self) -> bool
pub fn supports_pull_model_interpolation(&self) -> bool
Only available on (macos(11.0), ios(14.0))
pub fn new_argument_encoder( &self, arguments: &ArrayRef<ArgumentDescriptor>, ) -> ArgumentEncoder
pub fn new_heap(&self, descriptor: &HeapDescriptorRef) -> Heap
pub fn new_event(&self) -> Event
pub fn heap_buffer_size_and_align( &self, length: u64, options: MTLResourceOptions, ) -> MTLSizeAndAlign
Sourcepub fn heap_acceleration_structure_size_and_align_with_size(
&self,
size: u64,
) -> MTLSizeAndAlign
pub fn heap_acceleration_structure_size_and_align_with_size( &self, size: u64, ) -> MTLSizeAndAlign
Only available on macos(13.0), ios(16.0)
pub fn heap_texture_size_and_align( &self, descriptor: &TextureDescriptorRef, ) -> MTLSizeAndAlign
pub fn minimum_linear_texture_alignment_for_pixel_format( &self, format: MTLPixelFormat, ) -> u64
pub fn minimum_texture_buffer_alignment_for_pixel_format( &self, format: MTLPixelFormat, ) -> u64
pub fn max_argument_buffer_sampler_count(&self) -> u64
pub fn current_allocated_size(&self) -> u64
Sourcepub fn max_buffer_length(&self) -> u64
pub fn max_buffer_length(&self) -> u64
Only available on (macos(10.14), ios(12.0), tvos(12.0))