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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use crate::*;
extern "C" {
/// The domain for errors that occur during layer renderer configuration.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/compositorservices/cp_layer_renderer_configuration_error_domain?language=objc)
#[cfg(feature = "objc2-core-foundation")]
pub static cp_layer_renderer_configuration_error_domain: &'static CFErrorDomain;
}
/// Errors that can occur during layer configuration.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/compositorservices/cp_layer_renderer_configuration_error_code?language=objc)
// NS_ERROR_ENUM
#[cfg(feature = "objc2-core-foundation")]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct cp_layer_renderer_configuration_error_code(pub CFIndex);
#[cfg(feature = "objc2-core-foundation")]
impl cp_layer_renderer_configuration_error_code {
/// An error that indicates the system didn't find a default
/// layer renderer configuration.
#[doc(alias = "cp_layer_renderer_configuration_error_code_missing_configuration")]
pub const missing_configuration: Self = Self(-20);
/// An error that indicates the layer doesn’t support the current
/// pixel format for color textures.
///
/// Compare the value the ``cp_layer_renderer_configuration_get_color_format``
/// function returns and make sure it matches one of the values the
/// ``cp_layer_renderer_capabilities_supported_color_format`` function returns.
#[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_color_format")]
pub const unsupported_color_format: Self = Self(-4);
/// An error that indicates the layer doesn’t support the current
/// texture usage for color textures.
///
/// Compare the value the ``cp_layer_renderer_configuration_get_color_usage``
/// function returns and make sure it has at least `MTLTextureUsageShaderRead`
/// and does not contain `MTLTextureUsageShaderAtomic` or `MTLTextureUsageShaderWrite`
#[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_color_usage")]
pub const unsupported_color_usage: Self = Self(-5);
/// An error that indicates the layer doesn’t support the current
/// pixel format for depth textures.
///
/// Compare the value the ``cp_layer_renderer_configuration_get_depth_format``
/// function returns and make sure it matches one of the values the
/// ``cp_layer_renderer_capabilities_supported_depth_format`` function returns.
#[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_depth_format")]
pub const unsupported_depth_format: Self = Self(-7);
/// An error that indicates the layer doesn’t support the current
/// texture usage for depth textures.
///
/// Compare the value the ``cp_layer_renderer_configuration_get_depth_usage``
/// function returns and make sure it has at least `MTLTextureUsageShaderRead`
/// and does not contain `MTLTextureUsageShaderAtomic`
#[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_depth_usage")]
pub const unsupported_depth_usage: Self = Self(-8);
/// An error that indicates foveation is enabled but not supported.
///
/// Disable foveation in your layer's configuration.
#[doc(
alias = "cp_layer_renderer_configuration_error_code_variable_rasterization_rate_is_not_supported"
)]
pub const variable_rasterization_rate_is_not_supported: Self = Self(-16);
/// An error that occurs when you try to enable temporal anti-aliasing
/// but the current configuration parameters don't support it.
#[doc(
alias = "cp_layer_renderer_configuration_error_code_temporal_anti_aliasing_not_supported"
)]
pub const temporal_anti_aliasing_not_supported: Self = Self(-17);
/// An error that indicates not enough frames are available for rendering.
#[doc(alias = "cp_layer_renderer_configuration_error_code_not_enough_frames_requested")]
pub const not_enough_frames_requested: Self = Self(-10);
/// An error that indicates the system requested too many frames
/// for rendering.
#[doc(alias = "cp_layer_renderer_configuration_error_code_too_many_frames_requested")]
pub const too_many_frames_requested: Self = Self(-11);
/// An error that indicates the depth range values aren't in
/// reverse-z order.
///
/// When you call the ``cp_drawable_set_depth_range`` function,
/// make sure the first value in your `depth_range` vector contains
/// the value for the far plane. In addition, make sure the distance
/// to the far plane is greater than the distance to the near plane.
#[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_forward_depth_range")]
pub const unsupported_forward_depth_range: Self = Self(-101);
/// An error that indicates the configuration's current layout value
/// is invalid.
///
/// Specify a supported layout value using the ``cp_layer_renderer_configuration_set_layout``
/// function. Get a list of supported layouts from the
/// ``cp_layer_renderer_capabilities_supported_layout`` function.
#[doc(alias = "cp_layer_renderer_configuration_error_code_layout_not_supported")]
pub const layout_not_supported: Self = Self(-6);
/// An error that indicates the near plane of the client is smaller
/// than the supported value.
#[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_near_plane_distance")]
pub const unsupported_near_plane_distance: Self = Self(-104);
/// An error that indicates the layer doesn’t support the current
/// pixel format for tracking areas textures.
///
/// Compare the value the ``cp_layer_renderer_configuration_get_tracking_areas_format``
/// function returns and make sure it matches one of the values the
/// ``cp_layer_renderer_capabilities_supported_tracking_areas_format`` function returns.
#[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_tracking_areas_format")]
pub const unsupported_tracking_areas_format: Self = Self(-21);
/// An error that indicates the layer doesn’t support the current
/// texture usage for tracking areas textures.
///
/// Compare the value the ``cp_layer_renderer_configuration_get_tracking_areas_usage``
/// function returns and make sure it has at least `MTLTextureUsageShaderRead`
/// and does not contain `MTLTextureUsageShaderAtomic`
#[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_tracking_areas_usage")]
pub const unsupported_tracking_areas_usage: Self = Self(-22);
/// An error that indicates the layer doesn't support the current
/// pixel format for stencil texture.
///
/// Compare the value the ``cp_layer_renderer_configuration_get_drawable_render_context_stencil_format``
/// function returns and make sure it matches one of the values the
/// ``cp_layer_renderer_capabilities_drawable_render_context_supported_stencil_format`` function returns.
#[doc(
alias = "cp_layer_renderer_configuration_error_code_unsupported_drawable_render_context_stencil_format"
)]
pub const unsupported_drawable_render_context_stencil_format: Self = Self(-23);
/// An error that indicates the configuration's render quality is unsupported.
/// This could be because foveation is disabled or the quality is outside of the valid range of [0, 1],
/// the error `userInfo` will contain additional information.
#[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_render_quality")]
pub const unsupported_render_quality: Self = Self(-18);
}
#[cfg(feature = "objc2-core-foundation")]
unsafe impl Encode for cp_layer_renderer_configuration_error_code {
const ENCODING: Encoding = CFIndex::ENCODING;
}
#[cfg(feature = "objc2-core-foundation")]
unsafe impl RefEncode for cp_layer_renderer_configuration_error_code {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}