erupt/generated/extensions/
ext_provoking_vertex.rs

1// DO NOT EDIT: @generated by erupt's generator
2///<s>Vulkan Manual Page</s> · Constant
3#[doc(alias = "VK_EXT_PROVOKING_VERTEX_SPEC_VERSION")]
4pub const EXT_PROVOKING_VERTEX_SPEC_VERSION: u32 = 1;
5///<s>Vulkan Manual Page</s> · Constant
6#[doc(alias = "VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME")]
7pub const EXT_PROVOKING_VERTEX_EXTENSION_NAME: *const std::os::raw::c_char = crate::cstr!(
8    "VK_EXT_provoking_vertex"
9);
10///Provided by [`crate::extensions::ext_provoking_vertex`]
11impl crate::vk1_0::StructureType {
12    pub const PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: Self = Self(1000254000);
13    pub const PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: Self = Self(
14        1000254001,
15    );
16    pub const PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: Self = Self(1000254002);
17}
18///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkProvokingVertexModeEXT.html) · Enum
19#[doc(alias = "VkProvokingVertexModeEXT")]
20#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
21#[repr(transparent)]
22pub struct ProvokingVertexModeEXT(pub i32);
23impl std::fmt::Debug for ProvokingVertexModeEXT {
24    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
25        f.write_str(
26            match self {
27                &Self::FIRST_VERTEX_EXT => "FIRST_VERTEX_EXT",
28                &Self::LAST_VERTEX_EXT => "LAST_VERTEX_EXT",
29                _ => "(unknown variant)",
30            },
31        )
32    }
33}
34///Provided by [`crate::extensions::ext_provoking_vertex`]
35impl crate::extensions::ext_provoking_vertex::ProvokingVertexModeEXT {
36    pub const FIRST_VERTEX_EXT: Self = Self(0);
37    pub const LAST_VERTEX_EXT: Self = Self(1);
38}
39impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceProvokingVertexFeaturesEXT>
40for crate::vk1_0::DeviceCreateInfoBuilder<'a> {}
41impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'_>>
42for crate::vk1_0::DeviceCreateInfoBuilder<'a> {}
43impl<
44    'a,
45> crate::ExtendableFrom<'a, PipelineRasterizationProvokingVertexStateCreateInfoEXT>
46for crate::vk1_0::PipelineRasterizationStateCreateInfoBuilder<'a> {}
47impl<
48    'a,
49> crate::ExtendableFrom<
50    'a,
51    PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'_>,
52> for crate::vk1_0::PipelineRasterizationStateCreateInfoBuilder<'a> {}
53impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceProvokingVertexFeaturesEXT>
54for crate::vk1_1::PhysicalDeviceFeatures2Builder<'a> {}
55impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'_>>
56for crate::vk1_1::PhysicalDeviceFeatures2Builder<'a> {}
57impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceProvokingVertexPropertiesEXT>
58for crate::vk1_1::PhysicalDeviceProperties2Builder<'a> {}
59impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'_>>
60for crate::vk1_1::PhysicalDeviceProperties2Builder<'a> {}
61///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceProvokingVertexFeaturesEXT.html) · Structure
62#[doc(alias = "VkPhysicalDeviceProvokingVertexFeaturesEXT")]
63#[derive(Copy, Clone)]
64#[repr(C)]
65pub struct PhysicalDeviceProvokingVertexFeaturesEXT {
66    pub s_type: crate::vk1_0::StructureType,
67    pub p_next: *mut std::ffi::c_void,
68    pub provoking_vertex_last: crate::vk1_0::Bool32,
69    pub transform_feedback_preserves_provoking_vertex: crate::vk1_0::Bool32,
70}
71impl PhysicalDeviceProvokingVertexFeaturesEXT {
72    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT;
73}
74impl Default for PhysicalDeviceProvokingVertexFeaturesEXT {
75    fn default() -> Self {
76        Self {
77            s_type: Self::STRUCTURE_TYPE,
78            p_next: std::ptr::null_mut(),
79            provoking_vertex_last: Default::default(),
80            transform_feedback_preserves_provoking_vertex: Default::default(),
81        }
82    }
83}
84impl std::fmt::Debug for PhysicalDeviceProvokingVertexFeaturesEXT {
85    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
86        f.debug_struct("PhysicalDeviceProvokingVertexFeaturesEXT")
87            .field("s_type", &self.s_type)
88            .field("p_next", &self.p_next)
89            .field("provoking_vertex_last", &(self.provoking_vertex_last != 0))
90            .field(
91                "transform_feedback_preserves_provoking_vertex",
92                &(self.transform_feedback_preserves_provoking_vertex != 0),
93            )
94            .finish()
95    }
96}
97impl PhysicalDeviceProvokingVertexFeaturesEXT {
98    #[inline]
99    pub fn into_builder<'a>(
100        self,
101    ) -> PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'a> {
102        PhysicalDeviceProvokingVertexFeaturesEXTBuilder(self, std::marker::PhantomData)
103    }
104}
105#[derive(Copy, Clone)]
106///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceProvokingVertexFeaturesEXT.html) · Builder of [`PhysicalDeviceProvokingVertexFeaturesEXT`]
107#[repr(transparent)]
108pub struct PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'a>(
109    PhysicalDeviceProvokingVertexFeaturesEXT,
110    std::marker::PhantomData<&'a ()>,
111);
112impl<'a> PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'a> {
113    #[inline]
114    pub fn new() -> PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'a> {
115        PhysicalDeviceProvokingVertexFeaturesEXTBuilder(
116            Default::default(),
117            std::marker::PhantomData,
118        )
119    }
120    #[inline]
121    #[must_use]
122    pub fn provoking_vertex_last(mut self, provoking_vertex_last: bool) -> Self {
123        self.0.provoking_vertex_last = provoking_vertex_last as _;
124        self
125    }
126    #[inline]
127    #[must_use]
128    pub fn transform_feedback_preserves_provoking_vertex(
129        mut self,
130        transform_feedback_preserves_provoking_vertex: bool,
131    ) -> Self {
132        self
133            .0
134            .transform_feedback_preserves_provoking_vertex = transform_feedback_preserves_provoking_vertex
135            as _;
136        self
137    }
138    #[inline]
139    /// Discards all lifetime information.
140    /// Use the `Deref` and `DerefMut` implementations if possible.
141    pub fn build_dangling(self) -> PhysicalDeviceProvokingVertexFeaturesEXT {
142        self.0
143    }
144}
145impl<'a> std::default::Default for PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'a> {
146    fn default() -> PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'a> {
147        Self::new()
148    }
149}
150impl<'a> std::fmt::Debug for PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'a> {
151    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
152        std::fmt::Debug::fmt(&self.0, f)
153    }
154}
155impl<'a> std::ops::Deref for PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'a> {
156    type Target = PhysicalDeviceProvokingVertexFeaturesEXT;
157    fn deref(&self) -> &Self::Target {
158        &self.0
159    }
160}
161impl<'a> std::ops::DerefMut for PhysicalDeviceProvokingVertexFeaturesEXTBuilder<'a> {
162    fn deref_mut(&mut self) -> &mut Self::Target {
163        &mut self.0
164    }
165}
166///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceProvokingVertexPropertiesEXT.html) · Structure
167#[doc(alias = "VkPhysicalDeviceProvokingVertexPropertiesEXT")]
168#[derive(Copy, Clone)]
169#[repr(C)]
170pub struct PhysicalDeviceProvokingVertexPropertiesEXT {
171    pub s_type: crate::vk1_0::StructureType,
172    pub p_next: *mut std::ffi::c_void,
173    pub provoking_vertex_mode_per_pipeline: crate::vk1_0::Bool32,
174    pub transform_feedback_preserves_triangle_fan_provoking_vertex: crate::vk1_0::Bool32,
175}
176impl PhysicalDeviceProvokingVertexPropertiesEXT {
177    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT;
178}
179impl Default for PhysicalDeviceProvokingVertexPropertiesEXT {
180    fn default() -> Self {
181        Self {
182            s_type: Self::STRUCTURE_TYPE,
183            p_next: std::ptr::null_mut(),
184            provoking_vertex_mode_per_pipeline: Default::default(),
185            transform_feedback_preserves_triangle_fan_provoking_vertex: Default::default(),
186        }
187    }
188}
189impl std::fmt::Debug for PhysicalDeviceProvokingVertexPropertiesEXT {
190    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
191        f.debug_struct("PhysicalDeviceProvokingVertexPropertiesEXT")
192            .field("s_type", &self.s_type)
193            .field("p_next", &self.p_next)
194            .field(
195                "provoking_vertex_mode_per_pipeline",
196                &(self.provoking_vertex_mode_per_pipeline != 0),
197            )
198            .field(
199                "transform_feedback_preserves_triangle_fan_provoking_vertex",
200                &(self.transform_feedback_preserves_triangle_fan_provoking_vertex != 0),
201            )
202            .finish()
203    }
204}
205impl PhysicalDeviceProvokingVertexPropertiesEXT {
206    #[inline]
207    pub fn into_builder<'a>(
208        self,
209    ) -> PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'a> {
210        PhysicalDeviceProvokingVertexPropertiesEXTBuilder(self, std::marker::PhantomData)
211    }
212}
213#[derive(Copy, Clone)]
214///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceProvokingVertexPropertiesEXT.html) · Builder of [`PhysicalDeviceProvokingVertexPropertiesEXT`]
215#[repr(transparent)]
216pub struct PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'a>(
217    PhysicalDeviceProvokingVertexPropertiesEXT,
218    std::marker::PhantomData<&'a ()>,
219);
220impl<'a> PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'a> {
221    #[inline]
222    pub fn new() -> PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'a> {
223        PhysicalDeviceProvokingVertexPropertiesEXTBuilder(
224            Default::default(),
225            std::marker::PhantomData,
226        )
227    }
228    #[inline]
229    #[must_use]
230    pub fn provoking_vertex_mode_per_pipeline(
231        mut self,
232        provoking_vertex_mode_per_pipeline: bool,
233    ) -> Self {
234        self
235            .0
236            .provoking_vertex_mode_per_pipeline = provoking_vertex_mode_per_pipeline
237            as _;
238        self
239    }
240    #[inline]
241    #[must_use]
242    pub fn transform_feedback_preserves_triangle_fan_provoking_vertex(
243        mut self,
244        transform_feedback_preserves_triangle_fan_provoking_vertex: bool,
245    ) -> Self {
246        self
247            .0
248            .transform_feedback_preserves_triangle_fan_provoking_vertex = transform_feedback_preserves_triangle_fan_provoking_vertex
249            as _;
250        self
251    }
252    #[inline]
253    /// Discards all lifetime information.
254    /// Use the `Deref` and `DerefMut` implementations if possible.
255    pub fn build_dangling(self) -> PhysicalDeviceProvokingVertexPropertiesEXT {
256        self.0
257    }
258}
259impl<'a> std::default::Default
260for PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'a> {
261    fn default() -> PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'a> {
262        Self::new()
263    }
264}
265impl<'a> std::fmt::Debug for PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'a> {
266    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
267        std::fmt::Debug::fmt(&self.0, f)
268    }
269}
270impl<'a> std::ops::Deref for PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'a> {
271    type Target = PhysicalDeviceProvokingVertexPropertiesEXT;
272    fn deref(&self) -> &Self::Target {
273        &self.0
274    }
275}
276impl<'a> std::ops::DerefMut for PhysicalDeviceProvokingVertexPropertiesEXTBuilder<'a> {
277    fn deref_mut(&mut self) -> &mut Self::Target {
278        &mut self.0
279    }
280}
281///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.html) · Structure
282#[doc(alias = "VkPipelineRasterizationProvokingVertexStateCreateInfoEXT")]
283#[derive(Copy, Clone)]
284#[repr(C)]
285pub struct PipelineRasterizationProvokingVertexStateCreateInfoEXT {
286    pub s_type: crate::vk1_0::StructureType,
287    pub p_next: *const std::ffi::c_void,
288    pub provoking_vertex_mode: crate::extensions::ext_provoking_vertex::ProvokingVertexModeEXT,
289}
290impl PipelineRasterizationProvokingVertexStateCreateInfoEXT {
291    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT;
292}
293impl Default for PipelineRasterizationProvokingVertexStateCreateInfoEXT {
294    fn default() -> Self {
295        Self {
296            s_type: Self::STRUCTURE_TYPE,
297            p_next: std::ptr::null(),
298            provoking_vertex_mode: Default::default(),
299        }
300    }
301}
302impl std::fmt::Debug for PipelineRasterizationProvokingVertexStateCreateInfoEXT {
303    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
304        f.debug_struct("PipelineRasterizationProvokingVertexStateCreateInfoEXT")
305            .field("s_type", &self.s_type)
306            .field("p_next", &self.p_next)
307            .field("provoking_vertex_mode", &self.provoking_vertex_mode)
308            .finish()
309    }
310}
311impl PipelineRasterizationProvokingVertexStateCreateInfoEXT {
312    #[inline]
313    pub fn into_builder<'a>(
314        self,
315    ) -> PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'a> {
316        PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder(
317            self,
318            std::marker::PhantomData,
319        )
320    }
321}
322#[derive(Copy, Clone)]
323///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPipelineRasterizationProvokingVertexStateCreateInfoEXT.html) · Builder of [`PipelineRasterizationProvokingVertexStateCreateInfoEXT`]
324#[repr(transparent)]
325pub struct PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'a>(
326    PipelineRasterizationProvokingVertexStateCreateInfoEXT,
327    std::marker::PhantomData<&'a ()>,
328);
329impl<'a> PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'a> {
330    #[inline]
331    pub fn new() -> PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'a> {
332        PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder(
333            Default::default(),
334            std::marker::PhantomData,
335        )
336    }
337    #[inline]
338    #[must_use]
339    pub fn provoking_vertex_mode(
340        mut self,
341        provoking_vertex_mode: crate::extensions::ext_provoking_vertex::ProvokingVertexModeEXT,
342    ) -> Self {
343        self.0.provoking_vertex_mode = provoking_vertex_mode as _;
344        self
345    }
346    #[inline]
347    /// Discards all lifetime information.
348    /// Use the `Deref` and `DerefMut` implementations if possible.
349    pub fn build_dangling(
350        self,
351    ) -> PipelineRasterizationProvokingVertexStateCreateInfoEXT {
352        self.0
353    }
354}
355impl<'a> std::default::Default
356for PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'a> {
357    fn default() -> PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'a> {
358        Self::new()
359    }
360}
361impl<'a> std::fmt::Debug
362for PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'a> {
363    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
364        std::fmt::Debug::fmt(&self.0, f)
365    }
366}
367impl<'a> std::ops::Deref
368for PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'a> {
369    type Target = PipelineRasterizationProvokingVertexStateCreateInfoEXT;
370    fn deref(&self) -> &Self::Target {
371        &self.0
372    }
373}
374impl<'a> std::ops::DerefMut
375for PipelineRasterizationProvokingVertexStateCreateInfoEXTBuilder<'a> {
376    fn deref_mut(&mut self) -> &mut Self::Target {
377        &mut self.0
378    }
379}