pub struct MTLResourceID { /* private fields */ }MTLTypes only.Expand description
Handle of the GPU resource used for binding resources to argument tables, navigating resource view pools and storing resources in an argument buffer
MTLResourceID represents a specific GPU resource. This handle can be mutated by modifying textureID or samplerID values to get to individual resource views in a resource view pool.
See also Apple’s documentation
Implementations§
Source§impl MTLResourceID
impl MTLResourceID
Sourcepub const unsafe fn from_raw(id: u64) -> Self
pub const unsafe fn from_raw(id: u64) -> Self
Construct a MTLResourceID from an ID previously gotten via to_raw.
§Safety
The documentation for MTLResourceID says:
A MTLResourceID represents a specific GPU resource, mutating this handle is undefined unless the mutation results in the value equalling an already existing handle of the same resource type.
So we’ve tentatively marked this method as unsafe, with the safety
requirement that the ID must be valid, i.e. have previously come from
to_raw or similar.
If you disagree with this assessment, feel free to open an issue!
Trait Implementations§
Source§impl Clone for MTLResourceID
impl Clone for MTLResourceID
Source§fn clone(&self) -> MTLResourceID
fn clone(&self) -> MTLResourceID
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more