objc2_metal/generated/
MTLPixelFormat.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// [Apple's documentation](https://developer.apple.com/documentation/metal/mtlpixelformat?language=objc)
8// NS_ENUM
9#[repr(transparent)]
10#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
11pub struct MTLPixelFormat(pub NSUInteger);
12impl MTLPixelFormat {
13    #[doc(alias = "MTLPixelFormatInvalid")]
14    pub const Invalid: Self = Self(0);
15    #[doc(alias = "MTLPixelFormatA8Unorm")]
16    pub const A8Unorm: Self = Self(1);
17    #[doc(alias = "MTLPixelFormatR8Unorm")]
18    pub const R8Unorm: Self = Self(10);
19    #[doc(alias = "MTLPixelFormatR8Unorm_sRGB")]
20    pub const R8Unorm_sRGB: Self = Self(11);
21    #[doc(alias = "MTLPixelFormatR8Snorm")]
22    pub const R8Snorm: Self = Self(12);
23    #[doc(alias = "MTLPixelFormatR8Uint")]
24    pub const R8Uint: Self = Self(13);
25    #[doc(alias = "MTLPixelFormatR8Sint")]
26    pub const R8Sint: Self = Self(14);
27    #[doc(alias = "MTLPixelFormatR16Unorm")]
28    pub const R16Unorm: Self = Self(20);
29    #[doc(alias = "MTLPixelFormatR16Snorm")]
30    pub const R16Snorm: Self = Self(22);
31    #[doc(alias = "MTLPixelFormatR16Uint")]
32    pub const R16Uint: Self = Self(23);
33    #[doc(alias = "MTLPixelFormatR16Sint")]
34    pub const R16Sint: Self = Self(24);
35    #[doc(alias = "MTLPixelFormatR16Float")]
36    pub const R16Float: Self = Self(25);
37    #[doc(alias = "MTLPixelFormatRG8Unorm")]
38    pub const RG8Unorm: Self = Self(30);
39    #[doc(alias = "MTLPixelFormatRG8Unorm_sRGB")]
40    pub const RG8Unorm_sRGB: Self = Self(31);
41    #[doc(alias = "MTLPixelFormatRG8Snorm")]
42    pub const RG8Snorm: Self = Self(32);
43    #[doc(alias = "MTLPixelFormatRG8Uint")]
44    pub const RG8Uint: Self = Self(33);
45    #[doc(alias = "MTLPixelFormatRG8Sint")]
46    pub const RG8Sint: Self = Self(34);
47    #[doc(alias = "MTLPixelFormatB5G6R5Unorm")]
48    pub const B5G6R5Unorm: Self = Self(40);
49    #[doc(alias = "MTLPixelFormatA1BGR5Unorm")]
50    pub const A1BGR5Unorm: Self = Self(41);
51    #[doc(alias = "MTLPixelFormatABGR4Unorm")]
52    pub const ABGR4Unorm: Self = Self(42);
53    #[doc(alias = "MTLPixelFormatBGR5A1Unorm")]
54    pub const BGR5A1Unorm: Self = Self(43);
55    #[doc(alias = "MTLPixelFormatR32Uint")]
56    pub const R32Uint: Self = Self(53);
57    #[doc(alias = "MTLPixelFormatR32Sint")]
58    pub const R32Sint: Self = Self(54);
59    #[doc(alias = "MTLPixelFormatR32Float")]
60    pub const R32Float: Self = Self(55);
61    #[doc(alias = "MTLPixelFormatRG16Unorm")]
62    pub const RG16Unorm: Self = Self(60);
63    #[doc(alias = "MTLPixelFormatRG16Snorm")]
64    pub const RG16Snorm: Self = Self(62);
65    #[doc(alias = "MTLPixelFormatRG16Uint")]
66    pub const RG16Uint: Self = Self(63);
67    #[doc(alias = "MTLPixelFormatRG16Sint")]
68    pub const RG16Sint: Self = Self(64);
69    #[doc(alias = "MTLPixelFormatRG16Float")]
70    pub const RG16Float: Self = Self(65);
71    #[doc(alias = "MTLPixelFormatRGBA8Unorm")]
72    pub const RGBA8Unorm: Self = Self(70);
73    #[doc(alias = "MTLPixelFormatRGBA8Unorm_sRGB")]
74    pub const RGBA8Unorm_sRGB: Self = Self(71);
75    #[doc(alias = "MTLPixelFormatRGBA8Snorm")]
76    pub const RGBA8Snorm: Self = Self(72);
77    #[doc(alias = "MTLPixelFormatRGBA8Uint")]
78    pub const RGBA8Uint: Self = Self(73);
79    #[doc(alias = "MTLPixelFormatRGBA8Sint")]
80    pub const RGBA8Sint: Self = Self(74);
81    #[doc(alias = "MTLPixelFormatBGRA8Unorm")]
82    pub const BGRA8Unorm: Self = Self(80);
83    #[doc(alias = "MTLPixelFormatBGRA8Unorm_sRGB")]
84    pub const BGRA8Unorm_sRGB: Self = Self(81);
85    #[doc(alias = "MTLPixelFormatRGB10A2Unorm")]
86    pub const RGB10A2Unorm: Self = Self(90);
87    #[doc(alias = "MTLPixelFormatRGB10A2Uint")]
88    pub const RGB10A2Uint: Self = Self(91);
89    #[doc(alias = "MTLPixelFormatRG11B10Float")]
90    pub const RG11B10Float: Self = Self(92);
91    #[doc(alias = "MTLPixelFormatRGB9E5Float")]
92    pub const RGB9E5Float: Self = Self(93);
93    #[doc(alias = "MTLPixelFormatBGR10A2Unorm")]
94    pub const BGR10A2Unorm: Self = Self(94);
95    #[doc(alias = "MTLPixelFormatBGR10_XR")]
96    pub const BGR10_XR: Self = Self(554);
97    #[doc(alias = "MTLPixelFormatBGR10_XR_sRGB")]
98    pub const BGR10_XR_sRGB: Self = Self(555);
99    #[doc(alias = "MTLPixelFormatRG32Uint")]
100    pub const RG32Uint: Self = Self(103);
101    #[doc(alias = "MTLPixelFormatRG32Sint")]
102    pub const RG32Sint: Self = Self(104);
103    #[doc(alias = "MTLPixelFormatRG32Float")]
104    pub const RG32Float: Self = Self(105);
105    #[doc(alias = "MTLPixelFormatRGBA16Unorm")]
106    pub const RGBA16Unorm: Self = Self(110);
107    #[doc(alias = "MTLPixelFormatRGBA16Snorm")]
108    pub const RGBA16Snorm: Self = Self(112);
109    #[doc(alias = "MTLPixelFormatRGBA16Uint")]
110    pub const RGBA16Uint: Self = Self(113);
111    #[doc(alias = "MTLPixelFormatRGBA16Sint")]
112    pub const RGBA16Sint: Self = Self(114);
113    #[doc(alias = "MTLPixelFormatRGBA16Float")]
114    pub const RGBA16Float: Self = Self(115);
115    #[doc(alias = "MTLPixelFormatBGRA10_XR")]
116    pub const BGRA10_XR: Self = Self(552);
117    #[doc(alias = "MTLPixelFormatBGRA10_XR_sRGB")]
118    pub const BGRA10_XR_sRGB: Self = Self(553);
119    #[doc(alias = "MTLPixelFormatRGBA32Uint")]
120    pub const RGBA32Uint: Self = Self(123);
121    #[doc(alias = "MTLPixelFormatRGBA32Sint")]
122    pub const RGBA32Sint: Self = Self(124);
123    #[doc(alias = "MTLPixelFormatRGBA32Float")]
124    pub const RGBA32Float: Self = Self(125);
125    #[doc(alias = "MTLPixelFormatBC1_RGBA")]
126    pub const BC1_RGBA: Self = Self(130);
127    #[doc(alias = "MTLPixelFormatBC1_RGBA_sRGB")]
128    pub const BC1_RGBA_sRGB: Self = Self(131);
129    #[doc(alias = "MTLPixelFormatBC2_RGBA")]
130    pub const BC2_RGBA: Self = Self(132);
131    #[doc(alias = "MTLPixelFormatBC2_RGBA_sRGB")]
132    pub const BC2_RGBA_sRGB: Self = Self(133);
133    #[doc(alias = "MTLPixelFormatBC3_RGBA")]
134    pub const BC3_RGBA: Self = Self(134);
135    #[doc(alias = "MTLPixelFormatBC3_RGBA_sRGB")]
136    pub const BC3_RGBA_sRGB: Self = Self(135);
137    #[doc(alias = "MTLPixelFormatBC4_RUnorm")]
138    pub const BC4_RUnorm: Self = Self(140);
139    #[doc(alias = "MTLPixelFormatBC4_RSnorm")]
140    pub const BC4_RSnorm: Self = Self(141);
141    #[doc(alias = "MTLPixelFormatBC5_RGUnorm")]
142    pub const BC5_RGUnorm: Self = Self(142);
143    #[doc(alias = "MTLPixelFormatBC5_RGSnorm")]
144    pub const BC5_RGSnorm: Self = Self(143);
145    #[doc(alias = "MTLPixelFormatBC6H_RGBFloat")]
146    pub const BC6H_RGBFloat: Self = Self(150);
147    #[doc(alias = "MTLPixelFormatBC6H_RGBUfloat")]
148    pub const BC6H_RGBUfloat: Self = Self(151);
149    #[doc(alias = "MTLPixelFormatBC7_RGBAUnorm")]
150    pub const BC7_RGBAUnorm: Self = Self(152);
151    #[doc(alias = "MTLPixelFormatBC7_RGBAUnorm_sRGB")]
152    pub const BC7_RGBAUnorm_sRGB: Self = Self(153);
153    #[doc(alias = "MTLPixelFormatPVRTC_RGB_2BPP")]
154    #[deprecated = "Usage of ASTC/ETC2/BC formats is recommended instead."]
155    pub const PVRTC_RGB_2BPP: Self = Self(160);
156    #[doc(alias = "MTLPixelFormatPVRTC_RGB_2BPP_sRGB")]
157    #[deprecated = "Usage of ASTC/ETC2/BC formats is recommended instead."]
158    pub const PVRTC_RGB_2BPP_sRGB: Self = Self(161);
159    #[doc(alias = "MTLPixelFormatPVRTC_RGB_4BPP")]
160    #[deprecated = "Usage of ASTC/ETC2/BC formats is recommended instead."]
161    pub const PVRTC_RGB_4BPP: Self = Self(162);
162    #[doc(alias = "MTLPixelFormatPVRTC_RGB_4BPP_sRGB")]
163    #[deprecated = "Usage of ASTC/ETC2/BC formats is recommended instead."]
164    pub const PVRTC_RGB_4BPP_sRGB: Self = Self(163);
165    #[doc(alias = "MTLPixelFormatPVRTC_RGBA_2BPP")]
166    #[deprecated = "Usage of ASTC/ETC2/BC formats is recommended instead."]
167    pub const PVRTC_RGBA_2BPP: Self = Self(164);
168    #[doc(alias = "MTLPixelFormatPVRTC_RGBA_2BPP_sRGB")]
169    #[deprecated = "Usage of ASTC/ETC2/BC formats is recommended instead."]
170    pub const PVRTC_RGBA_2BPP_sRGB: Self = Self(165);
171    #[doc(alias = "MTLPixelFormatPVRTC_RGBA_4BPP")]
172    #[deprecated = "Usage of ASTC/ETC2/BC formats is recommended instead."]
173    pub const PVRTC_RGBA_4BPP: Self = Self(166);
174    #[doc(alias = "MTLPixelFormatPVRTC_RGBA_4BPP_sRGB")]
175    #[deprecated = "Usage of ASTC/ETC2/BC formats is recommended instead."]
176    pub const PVRTC_RGBA_4BPP_sRGB: Self = Self(167);
177    #[doc(alias = "MTLPixelFormatEAC_R11Unorm")]
178    pub const EAC_R11Unorm: Self = Self(170);
179    #[doc(alias = "MTLPixelFormatEAC_R11Snorm")]
180    pub const EAC_R11Snorm: Self = Self(172);
181    #[doc(alias = "MTLPixelFormatEAC_RG11Unorm")]
182    pub const EAC_RG11Unorm: Self = Self(174);
183    #[doc(alias = "MTLPixelFormatEAC_RG11Snorm")]
184    pub const EAC_RG11Snorm: Self = Self(176);
185    #[doc(alias = "MTLPixelFormatEAC_RGBA8")]
186    pub const EAC_RGBA8: Self = Self(178);
187    #[doc(alias = "MTLPixelFormatEAC_RGBA8_sRGB")]
188    pub const EAC_RGBA8_sRGB: Self = Self(179);
189    #[doc(alias = "MTLPixelFormatETC2_RGB8")]
190    pub const ETC2_RGB8: Self = Self(180);
191    #[doc(alias = "MTLPixelFormatETC2_RGB8_sRGB")]
192    pub const ETC2_RGB8_sRGB: Self = Self(181);
193    #[doc(alias = "MTLPixelFormatETC2_RGB8A1")]
194    pub const ETC2_RGB8A1: Self = Self(182);
195    #[doc(alias = "MTLPixelFormatETC2_RGB8A1_sRGB")]
196    pub const ETC2_RGB8A1_sRGB: Self = Self(183);
197    #[doc(alias = "MTLPixelFormatASTC_4x4_sRGB")]
198    pub const ASTC_4x4_sRGB: Self = Self(186);
199    #[doc(alias = "MTLPixelFormatASTC_5x4_sRGB")]
200    pub const ASTC_5x4_sRGB: Self = Self(187);
201    #[doc(alias = "MTLPixelFormatASTC_5x5_sRGB")]
202    pub const ASTC_5x5_sRGB: Self = Self(188);
203    #[doc(alias = "MTLPixelFormatASTC_6x5_sRGB")]
204    pub const ASTC_6x5_sRGB: Self = Self(189);
205    #[doc(alias = "MTLPixelFormatASTC_6x6_sRGB")]
206    pub const ASTC_6x6_sRGB: Self = Self(190);
207    #[doc(alias = "MTLPixelFormatASTC_8x5_sRGB")]
208    pub const ASTC_8x5_sRGB: Self = Self(192);
209    #[doc(alias = "MTLPixelFormatASTC_8x6_sRGB")]
210    pub const ASTC_8x6_sRGB: Self = Self(193);
211    #[doc(alias = "MTLPixelFormatASTC_8x8_sRGB")]
212    pub const ASTC_8x8_sRGB: Self = Self(194);
213    #[doc(alias = "MTLPixelFormatASTC_10x5_sRGB")]
214    pub const ASTC_10x5_sRGB: Self = Self(195);
215    #[doc(alias = "MTLPixelFormatASTC_10x6_sRGB")]
216    pub const ASTC_10x6_sRGB: Self = Self(196);
217    #[doc(alias = "MTLPixelFormatASTC_10x8_sRGB")]
218    pub const ASTC_10x8_sRGB: Self = Self(197);
219    #[doc(alias = "MTLPixelFormatASTC_10x10_sRGB")]
220    pub const ASTC_10x10_sRGB: Self = Self(198);
221    #[doc(alias = "MTLPixelFormatASTC_12x10_sRGB")]
222    pub const ASTC_12x10_sRGB: Self = Self(199);
223    #[doc(alias = "MTLPixelFormatASTC_12x12_sRGB")]
224    pub const ASTC_12x12_sRGB: Self = Self(200);
225    #[doc(alias = "MTLPixelFormatASTC_4x4_LDR")]
226    pub const ASTC_4x4_LDR: Self = Self(204);
227    #[doc(alias = "MTLPixelFormatASTC_5x4_LDR")]
228    pub const ASTC_5x4_LDR: Self = Self(205);
229    #[doc(alias = "MTLPixelFormatASTC_5x5_LDR")]
230    pub const ASTC_5x5_LDR: Self = Self(206);
231    #[doc(alias = "MTLPixelFormatASTC_6x5_LDR")]
232    pub const ASTC_6x5_LDR: Self = Self(207);
233    #[doc(alias = "MTLPixelFormatASTC_6x6_LDR")]
234    pub const ASTC_6x6_LDR: Self = Self(208);
235    #[doc(alias = "MTLPixelFormatASTC_8x5_LDR")]
236    pub const ASTC_8x5_LDR: Self = Self(210);
237    #[doc(alias = "MTLPixelFormatASTC_8x6_LDR")]
238    pub const ASTC_8x6_LDR: Self = Self(211);
239    #[doc(alias = "MTLPixelFormatASTC_8x8_LDR")]
240    pub const ASTC_8x8_LDR: Self = Self(212);
241    #[doc(alias = "MTLPixelFormatASTC_10x5_LDR")]
242    pub const ASTC_10x5_LDR: Self = Self(213);
243    #[doc(alias = "MTLPixelFormatASTC_10x6_LDR")]
244    pub const ASTC_10x6_LDR: Self = Self(214);
245    #[doc(alias = "MTLPixelFormatASTC_10x8_LDR")]
246    pub const ASTC_10x8_LDR: Self = Self(215);
247    #[doc(alias = "MTLPixelFormatASTC_10x10_LDR")]
248    pub const ASTC_10x10_LDR: Self = Self(216);
249    #[doc(alias = "MTLPixelFormatASTC_12x10_LDR")]
250    pub const ASTC_12x10_LDR: Self = Self(217);
251    #[doc(alias = "MTLPixelFormatASTC_12x12_LDR")]
252    pub const ASTC_12x12_LDR: Self = Self(218);
253    #[doc(alias = "MTLPixelFormatASTC_4x4_HDR")]
254    pub const ASTC_4x4_HDR: Self = Self(222);
255    #[doc(alias = "MTLPixelFormatASTC_5x4_HDR")]
256    pub const ASTC_5x4_HDR: Self = Self(223);
257    #[doc(alias = "MTLPixelFormatASTC_5x5_HDR")]
258    pub const ASTC_5x5_HDR: Self = Self(224);
259    #[doc(alias = "MTLPixelFormatASTC_6x5_HDR")]
260    pub const ASTC_6x5_HDR: Self = Self(225);
261    #[doc(alias = "MTLPixelFormatASTC_6x6_HDR")]
262    pub const ASTC_6x6_HDR: Self = Self(226);
263    #[doc(alias = "MTLPixelFormatASTC_8x5_HDR")]
264    pub const ASTC_8x5_HDR: Self = Self(228);
265    #[doc(alias = "MTLPixelFormatASTC_8x6_HDR")]
266    pub const ASTC_8x6_HDR: Self = Self(229);
267    #[doc(alias = "MTLPixelFormatASTC_8x8_HDR")]
268    pub const ASTC_8x8_HDR: Self = Self(230);
269    #[doc(alias = "MTLPixelFormatASTC_10x5_HDR")]
270    pub const ASTC_10x5_HDR: Self = Self(231);
271    #[doc(alias = "MTLPixelFormatASTC_10x6_HDR")]
272    pub const ASTC_10x6_HDR: Self = Self(232);
273    #[doc(alias = "MTLPixelFormatASTC_10x8_HDR")]
274    pub const ASTC_10x8_HDR: Self = Self(233);
275    #[doc(alias = "MTLPixelFormatASTC_10x10_HDR")]
276    pub const ASTC_10x10_HDR: Self = Self(234);
277    #[doc(alias = "MTLPixelFormatASTC_12x10_HDR")]
278    pub const ASTC_12x10_HDR: Self = Self(235);
279    #[doc(alias = "MTLPixelFormatASTC_12x12_HDR")]
280    pub const ASTC_12x12_HDR: Self = Self(236);
281    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
282    ///
283    /// This format is equivalent to YUY2, YUYV, yuvs, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_REV_APPLE.   The component order, from lowest addressed byte to highest, is Y0, Cb, Y1, Cr.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
284    #[doc(alias = "MTLPixelFormatGBGR422")]
285    pub const GBGR422: Self = Self(240);
286    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
287    ///
288    /// This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
289    #[doc(alias = "MTLPixelFormatBGRG422")]
290    pub const BGRG422: Self = Self(241);
291    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
292    ///
293    /// This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
294    #[doc(alias = "MTLPixelFormatDepth16Unorm")]
295    pub const Depth16Unorm: Self = Self(250);
296    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
297    ///
298    /// This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
299    #[doc(alias = "MTLPixelFormatDepth32Float")]
300    pub const Depth32Float: Self = Self(252);
301    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
302    ///
303    /// This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
304    #[doc(alias = "MTLPixelFormatStencil8")]
305    pub const Stencil8: Self = Self(253);
306    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
307    ///
308    /// This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
309    #[doc(alias = "MTLPixelFormatDepth24Unorm_Stencil8")]
310    pub const Depth24Unorm_Stencil8: Self = Self(255);
311    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
312    ///
313    /// This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
314    #[doc(alias = "MTLPixelFormatDepth32Float_Stencil8")]
315    pub const Depth32Float_Stencil8: Self = Self(260);
316    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
317    ///
318    /// This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
319    #[doc(alias = "MTLPixelFormatX32_Stencil8")]
320    pub const X32_Stencil8: Self = Self(261);
321    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
322    ///
323    /// This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
324    #[doc(alias = "MTLPixelFormatX24_Stencil8")]
325    pub const X24_Stencil8: Self = Self(262);
326    /// A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
327    ///
328    /// This format is equivalent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1.  There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1).  422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures.  When sampling, ClampToEdge is the only usable wrap mode.
329    #[doc(alias = "MTLPixelFormatUnspecialized")]
330    pub const Unspecialized: Self = Self(263);
331}
332
333unsafe impl Encode for MTLPixelFormat {
334    const ENCODING: Encoding = NSUInteger::ENCODING;
335}
336
337unsafe impl RefEncode for MTLPixelFormat {
338    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
339}