1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use objc2::{Encode, Encoding, RefEncode};
/// The type of a resource binding.
///
/// Availability: macOS 11.0+, iOS 14.0+
#[repr(i64)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum MTLBindingType {
/// This binding represents a buffer.
Buffer = 0,
/// This binding represents threadgroup memory.
ThreadgroupMemory = 1,
/// This binding represents a texture.
Texture = 2,
/// This binding represents a sampler.
Sampler = 3,
/// This binding represents an image block data.
ImageblockData = 16,
/// This binding represents an image block.
Imageblock = 17,
/// This binding represents a visible function table object.
VisibleFunctionTable = 24,
/// This binding represents a primitive acceleration structure object.
PrimitiveAccelerationStructure = 25,
/// This binding represents an instance acceleration structure object.
InstanceAccelerationStructure = 26,
/// This binding represents an intersection function table object.
IntersectionFunctionTable = 27,
/// This binding represents an object payload.
ObjectPayload = 34,
/// This binding represents a tensor object.
///
/// Availability: macOS 26.0+, iOS 26.0+
Tensor = 37,
}
unsafe impl Encode for MTLBindingType {
const ENCODING: Encoding = i64::ENCODING;
}
unsafe impl RefEncode for MTLBindingType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}