mtl-rs 0.1.12

Rust bindings for Apple's Metal API
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use objc2::{Encode, Encoding, RefEncode};

/// Handle of the GPU resource used for binding resources to argument tables and resource view pools.
#[repr(C)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub struct MTLResourceID {
    pub _impl: u64,
}

unsafe impl Encode for MTLResourceID {
    const ENCODING: Encoding = Encoding::Struct("?", &[u64::ENCODING]);
}

unsafe impl RefEncode for MTLResourceID {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}