pub unsafe trait MTLResourceStateCommandEncoder: MTLCommandEncoder {
// Provided methods
unsafe fn updateTextureMappings_mode_regions_mipLevels_slices_numRegions(
&self,
texture: &ProtocolObject<dyn MTLTexture>,
mode: MTLSparseTextureMappingMode,
regions: NonNull<MTLRegion>,
mip_levels: NonNull<NSUInteger>,
slices: NonNull<NSUInteger>,
num_regions: NSUInteger,
)
where Self: Sized + Message { ... }
unsafe fn updateTextureMapping_mode_region_mipLevel_slice(
&self,
texture: &ProtocolObject<dyn MTLTexture>,
mode: MTLSparseTextureMappingMode,
region: MTLRegion,
mip_level: NSUInteger,
slice: NSUInteger,
)
where Self: Sized + Message { ... }
unsafe fn updateTextureMapping_mode_indirectBuffer_indirectBufferOffset(
&self,
texture: &ProtocolObject<dyn MTLTexture>,
mode: MTLSparseTextureMappingMode,
indirect_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
)
where Self: Sized + Message { ... }
fn updateFence(&self, fence: &ProtocolObject<dyn MTLFence>)
where Self: Sized + Message { ... }
fn waitForFence(&self, fence: &ProtocolObject<dyn MTLFence>)
where Self: Sized + Message { ... }
unsafe fn moveTextureMappingsFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin(
&self,
source_texture: &ProtocolObject<dyn MTLTexture>,
source_slice: NSUInteger,
source_level: NSUInteger,
source_origin: MTLOrigin,
source_size: MTLSize,
destination_texture: &ProtocolObject<dyn MTLTexture>,
destination_slice: NSUInteger,
destination_level: NSUInteger,
destination_origin: MTLOrigin,
)
where Self: Sized + Message { ... }
}MTLCommandEncoder and MTLResourceStateCommandEncoder only.Expand description
Provided Methods§
Sourceunsafe fn updateTextureMappings_mode_regions_mipLevels_slices_numRegions(
&self,
texture: &ProtocolObject<dyn MTLTexture>,
mode: MTLSparseTextureMappingMode,
regions: NonNull<MTLRegion>,
mip_levels: NonNull<NSUInteger>,
slices: NonNull<NSUInteger>,
num_regions: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture and MTLTypes only.
unsafe fn updateTextureMappings_mode_regions_mipLevels_slices_numRegions( &self, texture: &ProtocolObject<dyn MTLTexture>, mode: MTLSparseTextureMappingMode, regions: NonNull<MTLRegion>, mip_levels: NonNull<NSUInteger>, slices: NonNull<NSUInteger>, num_regions: NSUInteger, )
MTLAllocation and MTLResource and MTLTexture and MTLTypes only.Updates multiple regions within a sparse texture.
§Safety
texturemay need to be synchronized.texturemay be unretained, you must ensure it is kept alive while in use.regionsmust be a valid pointer.mip_levelsmust be a valid pointer.slicesmust be a valid pointer.
Sourceunsafe fn updateTextureMapping_mode_region_mipLevel_slice(
&self,
texture: &ProtocolObject<dyn MTLTexture>,
mode: MTLSparseTextureMappingMode,
region: MTLRegion,
mip_level: NSUInteger,
slice: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture and MTLTypes only.
unsafe fn updateTextureMapping_mode_region_mipLevel_slice( &self, texture: &ProtocolObject<dyn MTLTexture>, mode: MTLSparseTextureMappingMode, region: MTLRegion, mip_level: NSUInteger, slice: NSUInteger, )
MTLAllocation and MTLResource and MTLTexture and MTLTypes only.Updates mapping for given sparse texture
§Safety
texturemay need to be synchronized.texturemay be unretained, you must ensure it is kept alive while in use.
Sourceunsafe fn updateTextureMapping_mode_indirectBuffer_indirectBufferOffset(
&self,
texture: &ProtocolObject<dyn MTLTexture>,
mode: MTLSparseTextureMappingMode,
indirect_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource and MTLTexture only.
unsafe fn updateTextureMapping_mode_indirectBuffer_indirectBufferOffset( &self, texture: &ProtocolObject<dyn MTLTexture>, mode: MTLSparseTextureMappingMode, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, )
MTLAllocation and MTLBuffer and MTLResource and MTLTexture only.Updates mapping for given sparse texture. Updates are driven via a MTLBuffer with the structure format defined by MTLMapIndirectBufferFormat.
struct MTLMapIndirectBufferFormat{ uint32_t numMappings; MTLMapIndirectArguments mappings[numMappings]; }
§Safety
texturemay need to be synchronized.texturemay be unretained, you must ensure it is kept alive while in use.indirect_buffermay need to be synchronized.indirect_buffermay be unretained, you must ensure it is kept alive while in use.indirect_buffercontents should be of the correct type.indirectBufferOffsetmight not be bounds-checked.
Sourcefn updateFence(&self, fence: &ProtocolObject<dyn MTLFence>)
Available on crate feature MTLFence only.
fn updateFence(&self, fence: &ProtocolObject<dyn MTLFence>)
MTLFence only.Update the fence to capture all GPU work so far enqueued by this encoder.
The fence is updated at kernel submission to maintain global order and prevent deadlock. Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
Sourcefn waitForFence(&self, fence: &ProtocolObject<dyn MTLFence>)
Available on crate feature MTLFence only.
fn waitForFence(&self, fence: &ProtocolObject<dyn MTLFence>)
MTLFence only.Prevent further GPU work until the fence is reached.
The fence is evaluated at kernel submission to maintain global order and prevent deadlock. Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
Sourceunsafe fn moveTextureMappingsFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin(
&self,
source_texture: &ProtocolObject<dyn MTLTexture>,
source_slice: NSUInteger,
source_level: NSUInteger,
source_origin: MTLOrigin,
source_size: MTLSize,
destination_texture: &ProtocolObject<dyn MTLTexture>,
destination_slice: NSUInteger,
destination_level: NSUInteger,
destination_origin: MTLOrigin,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture and MTLTypes only.
unsafe fn moveTextureMappingsFromTexture_sourceSlice_sourceLevel_sourceOrigin_sourceSize_toTexture_destinationSlice_destinationLevel_destinationOrigin( &self, source_texture: &ProtocolObject<dyn MTLTexture>, source_slice: NSUInteger, source_level: NSUInteger, source_origin: MTLOrigin, source_size: MTLSize, destination_texture: &ProtocolObject<dyn MTLTexture>, destination_slice: NSUInteger, destination_level: NSUInteger, destination_origin: MTLOrigin, )
MTLAllocation and MTLResource and MTLTexture and MTLTypes only.Move sparse page mappings from one sparse texture to another from the same heap.
The tile mapping is moved from the source texture only if the destination texture tile is unmapped. The textures must also have matching a texture format, texture type, sample count, usage and resource options.
§Safety
source_texturemay need to be synchronized.source_texturemay be unretained, you must ensure it is kept alive while in use.sourceSizemight not be bounds-checked.destination_texturemay need to be synchronized.destination_texturemay be unretained, you must ensure it is kept alive while in use.