API referencestd/gpu

std/gpu/metal

Public declarations, types, methods, and source contracts for std/gpu/metal.

On this page

Library guide ยท API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/gpu/metal"

Names used in signatures

Unqualified names denote this packageโ€™s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
mem core/mem metal.dodo
objc std/gpu/metal/objc metal.dodo
ptr core/ptr metal.dodo

Range

Type alias ยท Source

NSRange: a span of elements, such as bytes, mipmap levels or slices.

pub type Range = objc.Range

Size

Struct ยท Source

MTLSize: a count of threads, threadgroups or texels in each dimension.

@repr(C)
pub struct Size {
    pub width: usize
    pub height: usize
    pub depth: usize
}

Size.new

Function ยท Source

pub fn new(width: usize, height: usize, depth: usize) -> Size

Origin

Struct ยท Source

MTLOrigin: the first texel of a region.

@repr(C)
pub struct Origin {
    pub x: usize
    pub y: usize
    pub z: usize
}

Origin.new

Function ยท Source

pub fn new(x: usize, y: usize, z: usize) -> Origin

Region

Struct ยท Source

MTLRegion: a box of texels.

@repr(C)
pub struct Region {
    pub origin: Origin
    pub size: Size
}

Region.new_2d

Function ยท Source

A rectangle in a 2D texture or one slice of an array.

pub fn new_2d(x: usize, y: usize, width: usize, height: usize) -> Region

Region.new_3d

Function ยท Source

pub fn new_3d(x: usize, y: usize, z: usize, width: usize, height: usize, depth: usize) -> Region

ClearColor

Struct ยท Source

MTLClearColor: what a clear load action fills a color attachment with.

@repr(C)
pub struct ClearColor {
    pub red: f64
    pub green: f64
    pub blue: f64
    pub alpha: f64
}

ClearColor.new

Function ยท Source

pub fn new(red: f64, green: f64, blue: f64, alpha: f64) -> ClearColor

Viewport

Struct ยท Source

MTLViewport: the transform from normalized device coordinates to pixels.

@repr(C)
pub struct Viewport {
    pub origin_x: f64
    pub origin_y: f64
    pub width: f64
    pub height: f64
    pub znear: f64
    pub zfar: f64
}

Viewport.new

Function ยท Source

pub fn new(origin_x: f64, origin_y: f64, width: f64, height: f64, znear: f64, zfar: f64) -> Viewport

ScissorRect

Struct ยท Source

MTLScissorRect: the pixels a draw may change.

@repr(C)
pub struct ScissorRect {
    pub x: usize
    pub y: usize
    pub width: usize
    pub height: usize
}

ScissorRect.new

Function ยท Source

pub fn new(x: usize, y: usize, width: usize, height: usize) -> ScissorRect

CGSize

Struct ยท Source

CGSize: a size in pixels or points, as Core Animation measures it.

@repr(C)
pub struct CGSize {
    pub width: f64
    pub height: f64
}

CGSize.new

Function ยท Source

pub fn new(width: f64, height: f64) -> CGSize

MAX_BUFFER_BINDINGS

Constant ยท Source

Binding limits enforced before a call reaches Metal, whose argument tables have these many slots per shader stage.

pub const MAX_BUFFER_BINDINGS: usize = 31

MAX_TEXTURE_BINDINGS

Constant ยท Source

pub const MAX_TEXTURE_BINDINGS: usize = 128

MAX_SAMPLER_BINDINGS

Constant ยท Source

pub const MAX_SAMPLER_BINDINGS: usize = 16

MAX_COLOR_ATTACHMENTS

Constant ยท Source

pub const MAX_COLOR_ATTACHMENTS: usize = 8

MAX_VERTEX_ATTRIBUTES

Constant ยท Source

pub const MAX_VERTEX_ATTRIBUTES: usize = 31

Error

Enum ยท Source

Why a Metal call failed.

pub enum Error {
    // The system has no Metal device, as in many virtual machines.
    NoDevice,
    // Metal could not create the object; usually memory is exhausted.
    OutOfMemory,
    // An argument is outside what the call accepts, such as a byte range
    // past the end of a buffer or a region outside a texture.
    InvalidInput,
    // The library has no function with the requested name.
    NotFound,
    // The operation needs something this system or object lacks, such as a
    // pixel format whose size is unknown or a class that is not loaded.
    Unsupported,
    // Metal reported an error: shader compilation, pipeline creation or a
    // failed command buffer. The NSError carries Metal's own message.
    Failed(objc.NSError)
}

error_name

Function ยท Source

pub fn error_name(error: &Error) -> &str from(static)

Device

Struct ยท Source

MTLDevice: one GPU. It creates every other object.

@unsafe_send
@unsafe_sync
pub unsafe struct Device {
    // Private implementation fields omitted.
}

Device.system_default

Function ยท Source

The GPU macOS prefers for this process. Err(NoDevice) when there is none, as in a virtual machine without GPU support.

pub fn system_default() -> Device!Error

Device.all

Function ยท Source

Every GPU in the system, including external and headless ones.

pub fn all() -> DeviceList

Device.from_object

Function ยท Source

Safety: object is an MTLDevice.

pub unsafe fn from_object(object: objc.Object) -> Device

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Device.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

Device.clone

Function ยท Source

pub fn clone(&self) -> Device

Device.name

Function ยท Source

The GPUโ€™s name, such as โ€œApple M4โ€.

pub fn name(&self) -> Option<objc.NSString>

Device.registry_id

Function ยท Source

An identifier that stays the same for this GPU across processes.

pub fn registry_id(&self) -> u64

Device.max_buffer_length

Function ยท Source

The largest buffer new_buffer can create, in bytes.

pub fn max_buffer_length(&self) -> usize

Device.max_threadgroup_memory_length

Function ยท Source

The threadgroup memory one compute threadgroup may use, in bytes.

pub fn max_threadgroup_memory_length(&self) -> usize

Device.max_threads_per_threadgroup

Function ยท Source

The most threads in each dimension of one threadgroup.

pub fn max_threads_per_threadgroup(&self) -> Size

Device.recommended_max_working_set_size

Function ยท Source

How much memory the GPU can use without hurting performance, in bytes.

pub fn recommended_max_working_set_size(&self) -> u64

Device.current_allocated_size

Function ยท Source

The memory this processโ€™s Metal objects currently use, in bytes.

pub fn current_allocated_size(&self) -> usize

Device.has_unified_memory

Function ยท Source

Whether the CPU and GPU share memory, as on Apple silicon.

pub fn has_unified_memory(&self) -> bool

Device.is_low_power

Function ยท Source

pub fn is_low_power(&self) -> bool

Device.is_headless

Function ยท Source

pub fn is_headless(&self) -> bool

Device.is_removable

Function ยท Source

pub fn is_removable(&self) -> bool

Device.supports_family

Function ยท Source

Whether the GPU implements a feature family such as GPU_FAMILY_APPLE7.

pub fn supports_family(&self, family: GpuFamily) -> bool

Device.supports_texture_sample_count

Function ยท Source

Whether render targets may have this many samples per pixel.

pub fn supports_texture_sample_count(&self, count: usize) -> bool

Device.minimum_linear_texture_alignment

Function ยท Source

The alignment, in bytes, of a textureโ€™s rows stored in a buffer.

pub fn minimum_linear_texture_alignment(&self, format: PixelFormat) -> usize

Device.new_command_queue

Function ยท Source

pub fn new_command_queue(&self) -> CommandQueue!Error

Device.new_command_queue_with_max_command_buffer_count

Function ยท Source

A queue that allows at most count uncompleted command buffers; command_buffer() waits while that many are in flight.

pub fn new_command_queue_with_max_command_buffer_count(&self, count: usize) -> CommandQueue!Error

Device.new_buffer

Function ยท Source

A zero-filled buffer of length bytes. RESOURCE_STORAGE_MODE_SHARED makes it CPU-visible; RESOURCE_STORAGE_MODE_PRIVATE keeps it on the GPU.

pub fn new_buffer(&self, length: usize, options: ResourceOptions) -> Buffer!Error

Device.new_buffer_with_bytes

Function ยท Source

A buffer holding a copy of bytes.

pub fn new_buffer_with_bytes(&self, bytes: &[u8], options: ResourceOptions) -> Buffer!Error

Device.new_texture

Function ยท Source

pub fn new_texture(&self, descriptor: &TextureDescriptor) -> Texture!Error

Device.new_sampler_state

Function ยท Source

pub fn new_sampler_state(&self, descriptor: &SamplerDescriptor) -> SamplerState!Error

Device.new_depth_stencil_state

Function ยท Source

pub fn new_depth_stencil_state(&self, descriptor: &DepthStencilDescriptor) -> DepthStencilState!Error

Device.new_library_with_source

Function ยท Source

Compile Metal Shading Language source. A compile error is Err(Failed(error)) with the compilerโ€™s log as error.message().

pub fn new_library_with_source(&self, source: &str, options: &CompileOptions) -> Library!Error

Device.new_library_with_data

Function ยท Source

Load a compiled .metallib, such as the output of xcrun metal.

pub fn new_library_with_data(&self, bytes: &[u8]) -> Library!Error

Device.new_compute_pipeline_state

Function ยท Source

pub fn new_compute_pipeline_state(&self, function: &Function) -> ComputePipelineState!Error

Device.new_render_pipeline_state

Function ยท Source

pub fn new_render_pipeline_state(&self, descriptor: &RenderPipelineDescriptor) -> RenderPipelineState!Error

Device.new_fence

Function ยท Source

pub fn new_fence(&self) -> Fence!Error

Device.new_event

Function ยท Source

An event for ordering command buffers on this device.

pub fn new_event(&self) -> Event!Error

Device.new_shared_event

Function ยท Source

An event the CPU can also read and signal.

pub fn new_shared_event(&self) -> SharedEvent!Error

DeviceList

Struct ยท Source

The GPUs Device.all() found.

pub struct DeviceList {
    // Private implementation fields omitted.
}

DeviceList.len

Function ยท Source

pub fn len(&self) -> usize

DeviceList.get

Function ยท Source

pub fn get(&self, index: usize) -> Option<Device>

CommandQueue

Struct ยท Source

MTLCommandQueue: submits command buffers to the GPU in order.

@unsafe_send
@unsafe_sync
pub unsafe struct CommandQueue {
    // Private implementation fields omitted.
}

CommandQueue.from_object

Function ยท Source

Safety: object is an MTLCommandQueue.

pub unsafe fn from_object(object: objc.Object) -> CommandQueue

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

CommandQueue.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

CommandQueue.clone

Function ยท Source

pub fn clone(&self) -> CommandQueue

CommandQueue.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

CommandQueue.label

Function ยท Source

pub fn label(&self) -> Option<objc.NSString>

CommandQueue.command_buffer

Function ยท Source

A new command buffer that retains every resource it uses until the GPU has finished with it.

pub fn command_buffer(&self) -> CommandBuffer!Error

CommandQueue.command_buffer_with_unretained_references

Function ยท Source

A command buffer that does not retain the resources it uses: the program must keep them alive until the buffer completes.

pub fn command_buffer_with_unretained_references(&self) -> CommandBuffer!Error

CommandBuffer

Struct ยท Source

MTLCommandBuffer: commands recorded by encoders, then committed to the queue. One encoder at a time may record into it.

@unsafe_send
pub unsafe struct CommandBuffer {
    // Private implementation fields omitted.
}

CommandBuffer.from_object

Function ยท Source

Safety: object is an MTLCommandBuffer.

pub unsafe fn from_object(object: objc.Object) -> CommandBuffer

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

CommandBuffer.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

CommandBuffer.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

CommandBuffer.label

Function ยท Source

pub fn label(&self) -> Option<objc.NSString>

CommandBuffer.push_debug_group

Function ยท Source

pub fn push_debug_group(&self, text: &str)

CommandBuffer.pop_debug_group

Function ยท Source

pub fn pop_debug_group(&self)

CommandBuffer.compute_command_encoder

Function ยท Source

pub fn compute_command_encoder(&self) -> ComputeCommandEncoder!Error

CommandBuffer.render_command_encoder

Function ยท Source

pub fn render_command_encoder(&self, descriptor: &RenderPassDescriptor) -> RenderCommandEncoder!Error

CommandBuffer.blit_command_encoder

Function ยท Source

pub fn blit_command_encoder(&self) -> BlitCommandEncoder!Error

CommandBuffer.enqueue

Function ยท Source

Reserve this bufferโ€™s place in the queue before committing it.

pub fn enqueue(&self)

CommandBuffer.commit

Function ยท Source

Submit the recorded commands. Nothing more can be encoded afterwards.

pub fn commit(&self)

CommandBuffer.wait_until_scheduled

Function ยท Source

pub fn wait_until_scheduled(&self)

CommandBuffer.wait_until_completed

Function ยท Source

Block until the GPU has finished, then report how it went: Err(Failed) carries Metalโ€™s description of a failed command buffer.

pub fn wait_until_completed(&self) -> void!Error

CommandBuffer.status

Function ยท Source

pub fn status(&self) -> CommandBufferStatus

CommandBuffer.error

Function ยท Source

Why the command buffer failed, once its status is COMMAND_BUFFER_STATUS_ERROR.

pub fn error(&self) -> Option<objc.NSError>

CommandBuffer.present_drawable

Function ยท Source

Show the drawable as soon as this command buffer has been scheduled.

pub fn present_drawable(&self, drawable: &Drawable)

CommandBuffer.encode_signal_event

Function ยท Source

Set the event to value once the commands before this point finish.

pub fn encode_signal_event(&self, event: &Event, value: u64)

CommandBuffer.encode_wait_for_event

Function ยท Source

Hold later commands until the event reaches value.

pub fn encode_wait_for_event(&self, event: &Event, value: u64)

CommandBuffer.encode_signal_shared_event

Function ยท Source

pub fn encode_signal_shared_event(&self, event: &SharedEvent, value: u64)

CommandBuffer.encode_wait_for_shared_event

Function ยท Source

pub fn encode_wait_for_shared_event(&self, event: &SharedEvent, value: u64)

CommandBuffer.gpu_start_time

Function ยท Source

When the GPU started and finished this buffer, in seconds on the hostโ€™s mach_absolute_time clock; 0 until it completes.

pub fn gpu_start_time(&self) -> f64

CommandBuffer.gpu_end_time

Function ยท Source

pub fn gpu_end_time(&self) -> f64

ComputeCommandEncoder

Struct ยท Source

MTLComputeCommandEncoder: records compute dispatches. Binding indices above the MAX_*_BINDINGS limits panic.

pub struct ComputeCommandEncoder {
    // Private implementation fields omitted.
}

ComputeCommandEncoder.from_object

Function ยท Source

Safety: object is an MTLComputeCommandEncoder.

pub unsafe fn from_object(object: objc.Object) -> ComputeCommandEncoder

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

ComputeCommandEncoder.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

ComputeCommandEncoder.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

ComputeCommandEncoder.push_debug_group

Function ยท Source

pub fn push_debug_group(&self, text: &str)

ComputeCommandEncoder.pop_debug_group

Function ยท Source

pub fn pop_debug_group(&self)

ComputeCommandEncoder.insert_debug_signpost

Function ยท Source

pub fn insert_debug_signpost(&self, text: &str)

ComputeCommandEncoder.set_compute_pipeline_state

Function ยท Source

pub fn set_compute_pipeline_state(&self, state: &ComputePipelineState)

ComputeCommandEncoder.set_buffer

Function ยท Source

Bind buffer, starting offset bytes in, to [[buffer(index)]].

pub fn set_buffer(&self, buffer: &Buffer, offset: usize, index: usize)

ComputeCommandEncoder.set_buffer_offset

Function ยท Source

Move the offset of the buffer already bound at index.

pub fn set_buffer_offset(&self, offset: usize, index: usize)

ComputeCommandEncoder.set_bytes

Function ยท Source

Copy a few bytes of constants (Metal suggests under 4 KiB) into [[buffer(index)]] without creating a buffer.

pub fn set_bytes(&self, bytes: &[u8], index: usize)

ComputeCommandEncoder.set_texture

Function ยท Source

pub fn set_texture(&self, texture: &Texture, index: usize)

ComputeCommandEncoder.set_sampler_state

Function ยท Source

pub fn set_sampler_state(&self, sampler: &SamplerState, index: usize)

ComputeCommandEncoder.set_threadgroup_memory_length

Function ยท Source

Reserve length bytes (a multiple of 16) for [[threadgroup(index)]].

pub fn set_threadgroup_memory_length(&self, length: usize, index: usize)

ComputeCommandEncoder.dispatch_threadgroups

Function ยท Source

Run threadgroups groups of threads_per_threadgroup threads each.

pub fn dispatch_threadgroups(&self, threadgroups: Size, threads_per_threadgroup: Size)

ComputeCommandEncoder.dispatch_threads

Function ยท Source

Run exactly threads threads, which need not be a multiple of the threadgroup size (GPU_FAMILY_APPLE4 or GPU_FAMILY_MAC2 and later).

pub fn dispatch_threads(&self, threads: Size, threads_per_threadgroup: Size)

ComputeCommandEncoder.dispatch_threadgroups_indirect

Function ยท Source

Read the threadgroup counts as three u32 values from the buffer.

pub fn dispatch_threadgroups_indirect(&self, buffer: &Buffer, offset: usize, threads_per_threadgroup: Size)

ComputeCommandEncoder.use_buffer

Function ยท Source

Make a buffer reached only through an argument buffer resident.

pub fn use_buffer(&self, buffer: &Buffer, usage: ResourceUsage)

ComputeCommandEncoder.use_texture

Function ยท Source

pub fn use_texture(&self, texture: &Texture, usage: ResourceUsage)

ComputeCommandEncoder.memory_barrier

Function ยท Source

Order earlier dispatchesโ€™ writes before later dispatchesโ€™ accesses.

pub fn memory_barrier(&self, scope: BarrierScope)

ComputeCommandEncoder.update_fence

Function ยท Source

pub fn update_fence(&self, fence: &Fence)

ComputeCommandEncoder.wait_for_fence

Function ยท Source

pub fn wait_for_fence(&self, fence: &Fence)

ComputeCommandEncoder.end_encoding

Function ยท Source

Finish recording. The encoder cannot be used again.

pub fn end_encoding(self)

RenderCommandEncoder

Struct ยท Source

MTLRenderCommandEncoder: records draws into one render pass. Binding indices above the MAX_*_BINDINGS limits panic.

pub struct RenderCommandEncoder {
    // Private implementation fields omitted.
}

RenderCommandEncoder.from_object

Function ยท Source

Safety: object is an MTLRenderCommandEncoder.

pub unsafe fn from_object(object: objc.Object) -> RenderCommandEncoder

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

RenderCommandEncoder.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

RenderCommandEncoder.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

RenderCommandEncoder.push_debug_group

Function ยท Source

pub fn push_debug_group(&self, text: &str)

RenderCommandEncoder.pop_debug_group

Function ยท Source

pub fn pop_debug_group(&self)

RenderCommandEncoder.insert_debug_signpost

Function ยท Source

pub fn insert_debug_signpost(&self, text: &str)

RenderCommandEncoder.set_render_pipeline_state

Function ยท Source

pub fn set_render_pipeline_state(&self, state: &RenderPipelineState)

RenderCommandEncoder.set_vertex_buffer

Function ยท Source

pub fn set_vertex_buffer(&self, buffer: &Buffer, offset: usize, index: usize)

RenderCommandEncoder.set_vertex_buffer_offset

Function ยท Source

pub fn set_vertex_buffer_offset(&self, offset: usize, index: usize)

RenderCommandEncoder.set_vertex_bytes

Function ยท Source

pub fn set_vertex_bytes(&self, bytes: &[u8], index: usize)

RenderCommandEncoder.set_vertex_texture

Function ยท Source

pub fn set_vertex_texture(&self, texture: &Texture, index: usize)

RenderCommandEncoder.set_vertex_sampler_state

Function ยท Source

pub fn set_vertex_sampler_state(&self, sampler: &SamplerState, index: usize)

RenderCommandEncoder.set_fragment_buffer

Function ยท Source

pub fn set_fragment_buffer(&self, buffer: &Buffer, offset: usize, index: usize)

RenderCommandEncoder.set_fragment_buffer_offset

Function ยท Source

pub fn set_fragment_buffer_offset(&self, offset: usize, index: usize)

RenderCommandEncoder.set_fragment_bytes

Function ยท Source

pub fn set_fragment_bytes(&self, bytes: &[u8], index: usize)

RenderCommandEncoder.set_fragment_texture

Function ยท Source

pub fn set_fragment_texture(&self, texture: &Texture, index: usize)

RenderCommandEncoder.set_fragment_sampler_state

Function ยท Source

pub fn set_fragment_sampler_state(&self, sampler: &SamplerState, index: usize)

RenderCommandEncoder.set_viewport

Function ยท Source

pub fn set_viewport(&self, viewport: Viewport)

RenderCommandEncoder.set_scissor_rect

Function ยท Source

The rectangle must lie within the render targets.

pub fn set_scissor_rect(&self, rect: ScissorRect)

RenderCommandEncoder.set_triangle_fill_mode

Function ยท Source

pub fn set_triangle_fill_mode(&self, mode: TriangleFillMode)

RenderCommandEncoder.set_cull_mode

Function ยท Source

pub fn set_cull_mode(&self, mode: CullMode)

RenderCommandEncoder.set_front_facing_winding

Function ยท Source

pub fn set_front_facing_winding(&self, winding: Winding)

RenderCommandEncoder.set_depth_clip_mode

Function ยท Source

pub fn set_depth_clip_mode(&self, mode: DepthClipMode)

RenderCommandEncoder.set_depth_stencil_state

Function ยท Source

pub fn set_depth_stencil_state(&self, state: &DepthStencilState)

RenderCommandEncoder.set_stencil_reference_value

Function ยท Source

pub fn set_stencil_reference_value(&self, value: u32)

RenderCommandEncoder.set_stencil_front_back_reference_value

Function ยท Source

pub fn set_stencil_front_back_reference_value(&self, front: u32, back: u32)

RenderCommandEncoder.set_blend_color

Function ยท Source

The constant color BLEND_FACTOR_BLEND_COLOR and friends use.

pub fn set_blend_color(&self, red: f32, green: f32, blue: f32, alpha: f32)

RenderCommandEncoder.set_depth_bias

Function ยท Source

pub fn set_depth_bias(&self, bias: f32, slope_scale: f32, clamp: f32)

RenderCommandEncoder.draw_primitives

Function ยท Source

pub fn draw_primitives(&self, primitive: PrimitiveType, vertex_start: usize, vertex_count: usize)

RenderCommandEncoder.draw_primitives_instanced

Function ยท Source

pub fn draw_primitives_instanced(&self, primitive: PrimitiveType, vertex_start: usize, vertex_count: usize, instance_count: usize, base_instance: usize)

RenderCommandEncoder.draw_indexed_primitives

Function ยท Source

Draw index_count vertices whose indices start index_offset bytes into index_buffer; base_vertex is added to every index.

pub fn draw_indexed_primitives(&self, primitive: PrimitiveType, index_count: usize, index_type: IndexType, index_buffer: &Buffer, index_offset: usize, instance_count: usize, base_vertex: isize, base_instance: usize)

RenderCommandEncoder.draw_primitives_indirect

Function ยท Source

Read the drawโ€™s arguments (MTLDrawPrimitivesIndirectArguments) from the buffer.

pub fn draw_primitives_indirect(&self, primitive: PrimitiveType, indirect_buffer: &Buffer, indirect_offset: usize)

RenderCommandEncoder.draw_indexed_primitives_indirect

Function ยท Source

pub fn draw_indexed_primitives_indirect(&self, primitive: PrimitiveType, index_type: IndexType, index_buffer: &Buffer, index_offset: usize, indirect_buffer: &Buffer, indirect_offset: usize)

RenderCommandEncoder.use_buffer

Function ยท Source

pub fn use_buffer(&self, buffer: &Buffer, usage: ResourceUsage, stages: RenderStages)

RenderCommandEncoder.use_texture

Function ยท Source

pub fn use_texture(&self, texture: &Texture, usage: ResourceUsage, stages: RenderStages)

RenderCommandEncoder.memory_barrier

Function ยท Source

pub fn memory_barrier(&self, scope: BarrierScope, after: RenderStages, before: RenderStages)

RenderCommandEncoder.update_fence

Function ยท Source

pub fn update_fence(&self, fence: &Fence, after: RenderStages)

RenderCommandEncoder.wait_for_fence

Function ยท Source

pub fn wait_for_fence(&self, fence: &Fence, before: RenderStages)

RenderCommandEncoder.end_encoding

Function ยท Source

pub fn end_encoding(self)

BlitCommandEncoder

Struct ยท Source

MTLBlitCommandEncoder: records copies, fills and mipmap generation.

pub struct BlitCommandEncoder {
    // Private implementation fields omitted.
}

BlitCommandEncoder.from_object

Function ยท Source

Safety: object is an MTLBlitCommandEncoder.

pub unsafe fn from_object(object: objc.Object) -> BlitCommandEncoder

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

BlitCommandEncoder.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

BlitCommandEncoder.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

BlitCommandEncoder.push_debug_group

Function ยท Source

pub fn push_debug_group(&self, text: &str)

BlitCommandEncoder.pop_debug_group

Function ยท Source

pub fn pop_debug_group(&self)

BlitCommandEncoder.copy_buffer

Function ยท Source

pub fn copy_buffer(&self, source: &Buffer, source_offset: usize, destination: &Buffer, destination_offset: usize, size: usize)

BlitCommandEncoder.copy_buffer_to_texture

Function ยท Source

pub fn copy_buffer_to_texture(&self, source: &Buffer, source_offset: usize, source_bytes_per_row: usize, source_bytes_per_image: usize, source_size: Size, destination: &Texture, destination_slice: usize, destination_level: usize, destination_origin: Origin)

BlitCommandEncoder.copy_texture_to_buffer

Function ยท Source

pub fn copy_texture_to_buffer(&self, source: &Texture, source_slice: usize, source_level: usize, source_origin: Origin, source_size: Size, destination: &Buffer, destination_offset: usize, destination_bytes_per_row: usize, destination_bytes_per_image: usize)

BlitCommandEncoder.copy_texture

Function ยท Source

pub fn copy_texture(&self, source: &Texture, source_slice: usize, source_level: usize, source_origin: Origin, source_size: Size, destination: &Texture, destination_slice: usize, destination_level: usize, destination_origin: Origin)

BlitCommandEncoder.fill_buffer

Function ยท Source

Set length bytes starting at offset to value.

pub fn fill_buffer(&self, buffer: &Buffer, offset: usize, length: usize, value: u8)

BlitCommandEncoder.generate_mipmaps

Function ยท Source

Fill every mipmap level below the first from the one above it.

pub fn generate_mipmaps(&self, texture: &Texture)

BlitCommandEncoder.synchronize_buffer

Function ยท Source

Copy a managed bufferโ€™s GPU changes back to its CPU copy.

pub fn synchronize_buffer(&self, buffer: &Buffer)

BlitCommandEncoder.synchronize_texture

Function ยท Source

pub fn synchronize_texture(&self, texture: &Texture)

BlitCommandEncoder.update_fence

Function ยท Source

pub fn update_fence(&self, fence: &Fence)

BlitCommandEncoder.wait_for_fence

Function ยท Source

pub fn wait_for_fence(&self, fence: &Fence)

BlitCommandEncoder.end_encoding

Function ยท Source

pub fn end_encoding(self)

Buffer

Struct ยท Source

MTLBuffer: untyped GPU memory. Shared and managed buffers are also visible to the CPU through read, write and contents.

@unsafe_send
@unsafe_sync
pub unsafe struct Buffer {
    // Private implementation fields omitted.
}

Buffer.from_object

Function ยท Source

Safety: object is an MTLBuffer.

pub unsafe fn from_object(object: objc.Object) -> Buffer

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Buffer.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

Buffer.clone

Function ยท Source

pub fn clone(&self) -> Buffer

Buffer.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

Buffer.label

Function ยท Source

pub fn label(&self) -> Option<objc.NSString>

Buffer.len

Function ยท Source

The size in bytes.

pub fn len(&self) -> usize

Buffer.resource_options

Function ยท Source

pub fn resource_options(&self) -> ResourceOptions

Buffer.storage_mode

Function ยท Source

pub fn storage_mode(&self) -> StorageMode

Buffer.gpu_address

Function ยท Source

The bufferโ€™s address for argument buffers and pointers in shaders.

pub fn gpu_address(&self) -> u64

Buffer.contents

Function ยท Source

The CPU address of the first byte, or null for a private buffer. The memory stays valid while the buffer is alive; the GPU may access it concurrently, so synchronize through command buffer completion.

pub fn contents(&self) -> *mut u8

Buffer.write

Function ยท Source

Copy bytes into the buffer at offset. Err(InvalidInput) if the range does not fit or the buffer is private.

pub fn write(&self, offset: usize, bytes: &[u8]) -> void!Error

Buffer.read

Function ยท Source

Copy bytes starting at offset out of the buffer to fill out.

pub fn read(&self, offset: usize, out: &mut[u8]) -> void!Error

Buffer.write_f32

Function ยท Source

Native-endian f32 and u32 forms of write and read, for shader data.

pub fn write_f32(&self, offset: usize, values: &[f32]) -> void!Error

Buffer.read_f32

Function ยท Source

pub fn read_f32(&self, offset: usize, out: &mut[f32]) -> void!Error

Buffer.write_u32

Function ยท Source

pub fn write_u32(&self, offset: usize, values: &[u32]) -> void!Error

Buffer.read_u32

Function ยท Source

pub fn read_u32(&self, offset: usize, out: &mut[u32]) -> void!Error

Buffer.did_modify_range

Function ยท Source

Tell Metal the CPU changed these bytes of a managed buffer.

pub fn did_modify_range(&self, offset: usize, length: usize)

Texture

Struct ยท Source

MTLTexture: formatted image memory.

@unsafe_send
@unsafe_sync
pub unsafe struct Texture {
    // Private implementation fields omitted.
}

Texture.from_object

Function ยท Source

Safety: object is an MTLTexture.

pub unsafe fn from_object(object: objc.Object) -> Texture

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Texture.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

Texture.clone

Function ยท Source

pub fn clone(&self) -> Texture

Texture.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

Texture.label

Function ยท Source

pub fn label(&self) -> Option<objc.NSString>

Texture.width

Function ยท Source

pub fn width(&self) -> usize

Texture.height

Function ยท Source

pub fn height(&self) -> usize

Texture.depth

Function ยท Source

pub fn depth(&self) -> usize

Texture.mipmap_level_count

Function ยท Source

pub fn mipmap_level_count(&self) -> usize

Texture.array_length

Function ยท Source

pub fn array_length(&self) -> usize

Texture.sample_count

Function ยท Source

pub fn sample_count(&self) -> usize

Texture.pixel_format

Function ยท Source

pub fn pixel_format(&self) -> PixelFormat

Texture.texture_type

Function ยท Source

pub fn texture_type(&self) -> TextureType

Texture.usage

Function ยท Source

pub fn usage(&self) -> TextureUsage

Texture.storage_mode

Function ยท Source

pub fn storage_mode(&self) -> StorageMode

Texture.write_pixels

Function ยท Source

Copy pixels from bytes into region of a CPU-accessible texture. Rows are bytes_per_row apart and images bytes_per_row * height apart. Compressed, depth-stencil and multisample formats are Unsupported.

pub fn write_pixels(&self, region: Region, level: usize, slice: usize, bytes: &[u8], bytes_per_row: usize) -> void!Error

Texture.read_pixels

Function ยท Source

Copy pixels from region into out, laid out as for write_pixels. The GPU must have finished writing the texture.

pub fn read_pixels(&self, region: Region, level: usize, slice: usize, out: &mut[u8], bytes_per_row: usize) -> void!Error

Texture.replace_region

Function ยท Source

Copy any textureโ€™s pixels without checks, for formats write_pixels does not size, such as compressed blocks.

Safety: the region, level and slice lie within the texture, and bytes holds every row and image the copy reads at these strides.

pub unsafe fn replace_region(&self, region: Region, level: usize, slice: usize, bytes: *const u8, bytes_per_row: usize, bytes_per_image: usize)

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Texture.get_bytes

Function ยท Source

Safety: as for replace_region, with bytes writable.

pub unsafe fn get_bytes(&self, bytes: *mut u8, bytes_per_row: usize, bytes_per_image: usize, region: Region, level: usize, slice: usize)

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Texture.new_view

Function ยท Source

The same pixels read as another compatible format; the texture needs TEXTURE_USAGE_PIXEL_FORMAT_VIEW unless only sRGB-ness changes.

pub fn new_view(&self, format: PixelFormat) -> Texture!Error

Texture.new_view_of

Function ยท Source

A view of some mipmap levels and slices, possibly as another type.

pub fn new_view_of(&self, format: PixelFormat, texture_type: TextureType, first_level: usize, level_count: usize, first_slice: usize, slice_count: usize) -> Texture!Error

pixel_size

Function ยท Source

Bytes per pixel of an uncompressed color, depth or stencil format that CPU copies support; 0 for compressed, packed-YUV, combined depth-stencil, and unknown formats.

pub fn pixel_size(format: PixelFormat) -> usize

TextureDescriptor

Struct ยท Source

MTLTextureDescriptor: what Device.new_texture creates. A new descriptor describes a 1x1 2D RGBA8 texture with one level, read by shaders.

pub struct TextureDescriptor {
    // Private implementation fields omitted.
}

TextureDescriptor.new

Function ยท Source

pub fn new() -> TextureDescriptor!Error

TextureDescriptor.new_2d

Function ยท Source

A 2D texture of width x height pixels.

pub fn new_2d(format: PixelFormat, width: usize, height: usize, usage: TextureUsage) -> TextureDescriptor!Error

TextureDescriptor.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

TextureDescriptor.set_texture_type

Function ยท Source

pub fn set_texture_type(&self, texture_type: TextureType)

TextureDescriptor.set_pixel_format

Function ยท Source

pub fn set_pixel_format(&self, format: PixelFormat)

TextureDescriptor.set_width

Function ยท Source

pub fn set_width(&self, width: usize)

TextureDescriptor.set_height

Function ยท Source

pub fn set_height(&self, height: usize)

TextureDescriptor.set_depth

Function ยท Source

pub fn set_depth(&self, depth: usize)

TextureDescriptor.set_mipmap_level_count

Function ยท Source

pub fn set_mipmap_level_count(&self, count: usize)

TextureDescriptor.set_sample_count

Function ยท Source

pub fn set_sample_count(&self, count: usize)

TextureDescriptor.set_array_length

Function ยท Source

pub fn set_array_length(&self, length: usize)

TextureDescriptor.set_usage

Function ยท Source

pub fn set_usage(&self, usage: TextureUsage)

TextureDescriptor.set_storage_mode

Function ยท Source

pub fn set_storage_mode(&self, mode: StorageMode)

TextureDescriptor.set_resource_options

Function ยท Source

Storage, CPU cache and hazard tracking modes as RESOURCE_* options.

pub fn set_resource_options(&self, options: ResourceOptions)

SamplerDescriptor

Struct ยท Source

MTLSamplerDescriptor: how shaders filter and address a texture. A new descriptor samples the nearest texel and clamps to the edge.

pub struct SamplerDescriptor {
    // Private implementation fields omitted.
}

SamplerDescriptor.new

Function ยท Source

pub fn new() -> SamplerDescriptor!Error

SamplerDescriptor.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

SamplerDescriptor.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

SamplerDescriptor.set_min_filter

Function ยท Source

pub fn set_min_filter(&self, filter: SamplerMinMagFilter)

SamplerDescriptor.set_mag_filter

Function ยท Source

pub fn set_mag_filter(&self, filter: SamplerMinMagFilter)

SamplerDescriptor.set_mip_filter

Function ยท Source

pub fn set_mip_filter(&self, filter: SamplerMipFilter)

SamplerDescriptor.set_s_address_mode

Function ยท Source

pub fn set_s_address_mode(&self, mode: SamplerAddressMode)

SamplerDescriptor.set_t_address_mode

Function ยท Source

pub fn set_t_address_mode(&self, mode: SamplerAddressMode)

SamplerDescriptor.set_r_address_mode

Function ยท Source

pub fn set_r_address_mode(&self, mode: SamplerAddressMode)

SamplerDescriptor.set_max_anisotropy

Function ยท Source

1 through 16.

pub fn set_max_anisotropy(&self, value: usize)

SamplerDescriptor.set_compare_function

Function ยท Source

Make this a comparison sampler for depth textures.

pub fn set_compare_function(&self, function: CompareFunction)

SamplerDescriptor.set_border_color

Function ยท Source

pub fn set_border_color(&self, color: SamplerBorderColor)

SamplerDescriptor.set_lod_min_clamp

Function ยท Source

pub fn set_lod_min_clamp(&self, value: f32)

SamplerDescriptor.set_lod_max_clamp

Function ยท Source

pub fn set_lod_max_clamp(&self, value: f32)

SamplerDescriptor.set_normalized_coordinates

Function ยท Source

False addresses texels in pixels instead of 0 through 1.

pub fn set_normalized_coordinates(&self, value: bool)

SamplerDescriptor.set_support_argument_buffers

Function ยท Source

pub fn set_support_argument_buffers(&self, value: bool)

SamplerState

Struct ยท Source

MTLSamplerState: an immutable sampler made from a SamplerDescriptor.

@unsafe_send
@unsafe_sync
pub unsafe struct SamplerState {
    // Private implementation fields omitted.
}

SamplerState.from_object

Function ยท Source

Safety: object is an MTLSamplerState.

pub unsafe fn from_object(object: objc.Object) -> SamplerState

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

SamplerState.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

SamplerState.clone

Function ยท Source

pub fn clone(&self) -> SamplerState

CompileOptions

Struct ยท Source

MTLCompileOptions: how new_library_with_source compiles. A new value uses the newest language version and fast math.

pub struct CompileOptions {
    // Private implementation fields omitted.
}

CompileOptions.new

Function ยท Source

pub fn new() -> CompileOptions!Error

CompileOptions.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

CompileOptions.set_math_mode

Function ยท Source

MATH_MODE_SAFE follows IEEE 754; fast math may reorder and drop special cases. Before macOS 15 only safe versus fast is available.

pub fn set_math_mode(&self, mode: MathMode)

CompileOptions.set_language_version

Function ยท Source

pub fn set_language_version(&self, version: LanguageVersion)

CompileOptions.set_preserve_invariance

Function ยท Source

Compute positions identically in every pipeline using them, as multi-pass depth techniques need.

pub fn set_preserve_invariance(&self, value: bool)

Library

Struct ยท Source

MTLLibrary: compiled shader functions.

@unsafe_send
@unsafe_sync
pub unsafe struct Library {
    // Private implementation fields omitted.
}

Library.from_object

Function ยท Source

Safety: object is an MTLLibrary.

pub unsafe fn from_object(object: objc.Object) -> Library

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Library.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

Library.clone

Function ยท Source

pub fn clone(&self) -> Library

Library.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

Library.new_function

Function ยท Source

The function with this name. Err(NotFound) if there is none.

pub fn new_function(&self, name: &str) -> Function!Error

Library.function_names

Function ยท Source

The names of every function, as an array of NSString.

pub fn function_names(&self) -> Option<objc.NSArray>

FunctionType

Type alias ยท Source

MTLFunctionType.

pub type FunctionType = usize

FUNCTION_TYPE_VERTEX

Constant ยท Source

pub const FUNCTION_TYPE_VERTEX: FunctionType = 1

FUNCTION_TYPE_FRAGMENT

Constant ยท Source

pub const FUNCTION_TYPE_FRAGMENT: FunctionType = 2

FUNCTION_TYPE_KERNEL

Constant ยท Source

pub const FUNCTION_TYPE_KERNEL: FunctionType = 3

Function

Struct ยท Source

MTLFunction: one shader entry point.

@unsafe_send
@unsafe_sync
pub unsafe struct Function {
    // Private implementation fields omitted.
}

Function.from_object

Function ยท Source

Safety: object is an MTLFunction.

pub unsafe fn from_object(object: objc.Object) -> Function

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Function.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

Function.clone

Function ยท Source

pub fn clone(&self) -> Function

Function.name

Function ยท Source

pub fn name(&self) -> Option<objc.NSString>

Function.function_type

Function ยท Source

pub fn function_type(&self) -> FunctionType

ComputePipelineState

Struct ยท Source

MTLComputePipelineState: a compiled compute kernel.

@unsafe_send
@unsafe_sync
pub unsafe struct ComputePipelineState {
    // Private implementation fields omitted.
}

ComputePipelineState.from_object

Function ยท Source

Safety: object is an MTLComputePipelineState.

pub unsafe fn from_object(object: objc.Object) -> ComputePipelineState

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

ComputePipelineState.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

ComputePipelineState.clone

Function ยท Source

pub fn clone(&self) -> ComputePipelineState

ComputePipelineState.max_total_threads_per_threadgroup

Function ยท Source

The most threads one threadgroup of this kernel may have.

pub fn max_total_threads_per_threadgroup(&self) -> usize

ComputePipelineState.thread_execution_width

Function ยท Source

The SIMD width: threadgroup sizes should be a multiple of it.

pub fn thread_execution_width(&self) -> usize

ComputePipelineState.static_threadgroup_memory_length

Function ยท Source

pub fn static_threadgroup_memory_length(&self) -> usize

RenderPipelineDescriptor

Struct ยท Source

MTLRenderPipelineDescriptor: shaders and fixed-function state for Device.new_render_pipeline_state.

pub struct RenderPipelineDescriptor {
    // Private implementation fields omitted.
}

RenderPipelineDescriptor.new

Function ยท Source

pub fn new() -> RenderPipelineDescriptor!Error

RenderPipelineDescriptor.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

RenderPipelineDescriptor.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

RenderPipelineDescriptor.set_vertex_function

Function ยท Source

pub fn set_vertex_function(&self, function: &Function)

RenderPipelineDescriptor.set_fragment_function

Function ยท Source

pub fn set_fragment_function(&self, function: &Function)

RenderPipelineDescriptor.set_vertex_descriptor

Function ยท Source

How [[stage_in]] vertex attributes are fetched from buffers.

pub fn set_vertex_descriptor(&self, descriptor: &VertexDescriptor)

RenderPipelineDescriptor.color_attachment

Function ยท Source

Color attachment index (below MAX_COLOR_ATTACHMENTS); changes to it change this descriptor.

pub fn color_attachment(&self, index: usize) -> RenderPipelineColorAttachment!Error

RenderPipelineDescriptor.set_depth_attachment_pixel_format

Function ยท Source

pub fn set_depth_attachment_pixel_format(&self, format: PixelFormat)

RenderPipelineDescriptor.set_stencil_attachment_pixel_format

Function ยท Source

pub fn set_stencil_attachment_pixel_format(&self, format: PixelFormat)

RenderPipelineDescriptor.set_raster_sample_count

Function ยท Source

pub fn set_raster_sample_count(&self, count: usize)

RenderPipelineDescriptor.set_input_primitive_topology

Function ยท Source

pub fn set_input_primitive_topology(&self, topology: PrimitiveTopologyClass)

RenderPipelineDescriptor.set_alpha_to_coverage_enabled

Function ยท Source

pub fn set_alpha_to_coverage_enabled(&self, value: bool)

RenderPipelineDescriptor.set_rasterization_enabled

Function ยท Source

False runs only the vertex stage, for vertex shaders that write buffers.

pub fn set_rasterization_enabled(&self, value: bool)

RenderPipelineColorAttachment

Struct ยท Source

MTLRenderPipelineColorAttachmentDescriptor: one render targetโ€™s format and blending.

pub struct RenderPipelineColorAttachment {
    // Private implementation fields omitted.
}

RenderPipelineColorAttachment.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

RenderPipelineColorAttachment.set_pixel_format

Function ยท Source

pub fn set_pixel_format(&self, format: PixelFormat)

RenderPipelineColorAttachment.set_blending_enabled

Function ยท Source

pub fn set_blending_enabled(&self, value: bool)

RenderPipelineColorAttachment.set_source_rgb_blend_factor

Function ยท Source

pub fn set_source_rgb_blend_factor(&self, factor: BlendFactor)

RenderPipelineColorAttachment.set_destination_rgb_blend_factor

Function ยท Source

pub fn set_destination_rgb_blend_factor(&self, factor: BlendFactor)

RenderPipelineColorAttachment.set_rgb_blend_operation

Function ยท Source

pub fn set_rgb_blend_operation(&self, operation: BlendOperation)

RenderPipelineColorAttachment.set_source_alpha_blend_factor

Function ยท Source

pub fn set_source_alpha_blend_factor(&self, factor: BlendFactor)

RenderPipelineColorAttachment.set_destination_alpha_blend_factor

Function ยท Source

pub fn set_destination_alpha_blend_factor(&self, factor: BlendFactor)

RenderPipelineColorAttachment.set_alpha_blend_operation

Function ยท Source

pub fn set_alpha_blend_operation(&self, operation: BlendOperation)

RenderPipelineColorAttachment.set_write_mask

Function ยท Source

pub fn set_write_mask(&self, mask: ColorWriteMask)

RenderPipelineState

Struct ยท Source

MTLRenderPipelineState: compiled shaders and fixed-function state.

@unsafe_send
@unsafe_sync
pub unsafe struct RenderPipelineState {
    // Private implementation fields omitted.
}

RenderPipelineState.from_object

Function ยท Source

Safety: object is an MTLRenderPipelineState.

pub unsafe fn from_object(object: objc.Object) -> RenderPipelineState

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

RenderPipelineState.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

RenderPipelineState.clone

Function ยท Source

pub fn clone(&self) -> RenderPipelineState

VertexDescriptor

Struct ยท Source

MTLVertexDescriptor: the format and source buffer of each [[attribute(n)]].

pub struct VertexDescriptor {
    // Private implementation fields omitted.
}

VertexDescriptor.new

Function ยท Source

pub fn new() -> VertexDescriptor!Error

VertexDescriptor.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

VertexDescriptor.set_attribute

Function ยท Source

Describe [[attribute(index)]]: a format value offset bytes into each element of [[buffer(buffer_index)]].

pub fn set_attribute(&self, index: usize, format: VertexFormat, offset: usize, buffer_index: usize) -> void!Error

VertexDescriptor.set_layout

Function ยท Source

Describe [[buffer(index)]]: elements stride bytes apart, advancing per vertex or every step_rate instances.

pub fn set_layout(&self, index: usize, stride: usize, step_function: VertexStepFunction, step_rate: usize) -> void!Error

DepthStencilDescriptor

Struct ยท Source

MTLDepthStencilDescriptor: depth and stencil tests. A new descriptor always passes and writes nothing.

pub struct DepthStencilDescriptor {
    // Private implementation fields omitted.
}

DepthStencilDescriptor.new

Function ยท Source

pub fn new() -> DepthStencilDescriptor!Error

DepthStencilDescriptor.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

DepthStencilDescriptor.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

DepthStencilDescriptor.set_depth_compare_function

Function ยท Source

pub fn set_depth_compare_function(&self, function: CompareFunction)

DepthStencilDescriptor.set_depth_write_enabled

Function ยท Source

pub fn set_depth_write_enabled(&self, value: bool)

DepthStencilDescriptor.set_front_face_stencil

Function ยท Source

pub fn set_front_face_stencil(&self, stencil: &StencilDescriptor)

DepthStencilDescriptor.set_back_face_stencil

Function ยท Source

pub fn set_back_face_stencil(&self, stencil: &StencilDescriptor)

StencilDescriptor

Struct ยท Source

MTLStencilDescriptor: the stencil test for one face.

pub struct StencilDescriptor {
    // Private implementation fields omitted.
}

StencilDescriptor.new

Function ยท Source

pub fn new() -> StencilDescriptor!Error

StencilDescriptor.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

StencilDescriptor.set_stencil_compare_function

Function ยท Source

pub fn set_stencil_compare_function(&self, function: CompareFunction)

StencilDescriptor.set_stencil_failure_operation

Function ยท Source

pub fn set_stencil_failure_operation(&self, operation: StencilOperation)

StencilDescriptor.set_depth_failure_operation

Function ยท Source

pub fn set_depth_failure_operation(&self, operation: StencilOperation)

StencilDescriptor.set_depth_stencil_pass_operation

Function ยท Source

pub fn set_depth_stencil_pass_operation(&self, operation: StencilOperation)

StencilDescriptor.set_read_mask

Function ยท Source

pub fn set_read_mask(&self, mask: u32)

StencilDescriptor.set_write_mask

Function ยท Source

pub fn set_write_mask(&self, mask: u32)

DepthStencilState

Struct ยท Source

MTLDepthStencilState: immutable depth and stencil tests.

@unsafe_send
@unsafe_sync
pub unsafe struct DepthStencilState {
    // Private implementation fields omitted.
}

DepthStencilState.from_object

Function ยท Source

Safety: object is an MTLDepthStencilState.

pub unsafe fn from_object(object: objc.Object) -> DepthStencilState

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

DepthStencilState.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

DepthStencilState.clone

Function ยท Source

pub fn clone(&self) -> DepthStencilState

RenderPassDescriptor

Struct ยท Source

MTLRenderPassDescriptor: the attachments one render pass draws into and what happens to them at its start and end.

pub struct RenderPassDescriptor {
    // Private implementation fields omitted.
}

RenderPassDescriptor.new

Function ยท Source

pub fn new() -> RenderPassDescriptor!Error

RenderPassDescriptor.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

RenderPassDescriptor.color_attachment

Function ยท Source

Color attachment index (below MAX_COLOR_ATTACHMENTS); changes to it change this descriptor.

pub fn color_attachment(&self, index: usize) -> RenderPassColorAttachment!Error

RenderPassDescriptor.depth_attachment

Function ยท Source

pub fn depth_attachment(&self) -> RenderPassDepthAttachment!Error

RenderPassDescriptor.stencil_attachment

Function ยท Source

pub fn stencil_attachment(&self) -> RenderPassStencilAttachment!Error

RenderPassDescriptor.set_render_target_width

Function ยท Source

The size of a pass without attachments.

pub fn set_render_target_width(&self, width: usize)

RenderPassDescriptor.set_render_target_height

Function ยท Source

pub fn set_render_target_height(&self, height: usize)

RenderPassDescriptor.set_render_target_array_length

Function ยท Source

The number of layers for layered rendering into array textures.

pub fn set_render_target_array_length(&self, length: usize)

RenderPassDescriptor.set_default_raster_sample_count

Function ยท Source

pub fn set_default_raster_sample_count(&self, count: usize)

RenderPassColorAttachment

Struct ยท Source

MTLRenderPassColorAttachmentDescriptor.

pub struct RenderPassColorAttachment {
    // Private implementation fields omitted.
}

RenderPassColorAttachment.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

RenderPassColorAttachment.set_texture

Function ยท Source

pub fn set_texture(&self, texture: &Texture)

RenderPassColorAttachment.set_resolve_texture

Function ยท Source

Where a multisample attachment resolves to, with STORE_ACTION_MULTISAMPLE_RESOLVE.

pub fn set_resolve_texture(&self, texture: &Texture)

RenderPassColorAttachment.set_place

Function ยท Source

Which mipmap level, array slice and 3D depth plane to draw into.

pub fn set_place(&self, level: usize, slice: usize, depth_plane: usize)

RenderPassColorAttachment.set_resolve_place

Function ยท Source

pub fn set_resolve_place(&self, level: usize, slice: usize)

RenderPassColorAttachment.set_load_action

Function ยท Source

pub fn set_load_action(&self, action: LoadAction)

RenderPassColorAttachment.set_store_action

Function ยท Source

pub fn set_store_action(&self, action: StoreAction)

RenderPassColorAttachment.set_clear_color

Function ยท Source

pub fn set_clear_color(&self, color: ClearColor)

RenderPassDepthAttachment

Struct ยท Source

MTLRenderPassDepthAttachmentDescriptor.

pub struct RenderPassDepthAttachment {
    // Private implementation fields omitted.
}

RenderPassDepthAttachment.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

RenderPassDepthAttachment.set_texture

Function ยท Source

pub fn set_texture(&self, texture: &Texture)

RenderPassDepthAttachment.set_resolve_texture

Function ยท Source

pub fn set_resolve_texture(&self, texture: &Texture)

RenderPassDepthAttachment.set_place

Function ยท Source

pub fn set_place(&self, level: usize, slice: usize, depth_plane: usize)

RenderPassDepthAttachment.set_load_action

Function ยท Source

pub fn set_load_action(&self, action: LoadAction)

RenderPassDepthAttachment.set_store_action

Function ยท Source

pub fn set_store_action(&self, action: StoreAction)

RenderPassDepthAttachment.set_clear_depth

Function ยท Source

The depth a clear load action writes, 0 through 1.

pub fn set_clear_depth(&self, depth: f64)

RenderPassStencilAttachment

Struct ยท Source

MTLRenderPassStencilAttachmentDescriptor.

pub struct RenderPassStencilAttachment {
    // Private implementation fields omitted.
}

RenderPassStencilAttachment.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

RenderPassStencilAttachment.set_texture

Function ยท Source

pub fn set_texture(&self, texture: &Texture)

RenderPassStencilAttachment.set_place

Function ยท Source

pub fn set_place(&self, level: usize, slice: usize, depth_plane: usize)

RenderPassStencilAttachment.set_load_action

Function ยท Source

pub fn set_load_action(&self, action: LoadAction)

RenderPassStencilAttachment.set_store_action

Function ยท Source

pub fn set_store_action(&self, action: StoreAction)

RenderPassStencilAttachment.set_clear_stencil

Function ยท Source

pub fn set_clear_stencil(&self, value: u32)

Fence

Struct ยท Source

MTLFence: orders resource accesses between encoders of one queue.

@unsafe_send
@unsafe_sync
pub unsafe struct Fence {
    // Private implementation fields omitted.
}

Fence.from_object

Function ยท Source

Safety: object is an MTLFence.

pub unsafe fn from_object(object: objc.Object) -> Fence

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Fence.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

Fence.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

Event

Struct ยท Source

MTLEvent: orders command buffers on one device.

@unsafe_send
@unsafe_sync
pub unsafe struct Event {
    // Private implementation fields omitted.
}

Event.from_object

Function ยท Source

Safety: object is an MTLEvent.

pub unsafe fn from_object(object: objc.Object) -> Event

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Event.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

Event.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

SharedEvent

Struct ยท Source

MTLSharedEvent: an event whose value the CPU can read and set, for waiting on the GPU without blocking in wait_until_completed.

@unsafe_send
@unsafe_sync
pub unsafe struct SharedEvent {
    // Private implementation fields omitted.
}

SharedEvent.from_object

Function ยท Source

Safety: object is an MTLSharedEvent.

pub unsafe fn from_object(object: objc.Object) -> SharedEvent

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

SharedEvent.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

SharedEvent.set_label

Function ยท Source

pub fn set_label(&self, text: &str)

SharedEvent.signaled_value

Function ยท Source

pub fn signaled_value(&self) -> u64

SharedEvent.set_signaled_value

Function ยท Source

pub fn set_signaled_value(&self, value: u64)

MetalLayer

Struct ยท Source

CAMetalLayer: a Core Animation layer whose contents are Metal textures, handed out one frame at a time by next_drawable.

pub struct MetalLayer {
    // Private implementation fields omitted.
}

MetalLayer.new

Function ยท Source

pub fn new() -> MetalLayer!Error

MetalLayer.from_object

Function ยท Source

Safety: object is a CAMetalLayer.

pub unsafe fn from_object(object: objc.Object) -> MetalLayer

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

MetalLayer.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

MetalLayer.set_device

Function ยท Source

pub fn set_device(&self, device: &Device)

MetalLayer.set_pixel_format

Function ยท Source

PIXEL_FORMAT_BGRA8_UNORM (the default), its sRGB form, PIXEL_FORMAT_RGBA16_FLOAT, PIXEL_FORMAT_BGR10A2_UNORM or an XR format.

pub fn set_pixel_format(&self, format: PixelFormat)

MetalLayer.set_framebuffer_only

Function ยท Source

True (the default) allows drawables only as render targets, which is faster; false also allows sampling and blits.

pub fn set_framebuffer_only(&self, value: bool)

MetalLayer.set_drawable_size

Function ยท Source

The drawablesโ€™ size in pixels.

pub fn set_drawable_size(&self, width: f64, height: f64)

MetalLayer.drawable_size

Function ยท Source

pub fn drawable_size(&self) -> CGSize

MetalLayer.set_maximum_drawable_count

Function ยท Source

2 or 3 (the default) drawables in flight.

pub fn set_maximum_drawable_count(&self, count: usize)

MetalLayer.set_display_sync_enabled

Function ยท Source

False presents immediately instead of at the displayโ€™s refresh.

pub fn set_display_sync_enabled(&self, value: bool)

MetalLayer.set_contents_scale

Function ยท Source

Pixels per point, such as 2 on a Retina display.

pub fn set_contents_scale(&self, scale: f64)

MetalLayer.set_opaque

Function ยท Source

pub fn set_opaque(&self, value: bool)

MetalLayer.next_drawable

Function ยท Source

The next texture to draw a frame into. Waits up to a second for one to become free; none if none did or the layer has no device or size.

pub fn next_drawable(&self) -> Option<Drawable>

MetalLayer.attach_to_view

Function ยท Source

Make this layer the backing layer of an AppKit view, which then shows whatever is presented to it.

Safety: view is a live NSView, and the call is on the main thread.

pub unsafe fn attach_to_view(&self, view: objc.Id)

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Drawable

Struct ยท Source

CAMetalDrawable: one frame of a MetalLayer.

pub struct Drawable {
    // Private implementation fields omitted.
}

Drawable.from_object

Function ยท Source

Safety: object is a CAMetalDrawable.

pub unsafe fn from_object(object: objc.Object) -> Drawable

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Drawable.as_object

Function ยท Source

pub fn as_object(&self) -> &objc.Object

Drawable.texture

Function ยท Source

The texture to render the frame into.

pub fn texture(&self) -> Texture!Error

Drawable.present

Function ยท Source

Show the frame now. Prefer CommandBuffer.present_drawable, which waits for the rendering commands to be scheduled.

pub fn present(&self)

PixelFormat

Type alias ยท Source

Metalโ€™s enumerations, checked against the SDK headers by the test suite. MTLPixelFormat.

pub type PixelFormat = usize

PIXEL_FORMAT_INVALID

Constant ยท Source

pub const PIXEL_FORMAT_INVALID: PixelFormat = 0

PIXEL_FORMAT_A8_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_A8_UNORM: PixelFormat = 1

PIXEL_FORMAT_R8_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_R8_UNORM: PixelFormat = 10

PIXEL_FORMAT_R8_UNORM_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_R8_UNORM_SRGB: PixelFormat = 11

PIXEL_FORMAT_R8_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_R8_SNORM: PixelFormat = 12

PIXEL_FORMAT_R8_UINT

Constant ยท Source

pub const PIXEL_FORMAT_R8_UINT: PixelFormat = 13

PIXEL_FORMAT_R8_SINT

Constant ยท Source

pub const PIXEL_FORMAT_R8_SINT: PixelFormat = 14

PIXEL_FORMAT_R16_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_R16_UNORM: PixelFormat = 20

PIXEL_FORMAT_R16_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_R16_SNORM: PixelFormat = 22

PIXEL_FORMAT_R16_UINT

Constant ยท Source

pub const PIXEL_FORMAT_R16_UINT: PixelFormat = 23

PIXEL_FORMAT_R16_SINT

Constant ยท Source

pub const PIXEL_FORMAT_R16_SINT: PixelFormat = 24

PIXEL_FORMAT_R16_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_R16_FLOAT: PixelFormat = 25

PIXEL_FORMAT_RG8_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_RG8_UNORM: PixelFormat = 30

PIXEL_FORMAT_RG8_UNORM_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_RG8_UNORM_SRGB: PixelFormat = 31

PIXEL_FORMAT_RG8_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_RG8_SNORM: PixelFormat = 32

PIXEL_FORMAT_RG8_UINT

Constant ยท Source

pub const PIXEL_FORMAT_RG8_UINT: PixelFormat = 33

PIXEL_FORMAT_RG8_SINT

Constant ยท Source

pub const PIXEL_FORMAT_RG8_SINT: PixelFormat = 34

PIXEL_FORMAT_B5G6R5_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_B5G6R5_UNORM: PixelFormat = 40

PIXEL_FORMAT_A1BGR5_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_A1BGR5_UNORM: PixelFormat = 41

PIXEL_FORMAT_ABGR4_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_ABGR4_UNORM: PixelFormat = 42

PIXEL_FORMAT_BGR5A1_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_BGR5A1_UNORM: PixelFormat = 43

PIXEL_FORMAT_R32_UINT

Constant ยท Source

pub const PIXEL_FORMAT_R32_UINT: PixelFormat = 53

PIXEL_FORMAT_R32_SINT

Constant ยท Source

pub const PIXEL_FORMAT_R32_SINT: PixelFormat = 54

PIXEL_FORMAT_R32_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_R32_FLOAT: PixelFormat = 55

PIXEL_FORMAT_RG16_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_RG16_UNORM: PixelFormat = 60

PIXEL_FORMAT_RG16_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_RG16_SNORM: PixelFormat = 62

PIXEL_FORMAT_RG16_UINT

Constant ยท Source

pub const PIXEL_FORMAT_RG16_UINT: PixelFormat = 63

PIXEL_FORMAT_RG16_SINT

Constant ยท Source

pub const PIXEL_FORMAT_RG16_SINT: PixelFormat = 64

PIXEL_FORMAT_RG16_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_RG16_FLOAT: PixelFormat = 65

PIXEL_FORMAT_RGBA8_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_RGBA8_UNORM: PixelFormat = 70

PIXEL_FORMAT_RGBA8_UNORM_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_RGBA8_UNORM_SRGB: PixelFormat = 71

PIXEL_FORMAT_RGBA8_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_RGBA8_SNORM: PixelFormat = 72

PIXEL_FORMAT_RGBA8_UINT

Constant ยท Source

pub const PIXEL_FORMAT_RGBA8_UINT: PixelFormat = 73

PIXEL_FORMAT_RGBA8_SINT

Constant ยท Source

pub const PIXEL_FORMAT_RGBA8_SINT: PixelFormat = 74

PIXEL_FORMAT_BGRA8_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_BGRA8_UNORM: PixelFormat = 80

PIXEL_FORMAT_BGRA8_UNORM_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_BGRA8_UNORM_SRGB: PixelFormat = 81

PIXEL_FORMAT_RGB10A2_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_RGB10A2_UNORM: PixelFormat = 90

PIXEL_FORMAT_RGB10A2_UINT

Constant ยท Source

pub const PIXEL_FORMAT_RGB10A2_UINT: PixelFormat = 91

PIXEL_FORMAT_RG11B10_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_RG11B10_FLOAT: PixelFormat = 92

PIXEL_FORMAT_RGB9E5_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_RGB9E5_FLOAT: PixelFormat = 93

PIXEL_FORMAT_BGR10A2_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_BGR10A2_UNORM: PixelFormat = 94

PIXEL_FORMAT_BGR10_XR

Constant ยท Source

pub const PIXEL_FORMAT_BGR10_XR: PixelFormat = 554

PIXEL_FORMAT_BGR10_XR_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_BGR10_XR_SRGB: PixelFormat = 555

PIXEL_FORMAT_RG32_UINT

Constant ยท Source

pub const PIXEL_FORMAT_RG32_UINT: PixelFormat = 103

PIXEL_FORMAT_RG32_SINT

Constant ยท Source

pub const PIXEL_FORMAT_RG32_SINT: PixelFormat = 104

PIXEL_FORMAT_RG32_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_RG32_FLOAT: PixelFormat = 105

PIXEL_FORMAT_RGBA16_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_RGBA16_UNORM: PixelFormat = 110

PIXEL_FORMAT_RGBA16_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_RGBA16_SNORM: PixelFormat = 112

PIXEL_FORMAT_RGBA16_UINT

Constant ยท Source

pub const PIXEL_FORMAT_RGBA16_UINT: PixelFormat = 113

PIXEL_FORMAT_RGBA16_SINT

Constant ยท Source

pub const PIXEL_FORMAT_RGBA16_SINT: PixelFormat = 114

PIXEL_FORMAT_RGBA16_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_RGBA16_FLOAT: PixelFormat = 115

PIXEL_FORMAT_BGRA10_XR

Constant ยท Source

pub const PIXEL_FORMAT_BGRA10_XR: PixelFormat = 552

PIXEL_FORMAT_BGRA10_XR_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_BGRA10_XR_SRGB: PixelFormat = 553

PIXEL_FORMAT_RGBA32_UINT

Constant ยท Source

pub const PIXEL_FORMAT_RGBA32_UINT: PixelFormat = 123

PIXEL_FORMAT_RGBA32_SINT

Constant ยท Source

pub const PIXEL_FORMAT_RGBA32_SINT: PixelFormat = 124

PIXEL_FORMAT_RGBA32_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_RGBA32_FLOAT: PixelFormat = 125

PIXEL_FORMAT_BC1_RGBA

Constant ยท Source

pub const PIXEL_FORMAT_BC1_RGBA: PixelFormat = 130

PIXEL_FORMAT_BC1_RGBA_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_BC1_RGBA_SRGB: PixelFormat = 131

PIXEL_FORMAT_BC2_RGBA

Constant ยท Source

pub const PIXEL_FORMAT_BC2_RGBA: PixelFormat = 132

PIXEL_FORMAT_BC2_RGBA_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_BC2_RGBA_SRGB: PixelFormat = 133

PIXEL_FORMAT_BC3_RGBA

Constant ยท Source

pub const PIXEL_FORMAT_BC3_RGBA: PixelFormat = 134

PIXEL_FORMAT_BC3_RGBA_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_BC3_RGBA_SRGB: PixelFormat = 135

PIXEL_FORMAT_BC4_R_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_BC4_R_UNORM: PixelFormat = 140

PIXEL_FORMAT_BC4_R_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_BC4_R_SNORM: PixelFormat = 141

PIXEL_FORMAT_BC5_RG_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_BC5_RG_UNORM: PixelFormat = 142

PIXEL_FORMAT_BC5_RG_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_BC5_RG_SNORM: PixelFormat = 143

PIXEL_FORMAT_BC6H_RGB_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_BC6H_RGB_FLOAT: PixelFormat = 150

PIXEL_FORMAT_BC6H_RGB_UFLOAT

Constant ยท Source

pub const PIXEL_FORMAT_BC6H_RGB_UFLOAT: PixelFormat = 151

PIXEL_FORMAT_BC7_RGBA_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_BC7_RGBA_UNORM: PixelFormat = 152

PIXEL_FORMAT_BC7_RGBA_UNORM_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_BC7_RGBA_UNORM_SRGB: PixelFormat = 153

PIXEL_FORMAT_EAC_R11_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_EAC_R11_UNORM: PixelFormat = 170

PIXEL_FORMAT_EAC_R11_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_EAC_R11_SNORM: PixelFormat = 172

PIXEL_FORMAT_EAC_RG11_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_EAC_RG11_UNORM: PixelFormat = 174

PIXEL_FORMAT_EAC_RG11_SNORM

Constant ยท Source

pub const PIXEL_FORMAT_EAC_RG11_SNORM: PixelFormat = 176

PIXEL_FORMAT_EAC_RGBA8

Constant ยท Source

pub const PIXEL_FORMAT_EAC_RGBA8: PixelFormat = 178

PIXEL_FORMAT_EAC_RGBA8_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_EAC_RGBA8_SRGB: PixelFormat = 179

PIXEL_FORMAT_ETC2_RGB8

Constant ยท Source

pub const PIXEL_FORMAT_ETC2_RGB8: PixelFormat = 180

PIXEL_FORMAT_ETC2_RGB8_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ETC2_RGB8_SRGB: PixelFormat = 181

PIXEL_FORMAT_ETC2_RGB8A1

Constant ยท Source

pub const PIXEL_FORMAT_ETC2_RGB8A1: PixelFormat = 182

PIXEL_FORMAT_ETC2_RGB8A1_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ETC2_RGB8A1_SRGB: PixelFormat = 183

PIXEL_FORMAT_ASTC_4X4_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_4X4_SRGB: PixelFormat = 186

PIXEL_FORMAT_ASTC_5X4_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_5X4_SRGB: PixelFormat = 187

PIXEL_FORMAT_ASTC_5X5_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_5X5_SRGB: PixelFormat = 188

PIXEL_FORMAT_ASTC_6X5_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_6X5_SRGB: PixelFormat = 189

PIXEL_FORMAT_ASTC_6X6_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_6X6_SRGB: PixelFormat = 190

PIXEL_FORMAT_ASTC_8X5_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_8X5_SRGB: PixelFormat = 192

PIXEL_FORMAT_ASTC_8X6_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_8X6_SRGB: PixelFormat = 193

PIXEL_FORMAT_ASTC_8X8_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_8X8_SRGB: PixelFormat = 194

PIXEL_FORMAT_ASTC_10X5_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X5_SRGB: PixelFormat = 195

PIXEL_FORMAT_ASTC_10X6_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X6_SRGB: PixelFormat = 196

PIXEL_FORMAT_ASTC_10X8_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X8_SRGB: PixelFormat = 197

PIXEL_FORMAT_ASTC_10X10_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X10_SRGB: PixelFormat = 198

PIXEL_FORMAT_ASTC_12X10_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_12X10_SRGB: PixelFormat = 199

PIXEL_FORMAT_ASTC_12X12_SRGB

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_12X12_SRGB: PixelFormat = 200

PIXEL_FORMAT_ASTC_4X4_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_4X4_LDR: PixelFormat = 204

PIXEL_FORMAT_ASTC_5X4_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_5X4_LDR: PixelFormat = 205

PIXEL_FORMAT_ASTC_5X5_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_5X5_LDR: PixelFormat = 206

PIXEL_FORMAT_ASTC_6X5_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_6X5_LDR: PixelFormat = 207

PIXEL_FORMAT_ASTC_6X6_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_6X6_LDR: PixelFormat = 208

PIXEL_FORMAT_ASTC_8X5_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_8X5_LDR: PixelFormat = 210

PIXEL_FORMAT_ASTC_8X6_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_8X6_LDR: PixelFormat = 211

PIXEL_FORMAT_ASTC_8X8_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_8X8_LDR: PixelFormat = 212

PIXEL_FORMAT_ASTC_10X5_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X5_LDR: PixelFormat = 213

PIXEL_FORMAT_ASTC_10X6_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X6_LDR: PixelFormat = 214

PIXEL_FORMAT_ASTC_10X8_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X8_LDR: PixelFormat = 215

PIXEL_FORMAT_ASTC_10X10_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X10_LDR: PixelFormat = 216

PIXEL_FORMAT_ASTC_12X10_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_12X10_LDR: PixelFormat = 217

PIXEL_FORMAT_ASTC_12X12_LDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_12X12_LDR: PixelFormat = 218

PIXEL_FORMAT_ASTC_4X4_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_4X4_HDR: PixelFormat = 222

PIXEL_FORMAT_ASTC_5X4_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_5X4_HDR: PixelFormat = 223

PIXEL_FORMAT_ASTC_5X5_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_5X5_HDR: PixelFormat = 224

PIXEL_FORMAT_ASTC_6X5_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_6X5_HDR: PixelFormat = 225

PIXEL_FORMAT_ASTC_6X6_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_6X6_HDR: PixelFormat = 226

PIXEL_FORMAT_ASTC_8X5_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_8X5_HDR: PixelFormat = 228

PIXEL_FORMAT_ASTC_8X6_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_8X6_HDR: PixelFormat = 229

PIXEL_FORMAT_ASTC_8X8_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_8X8_HDR: PixelFormat = 230

PIXEL_FORMAT_ASTC_10X5_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X5_HDR: PixelFormat = 231

PIXEL_FORMAT_ASTC_10X6_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X6_HDR: PixelFormat = 232

PIXEL_FORMAT_ASTC_10X8_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X8_HDR: PixelFormat = 233

PIXEL_FORMAT_ASTC_10X10_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_10X10_HDR: PixelFormat = 234

PIXEL_FORMAT_ASTC_12X10_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_12X10_HDR: PixelFormat = 235

PIXEL_FORMAT_ASTC_12X12_HDR

Constant ยท Source

pub const PIXEL_FORMAT_ASTC_12X12_HDR: PixelFormat = 236

PIXEL_FORMAT_GBGR422

Constant ยท Source

pub const PIXEL_FORMAT_GBGR422: PixelFormat = 240

PIXEL_FORMAT_BGRG422

Constant ยท Source

pub const PIXEL_FORMAT_BGRG422: PixelFormat = 241

PIXEL_FORMAT_DEPTH16_UNORM

Constant ยท Source

pub const PIXEL_FORMAT_DEPTH16_UNORM: PixelFormat = 250

PIXEL_FORMAT_DEPTH32_FLOAT

Constant ยท Source

pub const PIXEL_FORMAT_DEPTH32_FLOAT: PixelFormat = 252

PIXEL_FORMAT_STENCIL8

Constant ยท Source

pub const PIXEL_FORMAT_STENCIL8: PixelFormat = 253

PIXEL_FORMAT_DEPTH24_UNORM_STENCIL8

Constant ยท Source

pub const PIXEL_FORMAT_DEPTH24_UNORM_STENCIL8: PixelFormat = 255

PIXEL_FORMAT_DEPTH32_FLOAT_STENCIL8

Constant ยท Source

pub const PIXEL_FORMAT_DEPTH32_FLOAT_STENCIL8: PixelFormat = 260

PIXEL_FORMAT_X32_STENCIL8

Constant ยท Source

pub const PIXEL_FORMAT_X32_STENCIL8: PixelFormat = 261

PIXEL_FORMAT_X24_STENCIL8

Constant ยท Source

pub const PIXEL_FORMAT_X24_STENCIL8: PixelFormat = 262

ResourceOptions

Type alias ยท Source

MTLResourceOptions.

pub type ResourceOptions = usize

RESOURCE_CPU_CACHE_MODE_DEFAULT_CACHE

Constant ยท Source

pub const RESOURCE_CPU_CACHE_MODE_DEFAULT_CACHE: ResourceOptions = 0

RESOURCE_CPU_CACHE_MODE_WRITE_COMBINED

Constant ยท Source

pub const RESOURCE_CPU_CACHE_MODE_WRITE_COMBINED: ResourceOptions = 1

RESOURCE_STORAGE_MODE_SHARED

Constant ยท Source

pub const RESOURCE_STORAGE_MODE_SHARED: ResourceOptions = 0

RESOURCE_STORAGE_MODE_MANAGED

Constant ยท Source

pub const RESOURCE_STORAGE_MODE_MANAGED: ResourceOptions = 16

RESOURCE_STORAGE_MODE_PRIVATE

Constant ยท Source

pub const RESOURCE_STORAGE_MODE_PRIVATE: ResourceOptions = 32

RESOURCE_STORAGE_MODE_MEMORYLESS

Constant ยท Source

pub const RESOURCE_STORAGE_MODE_MEMORYLESS: ResourceOptions = 48

RESOURCE_HAZARD_TRACKING_MODE_DEFAULT

Constant ยท Source

pub const RESOURCE_HAZARD_TRACKING_MODE_DEFAULT: ResourceOptions = 0

RESOURCE_HAZARD_TRACKING_MODE_UNTRACKED

Constant ยท Source

pub const RESOURCE_HAZARD_TRACKING_MODE_UNTRACKED: ResourceOptions = 256

RESOURCE_HAZARD_TRACKING_MODE_TRACKED

Constant ยท Source

pub const RESOURCE_HAZARD_TRACKING_MODE_TRACKED: ResourceOptions = 512

StorageMode

Type alias ยท Source

MTLStorageMode.

pub type StorageMode = usize

STORAGE_MODE_SHARED

Constant ยท Source

pub const STORAGE_MODE_SHARED: StorageMode = 0

STORAGE_MODE_MANAGED

Constant ยท Source

pub const STORAGE_MODE_MANAGED: StorageMode = 1

STORAGE_MODE_PRIVATE

Constant ยท Source

pub const STORAGE_MODE_PRIVATE: StorageMode = 2

STORAGE_MODE_MEMORYLESS

Constant ยท Source

pub const STORAGE_MODE_MEMORYLESS: StorageMode = 3

CpuCacheMode

Type alias ยท Source

MTLCpuCacheMode.

pub type CpuCacheMode = usize

CPU_CACHE_MODE_DEFAULT_CACHE

Constant ยท Source

pub const CPU_CACHE_MODE_DEFAULT_CACHE: CpuCacheMode = 0

CPU_CACHE_MODE_WRITE_COMBINED

Constant ยท Source

pub const CPU_CACHE_MODE_WRITE_COMBINED: CpuCacheMode = 1

HazardTrackingMode

Type alias ยท Source

MTLHazardTrackingMode.

pub type HazardTrackingMode = usize

HAZARD_TRACKING_MODE_DEFAULT

Constant ยท Source

pub const HAZARD_TRACKING_MODE_DEFAULT: HazardTrackingMode = 0

HAZARD_TRACKING_MODE_UNTRACKED

Constant ยท Source

pub const HAZARD_TRACKING_MODE_UNTRACKED: HazardTrackingMode = 1

HAZARD_TRACKING_MODE_TRACKED

Constant ยท Source

pub const HAZARD_TRACKING_MODE_TRACKED: HazardTrackingMode = 2

TextureType

Type alias ยท Source

MTLTextureType.

pub type TextureType = usize

TEXTURE_TYPE_1D

Constant ยท Source

pub const TEXTURE_TYPE_1D: TextureType = 0

TEXTURE_TYPE_1D_ARRAY

Constant ยท Source

pub const TEXTURE_TYPE_1D_ARRAY: TextureType = 1

TEXTURE_TYPE_2D

Constant ยท Source

pub const TEXTURE_TYPE_2D: TextureType = 2

TEXTURE_TYPE_2D_ARRAY

Constant ยท Source

pub const TEXTURE_TYPE_2D_ARRAY: TextureType = 3

TEXTURE_TYPE_2D_MULTISAMPLE

Constant ยท Source

pub const TEXTURE_TYPE_2D_MULTISAMPLE: TextureType = 4

TEXTURE_TYPE_CUBE

Constant ยท Source

pub const TEXTURE_TYPE_CUBE: TextureType = 5

TEXTURE_TYPE_CUBE_ARRAY

Constant ยท Source

pub const TEXTURE_TYPE_CUBE_ARRAY: TextureType = 6

TEXTURE_TYPE_3D

Constant ยท Source

pub const TEXTURE_TYPE_3D: TextureType = 7

TEXTURE_TYPE_2D_MULTISAMPLE_ARRAY

Constant ยท Source

pub const TEXTURE_TYPE_2D_MULTISAMPLE_ARRAY: TextureType = 8

TEXTURE_TYPE_TEXTURE_BUFFER

Constant ยท Source

pub const TEXTURE_TYPE_TEXTURE_BUFFER: TextureType = 9

TextureUsage

Type alias ยท Source

MTLTextureUsage.

pub type TextureUsage = usize

TEXTURE_USAGE_UNKNOWN

Constant ยท Source

pub const TEXTURE_USAGE_UNKNOWN: TextureUsage = 0

TEXTURE_USAGE_SHADER_READ

Constant ยท Source

pub const TEXTURE_USAGE_SHADER_READ: TextureUsage = 1

TEXTURE_USAGE_SHADER_WRITE

Constant ยท Source

pub const TEXTURE_USAGE_SHADER_WRITE: TextureUsage = 2

TEXTURE_USAGE_RENDER_TARGET

Constant ยท Source

pub const TEXTURE_USAGE_RENDER_TARGET: TextureUsage = 4

TEXTURE_USAGE_PIXEL_FORMAT_VIEW

Constant ยท Source

pub const TEXTURE_USAGE_PIXEL_FORMAT_VIEW: TextureUsage = 16

TEXTURE_USAGE_SHADER_ATOMIC

Constant ยท Source

pub const TEXTURE_USAGE_SHADER_ATOMIC: TextureUsage = 32

LoadAction

Type alias ยท Source

MTLLoadAction.

pub type LoadAction = usize

LOAD_ACTION_DONT_CARE

Constant ยท Source

pub const LOAD_ACTION_DONT_CARE: LoadAction = 0

LOAD_ACTION_LOAD

Constant ยท Source

pub const LOAD_ACTION_LOAD: LoadAction = 1

LOAD_ACTION_CLEAR

Constant ยท Source

pub const LOAD_ACTION_CLEAR: LoadAction = 2

StoreAction

Type alias ยท Source

MTLStoreAction.

pub type StoreAction = usize

STORE_ACTION_DONT_CARE

Constant ยท Source

pub const STORE_ACTION_DONT_CARE: StoreAction = 0

STORE_ACTION_STORE

Constant ยท Source

pub const STORE_ACTION_STORE: StoreAction = 1

STORE_ACTION_MULTISAMPLE_RESOLVE

Constant ยท Source

pub const STORE_ACTION_MULTISAMPLE_RESOLVE: StoreAction = 2

STORE_ACTION_STORE_AND_MULTISAMPLE_RESOLVE

Constant ยท Source

pub const STORE_ACTION_STORE_AND_MULTISAMPLE_RESOLVE: StoreAction = 3

STORE_ACTION_UNKNOWN

Constant ยท Source

pub const STORE_ACTION_UNKNOWN: StoreAction = 4

STORE_ACTION_CUSTOM_SAMPLE_DEPTH_STORE

Constant ยท Source

pub const STORE_ACTION_CUSTOM_SAMPLE_DEPTH_STORE: StoreAction = 5

PrimitiveType

Type alias ยท Source

MTLPrimitiveType.

pub type PrimitiveType = usize

PRIMITIVE_TYPE_POINT

Constant ยท Source

pub const PRIMITIVE_TYPE_POINT: PrimitiveType = 0

PRIMITIVE_TYPE_LINE

Constant ยท Source

pub const PRIMITIVE_TYPE_LINE: PrimitiveType = 1

PRIMITIVE_TYPE_LINE_STRIP

Constant ยท Source

pub const PRIMITIVE_TYPE_LINE_STRIP: PrimitiveType = 2

PRIMITIVE_TYPE_TRIANGLE

Constant ยท Source

pub const PRIMITIVE_TYPE_TRIANGLE: PrimitiveType = 3

PRIMITIVE_TYPE_TRIANGLE_STRIP

Constant ยท Source

pub const PRIMITIVE_TYPE_TRIANGLE_STRIP: PrimitiveType = 4

PrimitiveTopologyClass

Type alias ยท Source

MTLPrimitiveTopologyClass.

pub type PrimitiveTopologyClass = usize

PRIMITIVE_TOPOLOGY_CLASS_UNSPECIFIED

Constant ยท Source

pub const PRIMITIVE_TOPOLOGY_CLASS_UNSPECIFIED: PrimitiveTopologyClass = 0

PRIMITIVE_TOPOLOGY_CLASS_POINT

Constant ยท Source

pub const PRIMITIVE_TOPOLOGY_CLASS_POINT: PrimitiveTopologyClass = 1

PRIMITIVE_TOPOLOGY_CLASS_LINE

Constant ยท Source

pub const PRIMITIVE_TOPOLOGY_CLASS_LINE: PrimitiveTopologyClass = 2

PRIMITIVE_TOPOLOGY_CLASS_TRIANGLE

Constant ยท Source

pub const PRIMITIVE_TOPOLOGY_CLASS_TRIANGLE: PrimitiveTopologyClass = 3

IndexType

Type alias ยท Source

MTLIndexType.

pub type IndexType = usize

INDEX_TYPE_UINT16

Constant ยท Source

pub const INDEX_TYPE_UINT16: IndexType = 0

INDEX_TYPE_UINT32

Constant ยท Source

pub const INDEX_TYPE_UINT32: IndexType = 1

CullMode

Type alias ยท Source

MTLCullMode.

pub type CullMode = usize

CULL_MODE_NONE

Constant ยท Source

pub const CULL_MODE_NONE: CullMode = 0

CULL_MODE_FRONT

Constant ยท Source

pub const CULL_MODE_FRONT: CullMode = 1

CULL_MODE_BACK

Constant ยท Source

pub const CULL_MODE_BACK: CullMode = 2

Winding

Type alias ยท Source

MTLWinding.

pub type Winding = usize

WINDING_CLOCKWISE

Constant ยท Source

pub const WINDING_CLOCKWISE: Winding = 0

WINDING_COUNTER_CLOCKWISE

Constant ยท Source

pub const WINDING_COUNTER_CLOCKWISE: Winding = 1

TriangleFillMode

Type alias ยท Source

MTLTriangleFillMode.

pub type TriangleFillMode = usize

TRIANGLE_FILL_MODE_FILL

Constant ยท Source

pub const TRIANGLE_FILL_MODE_FILL: TriangleFillMode = 0

TRIANGLE_FILL_MODE_LINES

Constant ยท Source

pub const TRIANGLE_FILL_MODE_LINES: TriangleFillMode = 1

DepthClipMode

Type alias ยท Source

MTLDepthClipMode.

pub type DepthClipMode = usize

DEPTH_CLIP_MODE_CLIP

Constant ยท Source

pub const DEPTH_CLIP_MODE_CLIP: DepthClipMode = 0

DEPTH_CLIP_MODE_CLAMP

Constant ยท Source

pub const DEPTH_CLIP_MODE_CLAMP: DepthClipMode = 1

CompareFunction

Type alias ยท Source

MTLCompareFunction.

pub type CompareFunction = usize

COMPARE_FUNCTION_NEVER

Constant ยท Source

pub const COMPARE_FUNCTION_NEVER: CompareFunction = 0

COMPARE_FUNCTION_LESS

Constant ยท Source

pub const COMPARE_FUNCTION_LESS: CompareFunction = 1

COMPARE_FUNCTION_EQUAL

Constant ยท Source

pub const COMPARE_FUNCTION_EQUAL: CompareFunction = 2

COMPARE_FUNCTION_LESS_EQUAL

Constant ยท Source

pub const COMPARE_FUNCTION_LESS_EQUAL: CompareFunction = 3

COMPARE_FUNCTION_GREATER

Constant ยท Source

pub const COMPARE_FUNCTION_GREATER: CompareFunction = 4

COMPARE_FUNCTION_NOT_EQUAL

Constant ยท Source

pub const COMPARE_FUNCTION_NOT_EQUAL: CompareFunction = 5

COMPARE_FUNCTION_GREATER_EQUAL

Constant ยท Source

pub const COMPARE_FUNCTION_GREATER_EQUAL: CompareFunction = 6

COMPARE_FUNCTION_ALWAYS

Constant ยท Source

pub const COMPARE_FUNCTION_ALWAYS: CompareFunction = 7

StencilOperation

Type alias ยท Source

MTLStencilOperation.

pub type StencilOperation = usize

STENCIL_OPERATION_KEEP

Constant ยท Source

pub const STENCIL_OPERATION_KEEP: StencilOperation = 0

STENCIL_OPERATION_ZERO

Constant ยท Source

pub const STENCIL_OPERATION_ZERO: StencilOperation = 1

STENCIL_OPERATION_REPLACE

Constant ยท Source

pub const STENCIL_OPERATION_REPLACE: StencilOperation = 2

STENCIL_OPERATION_INCREMENT_CLAMP

Constant ยท Source

pub const STENCIL_OPERATION_INCREMENT_CLAMP: StencilOperation = 3

STENCIL_OPERATION_DECREMENT_CLAMP

Constant ยท Source

pub const STENCIL_OPERATION_DECREMENT_CLAMP: StencilOperation = 4

STENCIL_OPERATION_INVERT

Constant ยท Source

pub const STENCIL_OPERATION_INVERT: StencilOperation = 5

STENCIL_OPERATION_INCREMENT_WRAP

Constant ยท Source

pub const STENCIL_OPERATION_INCREMENT_WRAP: StencilOperation = 6

STENCIL_OPERATION_DECREMENT_WRAP

Constant ยท Source

pub const STENCIL_OPERATION_DECREMENT_WRAP: StencilOperation = 7

BlendFactor

Type alias ยท Source

MTLBlendFactor.

pub type BlendFactor = usize

BLEND_FACTOR_ZERO

Constant ยท Source

pub const BLEND_FACTOR_ZERO: BlendFactor = 0

BLEND_FACTOR_ONE

Constant ยท Source

pub const BLEND_FACTOR_ONE: BlendFactor = 1

BLEND_FACTOR_SOURCE_COLOR

Constant ยท Source

pub const BLEND_FACTOR_SOURCE_COLOR: BlendFactor = 2

BLEND_FACTOR_ONE_MINUS_SOURCE_COLOR

Constant ยท Source

pub const BLEND_FACTOR_ONE_MINUS_SOURCE_COLOR: BlendFactor = 3

BLEND_FACTOR_SOURCE_ALPHA

Constant ยท Source

pub const BLEND_FACTOR_SOURCE_ALPHA: BlendFactor = 4

BLEND_FACTOR_ONE_MINUS_SOURCE_ALPHA

Constant ยท Source

pub const BLEND_FACTOR_ONE_MINUS_SOURCE_ALPHA: BlendFactor = 5

BLEND_FACTOR_DESTINATION_COLOR

Constant ยท Source

pub const BLEND_FACTOR_DESTINATION_COLOR: BlendFactor = 6

BLEND_FACTOR_ONE_MINUS_DESTINATION_COLOR

Constant ยท Source

pub const BLEND_FACTOR_ONE_MINUS_DESTINATION_COLOR: BlendFactor = 7

BLEND_FACTOR_DESTINATION_ALPHA

Constant ยท Source

pub const BLEND_FACTOR_DESTINATION_ALPHA: BlendFactor = 8

BLEND_FACTOR_ONE_MINUS_DESTINATION_ALPHA

Constant ยท Source

pub const BLEND_FACTOR_ONE_MINUS_DESTINATION_ALPHA: BlendFactor = 9

BLEND_FACTOR_SOURCE_ALPHA_SATURATED

Constant ยท Source

pub const BLEND_FACTOR_SOURCE_ALPHA_SATURATED: BlendFactor = 10

BLEND_FACTOR_BLEND_COLOR

Constant ยท Source

pub const BLEND_FACTOR_BLEND_COLOR: BlendFactor = 11

BLEND_FACTOR_ONE_MINUS_BLEND_COLOR

Constant ยท Source

pub const BLEND_FACTOR_ONE_MINUS_BLEND_COLOR: BlendFactor = 12

BLEND_FACTOR_BLEND_ALPHA

Constant ยท Source

pub const BLEND_FACTOR_BLEND_ALPHA: BlendFactor = 13

BLEND_FACTOR_ONE_MINUS_BLEND_ALPHA

Constant ยท Source

pub const BLEND_FACTOR_ONE_MINUS_BLEND_ALPHA: BlendFactor = 14

BLEND_FACTOR_SOURCE1_COLOR

Constant ยท Source

pub const BLEND_FACTOR_SOURCE1_COLOR: BlendFactor = 15

BLEND_FACTOR_ONE_MINUS_SOURCE1_COLOR

Constant ยท Source

pub const BLEND_FACTOR_ONE_MINUS_SOURCE1_COLOR: BlendFactor = 16

BLEND_FACTOR_SOURCE1_ALPHA

Constant ยท Source

pub const BLEND_FACTOR_SOURCE1_ALPHA: BlendFactor = 17

BLEND_FACTOR_ONE_MINUS_SOURCE1_ALPHA

Constant ยท Source

pub const BLEND_FACTOR_ONE_MINUS_SOURCE1_ALPHA: BlendFactor = 18

BlendOperation

Type alias ยท Source

MTLBlendOperation.

pub type BlendOperation = usize

BLEND_OPERATION_ADD

Constant ยท Source

pub const BLEND_OPERATION_ADD: BlendOperation = 0

BLEND_OPERATION_SUBTRACT

Constant ยท Source

pub const BLEND_OPERATION_SUBTRACT: BlendOperation = 1

BLEND_OPERATION_REVERSE_SUBTRACT

Constant ยท Source

pub const BLEND_OPERATION_REVERSE_SUBTRACT: BlendOperation = 2

BLEND_OPERATION_MIN

Constant ยท Source

pub const BLEND_OPERATION_MIN: BlendOperation = 3

BLEND_OPERATION_MAX

Constant ยท Source

pub const BLEND_OPERATION_MAX: BlendOperation = 4

ColorWriteMask

Type alias ยท Source

MTLColorWriteMask.

pub type ColorWriteMask = usize

COLOR_WRITE_MASK_NONE

Constant ยท Source

pub const COLOR_WRITE_MASK_NONE: ColorWriteMask = 0

COLOR_WRITE_MASK_RED

Constant ยท Source

pub const COLOR_WRITE_MASK_RED: ColorWriteMask = 8

COLOR_WRITE_MASK_GREEN

Constant ยท Source

pub const COLOR_WRITE_MASK_GREEN: ColorWriteMask = 4

COLOR_WRITE_MASK_BLUE

Constant ยท Source

pub const COLOR_WRITE_MASK_BLUE: ColorWriteMask = 2

COLOR_WRITE_MASK_ALPHA

Constant ยท Source

pub const COLOR_WRITE_MASK_ALPHA: ColorWriteMask = 1

COLOR_WRITE_MASK_ALL

Constant ยท Source

pub const COLOR_WRITE_MASK_ALL: ColorWriteMask = 15

SamplerMinMagFilter

Type alias ยท Source

MTLSamplerMinMagFilter.

pub type SamplerMinMagFilter = usize

SAMPLER_MIN_MAG_FILTER_NEAREST

Constant ยท Source

pub const SAMPLER_MIN_MAG_FILTER_NEAREST: SamplerMinMagFilter = 0

SAMPLER_MIN_MAG_FILTER_LINEAR

Constant ยท Source

pub const SAMPLER_MIN_MAG_FILTER_LINEAR: SamplerMinMagFilter = 1

SamplerMipFilter

Type alias ยท Source

MTLSamplerMipFilter.

pub type SamplerMipFilter = usize

SAMPLER_MIP_FILTER_NOT_MIPMAPPED

Constant ยท Source

pub const SAMPLER_MIP_FILTER_NOT_MIPMAPPED: SamplerMipFilter = 0

SAMPLER_MIP_FILTER_NEAREST

Constant ยท Source

pub const SAMPLER_MIP_FILTER_NEAREST: SamplerMipFilter = 1

SAMPLER_MIP_FILTER_LINEAR

Constant ยท Source

pub const SAMPLER_MIP_FILTER_LINEAR: SamplerMipFilter = 2

SamplerAddressMode

Type alias ยท Source

MTLSamplerAddressMode.

pub type SamplerAddressMode = usize

SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE

Constant ยท Source

pub const SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE: SamplerAddressMode = 0

SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE

Constant ยท Source

pub const SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE: SamplerAddressMode = 1

SAMPLER_ADDRESS_MODE_REPEAT

Constant ยท Source

pub const SAMPLER_ADDRESS_MODE_REPEAT: SamplerAddressMode = 2

SAMPLER_ADDRESS_MODE_MIRROR_REPEAT

Constant ยท Source

pub const SAMPLER_ADDRESS_MODE_MIRROR_REPEAT: SamplerAddressMode = 3

SAMPLER_ADDRESS_MODE_CLAMP_TO_ZERO

Constant ยท Source

pub const SAMPLER_ADDRESS_MODE_CLAMP_TO_ZERO: SamplerAddressMode = 4

SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER_COLOR

Constant ยท Source

pub const SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER_COLOR: SamplerAddressMode = 5

SamplerBorderColor

Type alias ยท Source

MTLSamplerBorderColor.

pub type SamplerBorderColor = usize

SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK

Constant ยท Source

pub const SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK: SamplerBorderColor = 0

SAMPLER_BORDER_COLOR_OPAQUE_BLACK

Constant ยท Source

pub const SAMPLER_BORDER_COLOR_OPAQUE_BLACK: SamplerBorderColor = 1

SAMPLER_BORDER_COLOR_OPAQUE_WHITE

Constant ยท Source

pub const SAMPLER_BORDER_COLOR_OPAQUE_WHITE: SamplerBorderColor = 2

VertexFormat

Type alias ยท Source

MTLVertexFormat.

pub type VertexFormat = usize

VERTEX_FORMAT_INVALID

Constant ยท Source

pub const VERTEX_FORMAT_INVALID: VertexFormat = 0

VERTEX_FORMAT_UCHAR2

Constant ยท Source

pub const VERTEX_FORMAT_UCHAR2: VertexFormat = 1

VERTEX_FORMAT_UCHAR3

Constant ยท Source

pub const VERTEX_FORMAT_UCHAR3: VertexFormat = 2

VERTEX_FORMAT_UCHAR4

Constant ยท Source

pub const VERTEX_FORMAT_UCHAR4: VertexFormat = 3

VERTEX_FORMAT_CHAR2

Constant ยท Source

pub const VERTEX_FORMAT_CHAR2: VertexFormat = 4

VERTEX_FORMAT_CHAR3

Constant ยท Source

pub const VERTEX_FORMAT_CHAR3: VertexFormat = 5

VERTEX_FORMAT_CHAR4

Constant ยท Source

pub const VERTEX_FORMAT_CHAR4: VertexFormat = 6

VERTEX_FORMAT_UCHAR2_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_UCHAR2_NORMALIZED: VertexFormat = 7

VERTEX_FORMAT_UCHAR3_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_UCHAR3_NORMALIZED: VertexFormat = 8

VERTEX_FORMAT_UCHAR4_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_UCHAR4_NORMALIZED: VertexFormat = 9

VERTEX_FORMAT_CHAR2_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_CHAR2_NORMALIZED: VertexFormat = 10

VERTEX_FORMAT_CHAR3_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_CHAR3_NORMALIZED: VertexFormat = 11

VERTEX_FORMAT_CHAR4_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_CHAR4_NORMALIZED: VertexFormat = 12

VERTEX_FORMAT_USHORT2

Constant ยท Source

pub const VERTEX_FORMAT_USHORT2: VertexFormat = 13

VERTEX_FORMAT_USHORT3

Constant ยท Source

pub const VERTEX_FORMAT_USHORT3: VertexFormat = 14

VERTEX_FORMAT_USHORT4

Constant ยท Source

pub const VERTEX_FORMAT_USHORT4: VertexFormat = 15

VERTEX_FORMAT_SHORT2

Constant ยท Source

pub const VERTEX_FORMAT_SHORT2: VertexFormat = 16

VERTEX_FORMAT_SHORT3

Constant ยท Source

pub const VERTEX_FORMAT_SHORT3: VertexFormat = 17

VERTEX_FORMAT_SHORT4

Constant ยท Source

pub const VERTEX_FORMAT_SHORT4: VertexFormat = 18

VERTEX_FORMAT_USHORT2_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_USHORT2_NORMALIZED: VertexFormat = 19

VERTEX_FORMAT_USHORT3_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_USHORT3_NORMALIZED: VertexFormat = 20

VERTEX_FORMAT_USHORT4_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_USHORT4_NORMALIZED: VertexFormat = 21

VERTEX_FORMAT_SHORT2_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_SHORT2_NORMALIZED: VertexFormat = 22

VERTEX_FORMAT_SHORT3_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_SHORT3_NORMALIZED: VertexFormat = 23

VERTEX_FORMAT_SHORT4_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_SHORT4_NORMALIZED: VertexFormat = 24

VERTEX_FORMAT_HALF2

Constant ยท Source

pub const VERTEX_FORMAT_HALF2: VertexFormat = 25

VERTEX_FORMAT_HALF3

Constant ยท Source

pub const VERTEX_FORMAT_HALF3: VertexFormat = 26

VERTEX_FORMAT_HALF4

Constant ยท Source

pub const VERTEX_FORMAT_HALF4: VertexFormat = 27

VERTEX_FORMAT_FLOAT

Constant ยท Source

pub const VERTEX_FORMAT_FLOAT: VertexFormat = 28

VERTEX_FORMAT_FLOAT2

Constant ยท Source

pub const VERTEX_FORMAT_FLOAT2: VertexFormat = 29

VERTEX_FORMAT_FLOAT3

Constant ยท Source

pub const VERTEX_FORMAT_FLOAT3: VertexFormat = 30

VERTEX_FORMAT_FLOAT4

Constant ยท Source

pub const VERTEX_FORMAT_FLOAT4: VertexFormat = 31

VERTEX_FORMAT_INT

Constant ยท Source

pub const VERTEX_FORMAT_INT: VertexFormat = 32

VERTEX_FORMAT_INT2

Constant ยท Source

pub const VERTEX_FORMAT_INT2: VertexFormat = 33

VERTEX_FORMAT_INT3

Constant ยท Source

pub const VERTEX_FORMAT_INT3: VertexFormat = 34

VERTEX_FORMAT_INT4

Constant ยท Source

pub const VERTEX_FORMAT_INT4: VertexFormat = 35

VERTEX_FORMAT_UINT

Constant ยท Source

pub const VERTEX_FORMAT_UINT: VertexFormat = 36

VERTEX_FORMAT_UINT2

Constant ยท Source

pub const VERTEX_FORMAT_UINT2: VertexFormat = 37

VERTEX_FORMAT_UINT3

Constant ยท Source

pub const VERTEX_FORMAT_UINT3: VertexFormat = 38

VERTEX_FORMAT_UINT4

Constant ยท Source

pub const VERTEX_FORMAT_UINT4: VertexFormat = 39

VERTEX_FORMAT_INT1010102_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_INT1010102_NORMALIZED: VertexFormat = 40

VERTEX_FORMAT_UINT1010102_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_UINT1010102_NORMALIZED: VertexFormat = 41

VERTEX_FORMAT_UCHAR4_NORMALIZED_BGRA

Constant ยท Source

pub const VERTEX_FORMAT_UCHAR4_NORMALIZED_BGRA: VertexFormat = 42

VERTEX_FORMAT_UCHAR

Constant ยท Source

pub const VERTEX_FORMAT_UCHAR: VertexFormat = 45

VERTEX_FORMAT_CHAR

Constant ยท Source

pub const VERTEX_FORMAT_CHAR: VertexFormat = 46

VERTEX_FORMAT_UCHAR_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_UCHAR_NORMALIZED: VertexFormat = 47

VERTEX_FORMAT_CHAR_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_CHAR_NORMALIZED: VertexFormat = 48

VERTEX_FORMAT_USHORT

Constant ยท Source

pub const VERTEX_FORMAT_USHORT: VertexFormat = 49

VERTEX_FORMAT_SHORT

Constant ยท Source

pub const VERTEX_FORMAT_SHORT: VertexFormat = 50

VERTEX_FORMAT_USHORT_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_USHORT_NORMALIZED: VertexFormat = 51

VERTEX_FORMAT_SHORT_NORMALIZED

Constant ยท Source

pub const VERTEX_FORMAT_SHORT_NORMALIZED: VertexFormat = 52

VERTEX_FORMAT_HALF

Constant ยท Source

pub const VERTEX_FORMAT_HALF: VertexFormat = 53

VERTEX_FORMAT_FLOAT_RG11B10

Constant ยท Source

pub const VERTEX_FORMAT_FLOAT_RG11B10: VertexFormat = 54

VERTEX_FORMAT_FLOAT_RGB9E5

Constant ยท Source

pub const VERTEX_FORMAT_FLOAT_RGB9E5: VertexFormat = 55

VertexStepFunction

Type alias ยท Source

MTLVertexStepFunction.

pub type VertexStepFunction = usize

VERTEX_STEP_FUNCTION_CONSTANT

Constant ยท Source

pub const VERTEX_STEP_FUNCTION_CONSTANT: VertexStepFunction = 0

VERTEX_STEP_FUNCTION_PER_VERTEX

Constant ยท Source

pub const VERTEX_STEP_FUNCTION_PER_VERTEX: VertexStepFunction = 1

VERTEX_STEP_FUNCTION_PER_INSTANCE

Constant ยท Source

pub const VERTEX_STEP_FUNCTION_PER_INSTANCE: VertexStepFunction = 2

VERTEX_STEP_FUNCTION_PER_PATCH

Constant ยท Source

pub const VERTEX_STEP_FUNCTION_PER_PATCH: VertexStepFunction = 3

VERTEX_STEP_FUNCTION_PER_PATCH_CONTROL_POINT

Constant ยท Source

pub const VERTEX_STEP_FUNCTION_PER_PATCH_CONTROL_POINT: VertexStepFunction = 4

CommandBufferStatus

Type alias ยท Source

MTLCommandBufferStatus.

pub type CommandBufferStatus = usize

COMMAND_BUFFER_STATUS_NOT_ENQUEUED

Constant ยท Source

pub const COMMAND_BUFFER_STATUS_NOT_ENQUEUED: CommandBufferStatus = 0

COMMAND_BUFFER_STATUS_ENQUEUED

Constant ยท Source

pub const COMMAND_BUFFER_STATUS_ENQUEUED: CommandBufferStatus = 1

COMMAND_BUFFER_STATUS_COMMITTED

Constant ยท Source

pub const COMMAND_BUFFER_STATUS_COMMITTED: CommandBufferStatus = 2

COMMAND_BUFFER_STATUS_SCHEDULED

Constant ยท Source

pub const COMMAND_BUFFER_STATUS_SCHEDULED: CommandBufferStatus = 3

COMMAND_BUFFER_STATUS_COMPLETED

Constant ยท Source

pub const COMMAND_BUFFER_STATUS_COMPLETED: CommandBufferStatus = 4

COMMAND_BUFFER_STATUS_ERROR

Constant ยท Source

pub const COMMAND_BUFFER_STATUS_ERROR: CommandBufferStatus = 5

RenderStages

Type alias ยท Source

MTLRenderStages.

pub type RenderStages = usize

RENDER_STAGE_VERTEX

Constant ยท Source

pub const RENDER_STAGE_VERTEX: RenderStages = 1

RENDER_STAGE_FRAGMENT

Constant ยท Source

pub const RENDER_STAGE_FRAGMENT: RenderStages = 2

ResourceUsage

Type alias ยท Source

MTLResourceUsage.

pub type ResourceUsage = usize

RESOURCE_USAGE_READ

Constant ยท Source

pub const RESOURCE_USAGE_READ: ResourceUsage = 1

RESOURCE_USAGE_WRITE

Constant ยท Source

pub const RESOURCE_USAGE_WRITE: ResourceUsage = 2

RESOURCE_USAGE_SAMPLE

Constant ยท Source

pub const RESOURCE_USAGE_SAMPLE: ResourceUsage = 4

BarrierScope

Type alias ยท Source

MTLBarrierScope.

pub type BarrierScope = usize

BARRIER_SCOPE_BUFFERS

Constant ยท Source

pub const BARRIER_SCOPE_BUFFERS: BarrierScope = 1

BARRIER_SCOPE_TEXTURES

Constant ยท Source

pub const BARRIER_SCOPE_TEXTURES: BarrierScope = 2

BARRIER_SCOPE_RENDER_TARGETS

Constant ยท Source

pub const BARRIER_SCOPE_RENDER_TARGETS: BarrierScope = 4

GpuFamily

Type alias ยท Source

MTLGpuFamily.

pub type GpuFamily = usize

GPU_FAMILY_APPLE1

Constant ยท Source

pub const GPU_FAMILY_APPLE1: GpuFamily = 1001

GPU_FAMILY_APPLE2

Constant ยท Source

pub const GPU_FAMILY_APPLE2: GpuFamily = 1002

GPU_FAMILY_APPLE3

Constant ยท Source

pub const GPU_FAMILY_APPLE3: GpuFamily = 1003

GPU_FAMILY_APPLE4

Constant ยท Source

pub const GPU_FAMILY_APPLE4: GpuFamily = 1004

GPU_FAMILY_APPLE5

Constant ยท Source

pub const GPU_FAMILY_APPLE5: GpuFamily = 1005

GPU_FAMILY_APPLE6

Constant ยท Source

pub const GPU_FAMILY_APPLE6: GpuFamily = 1006

GPU_FAMILY_APPLE7

Constant ยท Source

pub const GPU_FAMILY_APPLE7: GpuFamily = 1007

GPU_FAMILY_APPLE8

Constant ยท Source

pub const GPU_FAMILY_APPLE8: GpuFamily = 1008

GPU_FAMILY_APPLE9

Constant ยท Source

pub const GPU_FAMILY_APPLE9: GpuFamily = 1009

GPU_FAMILY_APPLE10

Constant ยท Source

pub const GPU_FAMILY_APPLE10: GpuFamily = 1010

GPU_FAMILY_APPLE11

Constant ยท Source

pub const GPU_FAMILY_APPLE11: GpuFamily = 1011

GPU_FAMILY_MAC1

Constant ยท Source

pub const GPU_FAMILY_MAC1: GpuFamily = 2001

GPU_FAMILY_MAC2

Constant ยท Source

pub const GPU_FAMILY_MAC2: GpuFamily = 2002

GPU_FAMILY_COMMON1

Constant ยท Source

pub const GPU_FAMILY_COMMON1: GpuFamily = 3001

GPU_FAMILY_COMMON2

Constant ยท Source

pub const GPU_FAMILY_COMMON2: GpuFamily = 3002

GPU_FAMILY_COMMON3

Constant ยท Source

pub const GPU_FAMILY_COMMON3: GpuFamily = 3003

GPU_FAMILY_METAL3

Constant ยท Source

pub const GPU_FAMILY_METAL3: GpuFamily = 5001

GPU_FAMILY_METAL4

Constant ยท Source

pub const GPU_FAMILY_METAL4: GpuFamily = 5002

LanguageVersion

Type alias ยท Source

MTLLanguageVersion.

pub type LanguageVersion = usize

LANGUAGE_VERSION_2_0

Constant ยท Source

pub const LANGUAGE_VERSION_2_0: LanguageVersion = 131072

LANGUAGE_VERSION_2_1

Constant ยท Source

pub const LANGUAGE_VERSION_2_1: LanguageVersion = 131073

LANGUAGE_VERSION_2_2

Constant ยท Source

pub const LANGUAGE_VERSION_2_2: LanguageVersion = 131074

LANGUAGE_VERSION_2_3

Constant ยท Source

pub const LANGUAGE_VERSION_2_3: LanguageVersion = 131075

LANGUAGE_VERSION_2_4

Constant ยท Source

pub const LANGUAGE_VERSION_2_4: LanguageVersion = 131076

LANGUAGE_VERSION_3_0

Constant ยท Source

pub const LANGUAGE_VERSION_3_0: LanguageVersion = 196608

LANGUAGE_VERSION_3_1

Constant ยท Source

pub const LANGUAGE_VERSION_3_1: LanguageVersion = 196609

LANGUAGE_VERSION_3_2

Constant ยท Source

pub const LANGUAGE_VERSION_3_2: LanguageVersion = 196610

LANGUAGE_VERSION_4_0

Constant ยท Source

pub const LANGUAGE_VERSION_4_0: LanguageVersion = 262144

LANGUAGE_VERSION_4_1

Constant ยท Source

pub const LANGUAGE_VERSION_4_1: LanguageVersion = 262145

MathMode

Type alias ยท Source

MTLMathMode.

pub type MathMode = usize

MATH_MODE_SAFE

Constant ยท Source

pub const MATH_MODE_SAFE: MathMode = 0

MATH_MODE_RELAXED

Constant ยท Source

pub const MATH_MODE_RELAXED: MathMode = 1

MATH_MODE_FAST

Constant ยท Source

pub const MATH_MODE_FAST: MathMode = 2

Search every guide, reference page, and API declaration.