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
44
45
46
47
48
49
50
51
52
use objc2::{Encode, Encoding, RefEncode};
/// The type for an input to a `MTLRenderPipelineState` or a `MTLComputePipelineState`.
///
/// Availability: macOS 10.11+, iOS 8.0+
///
/// Deprecated: Use `MTLBindingType` instead (macOS 13.0+, iOS 16.0+).
#[repr(u64)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, PartialOrd, Ord)]
pub enum MTLArgumentType {
/// This input is a `MTLBuffer`.
Buffer = 0,
/// This input is a pointer to threadgroup memory.
ThreadgroupMemory = 1,
/// This input is a `MTLTexture`.
Texture = 2,
/// This input is a sampler.
Sampler = 3,
/// Imageblock data.
///
/// Availability: macOS 11.0+, macCatalyst 14.0+, iOS 11.0+, tvOS 14.5+
ImageblockData = 16,
/// Imageblock.
///
/// Availability: macOS 11.0+, macCatalyst 14.0+, iOS 11.0+, tvOS 14.5+
Imageblock = 17,
/// Visible function table.
///
/// Availability: macOS 11.0+, iOS 14.0+, tvOS 16.0+
VisibleFunctionTable = 24,
/// Primitive acceleration structure.
///
/// Availability: macOS 11.0+, iOS 14.0+, tvOS 16.0+
PrimitiveAccelerationStructure = 25,
/// Instance acceleration structure.
///
/// Availability: macOS 11.0+, iOS 14.0+, tvOS 16.0+
InstanceAccelerationStructure = 26,
/// Intersection function table.
///
/// Availability: macOS 11.0+, iOS 14.0+, tvOS 16.0+
IntersectionFunctionTable = 27,
}
unsafe impl Encode for MTLArgumentType {
const ENCODING: Encoding = u64::ENCODING;
}
unsafe impl RefEncode for MTLArgumentType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}