pub struct BinaryArchive(/* private fields */);Expand description
A binary archive for caching compiled pipeline state.
C++ equivalent: MTL::BinaryArchive
Implementations§
Source§impl BinaryArchive
impl BinaryArchive
Sourcepub fn device(&self) -> Device
pub fn device(&self) -> Device
Get the device that created this archive.
C++ equivalent: Device* device() const
Sourcepub fn set_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label.
C++ equivalent: void setLabel(const NS::String* label)
Sourcepub fn add_compute_pipeline_functions(
&self,
descriptor: &ComputePipelineDescriptor,
) -> Result<(), Error>
pub fn add_compute_pipeline_functions( &self, descriptor: &ComputePipelineDescriptor, ) -> Result<(), Error>
Add compute pipeline functions to the archive.
C++ equivalent: bool addComputePipelineFunctions(const MTL::ComputePipelineDescriptor*, NS::Error**)
Sourcepub fn add_render_pipeline_functions(
&self,
descriptor: &RenderPipelineDescriptor,
) -> Result<(), Error>
pub fn add_render_pipeline_functions( &self, descriptor: &RenderPipelineDescriptor, ) -> Result<(), Error>
Add render pipeline functions to the archive.
C++ equivalent: bool addRenderPipelineFunctions(const MTL::RenderPipelineDescriptor*, NS::Error**)
Sourcepub fn add_function(
&self,
descriptor: *const c_void,
library: &Library,
) -> Result<(), Error>
pub fn add_function( &self, descriptor: *const c_void, library: &Library, ) -> Result<(), Error>
Add a function to the archive.
C++ equivalent: bool addFunction(const MTL::FunctionDescriptor*, const MTL::Library*, NS::Error**)
Sourcepub fn add_library_ptr(&self, descriptor: *const c_void) -> Result<(), Error>
pub fn add_library_ptr(&self, descriptor: *const c_void) -> Result<(), Error>
Add a stitched library to the archive.
C++ equivalent: bool addLibrary(const MTL::StitchedLibraryDescriptor*, NS::Error**)
Sourcepub fn add_mesh_render_pipeline_functions_ptr(
&self,
descriptor: *const c_void,
) -> Result<(), Error>
pub fn add_mesh_render_pipeline_functions_ptr( &self, descriptor: *const c_void, ) -> Result<(), Error>
Add mesh render pipeline functions to the archive.
C++ equivalent: bool addMeshRenderPipelineFunctions(const MTL::MeshRenderPipelineDescriptor*, NS::Error**)