erupt/generated/extensions/
nv_coverage_reduction_mode.rs1#[doc(alias = "VK_NV_COVERAGE_REDUCTION_MODE_SPEC_VERSION")]
4pub const NV_COVERAGE_REDUCTION_MODE_SPEC_VERSION: u32 = 1;
5#[doc(alias = "VK_NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME")]
7pub const NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME: *const std::os::raw::c_char = crate::cstr!(
8 "VK_NV_coverage_reduction_mode"
9);
10pub const FN_GET_PHYSICAL_DEVICE_SUPPORTED_FRAMEBUFFER_MIXED_SAMPLES_COMBINATIONS_NV: *const std::os::raw::c_char = crate::cstr!(
12 "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV"
13);
14bitflags::bitflags! {
15 #[doc =
16 "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPipelineCoverageReductionStateCreateFlagsNV.html) · Bitmask of [`PipelineCoverageReductionStateCreateFlagBitsNV`]"]
17 #[doc(alias = "VkPipelineCoverageReductionStateCreateFlagsNV")] #[derive(Default)]
18 #[repr(transparent)] pub struct PipelineCoverageReductionStateCreateFlagsNV : u32 {
19 #[cfg(empty_bitflag_workaround)] const EMPTY_BITFLAG_WORKAROUND = 0; }
20}
21#[doc(alias = "VkPipelineCoverageReductionStateCreateFlagBitsNV")]
23#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
24#[repr(transparent)]
25pub struct PipelineCoverageReductionStateCreateFlagBitsNV(pub u32);
26impl PipelineCoverageReductionStateCreateFlagBitsNV {
27 #[inline]
28 pub const fn bitmask(&self) -> PipelineCoverageReductionStateCreateFlagsNV {
30 PipelineCoverageReductionStateCreateFlagsNV::from_bits_truncate(self.0)
31 }
32}
33impl std::fmt::Debug for PipelineCoverageReductionStateCreateFlagBitsNV {
34 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
35 f.write_str(
36 match self {
37 _ => "(unknown variant)",
38 },
39 )
40 }
41}
42impl crate::vk1_0::StructureType {
44 pub const PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV: Self = Self(
45 1000250000,
46 );
47 pub const PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV: Self = Self(1000250001);
48 pub const FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV: Self = Self(1000250002);
49}
50#[doc(alias = "VkCoverageReductionModeNV")]
52#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
53#[repr(transparent)]
54pub struct CoverageReductionModeNV(pub i32);
55impl std::fmt::Debug for CoverageReductionModeNV {
56 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
57 f.write_str(
58 match self {
59 &Self::MERGE_NV => "MERGE_NV",
60 &Self::TRUNCATE_NV => "TRUNCATE_NV",
61 _ => "(unknown variant)",
62 },
63 )
64 }
65}
66impl crate::extensions::nv_coverage_reduction_mode::CoverageReductionModeNV {
68 pub const MERGE_NV: Self = Self(0);
69 pub const TRUNCATE_NV: Self = Self(1);
70}
71#[allow(non_camel_case_types)]
73pub type PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = unsafe extern "system" fn(
74 physical_device: crate::vk1_0::PhysicalDevice,
75 p_combination_count: *mut u32,
76 p_combinations: *mut crate::extensions::nv_coverage_reduction_mode::FramebufferMixedSamplesCombinationNV,
77) -> crate::vk1_0::Result;
78impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceCoverageReductionModeFeaturesNV>
79for crate::vk1_0::DeviceCreateInfoBuilder<'a> {}
80impl<
81 'a,
82> crate::ExtendableFrom<'a, PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'_>>
83for crate::vk1_0::DeviceCreateInfoBuilder<'a> {}
84impl<'a> crate::ExtendableFrom<'a, PipelineCoverageReductionStateCreateInfoNV>
85for crate::vk1_0::PipelineMultisampleStateCreateInfoBuilder<'a> {}
86impl<'a> crate::ExtendableFrom<'a, PipelineCoverageReductionStateCreateInfoNVBuilder<'_>>
87for crate::vk1_0::PipelineMultisampleStateCreateInfoBuilder<'a> {}
88impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceCoverageReductionModeFeaturesNV>
89for crate::vk1_1::PhysicalDeviceFeatures2Builder<'a> {}
90impl<
91 'a,
92> crate::ExtendableFrom<'a, PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'_>>
93for crate::vk1_1::PhysicalDeviceFeatures2Builder<'a> {}
94#[doc(alias = "VkPhysicalDeviceCoverageReductionModeFeaturesNV")]
96#[derive(Copy, Clone)]
97#[repr(C)]
98pub struct PhysicalDeviceCoverageReductionModeFeaturesNV {
99 pub s_type: crate::vk1_0::StructureType,
100 pub p_next: *mut std::ffi::c_void,
101 pub coverage_reduction_mode: crate::vk1_0::Bool32,
102}
103impl PhysicalDeviceCoverageReductionModeFeaturesNV {
104 pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV;
105}
106impl Default for PhysicalDeviceCoverageReductionModeFeaturesNV {
107 fn default() -> Self {
108 Self {
109 s_type: Self::STRUCTURE_TYPE,
110 p_next: std::ptr::null_mut(),
111 coverage_reduction_mode: Default::default(),
112 }
113 }
114}
115impl std::fmt::Debug for PhysicalDeviceCoverageReductionModeFeaturesNV {
116 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
117 f.debug_struct("PhysicalDeviceCoverageReductionModeFeaturesNV")
118 .field("s_type", &self.s_type)
119 .field("p_next", &self.p_next)
120 .field("coverage_reduction_mode", &(self.coverage_reduction_mode != 0))
121 .finish()
122 }
123}
124impl PhysicalDeviceCoverageReductionModeFeaturesNV {
125 #[inline]
126 pub fn into_builder<'a>(
127 self,
128 ) -> PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'a> {
129 PhysicalDeviceCoverageReductionModeFeaturesNVBuilder(
130 self,
131 std::marker::PhantomData,
132 )
133 }
134}
135#[derive(Copy, Clone)]
136#[repr(transparent)]
138pub struct PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'a>(
139 PhysicalDeviceCoverageReductionModeFeaturesNV,
140 std::marker::PhantomData<&'a ()>,
141);
142impl<'a> PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'a> {
143 #[inline]
144 pub fn new() -> PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'a> {
145 PhysicalDeviceCoverageReductionModeFeaturesNVBuilder(
146 Default::default(),
147 std::marker::PhantomData,
148 )
149 }
150 #[inline]
151 #[must_use]
152 pub fn coverage_reduction_mode(mut self, coverage_reduction_mode: bool) -> Self {
153 self.0.coverage_reduction_mode = coverage_reduction_mode as _;
154 self
155 }
156 #[inline]
157 pub fn build_dangling(self) -> PhysicalDeviceCoverageReductionModeFeaturesNV {
160 self.0
161 }
162}
163impl<'a> std::default::Default
164for PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'a> {
165 fn default() -> PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'a> {
166 Self::new()
167 }
168}
169impl<'a> std::fmt::Debug for PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'a> {
170 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
171 std::fmt::Debug::fmt(&self.0, f)
172 }
173}
174impl<'a> std::ops::Deref for PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'a> {
175 type Target = PhysicalDeviceCoverageReductionModeFeaturesNV;
176 fn deref(&self) -> &Self::Target {
177 &self.0
178 }
179}
180impl<'a> std::ops::DerefMut
181for PhysicalDeviceCoverageReductionModeFeaturesNVBuilder<'a> {
182 fn deref_mut(&mut self) -> &mut Self::Target {
183 &mut self.0
184 }
185}
186#[doc(alias = "VkPipelineCoverageReductionStateCreateInfoNV")]
188#[derive(Copy, Clone)]
189#[repr(C)]
190pub struct PipelineCoverageReductionStateCreateInfoNV {
191 pub s_type: crate::vk1_0::StructureType,
192 pub p_next: *const std::ffi::c_void,
193 pub flags: crate::extensions::nv_coverage_reduction_mode::PipelineCoverageReductionStateCreateFlagsNV,
194 pub coverage_reduction_mode: crate::extensions::nv_coverage_reduction_mode::CoverageReductionModeNV,
195}
196impl PipelineCoverageReductionStateCreateInfoNV {
197 pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV;
198}
199impl Default for PipelineCoverageReductionStateCreateInfoNV {
200 fn default() -> Self {
201 Self {
202 s_type: Self::STRUCTURE_TYPE,
203 p_next: std::ptr::null(),
204 flags: Default::default(),
205 coverage_reduction_mode: Default::default(),
206 }
207 }
208}
209impl std::fmt::Debug for PipelineCoverageReductionStateCreateInfoNV {
210 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
211 f.debug_struct("PipelineCoverageReductionStateCreateInfoNV")
212 .field("s_type", &self.s_type)
213 .field("p_next", &self.p_next)
214 .field("flags", &self.flags)
215 .field("coverage_reduction_mode", &self.coverage_reduction_mode)
216 .finish()
217 }
218}
219impl PipelineCoverageReductionStateCreateInfoNV {
220 #[inline]
221 pub fn into_builder<'a>(
222 self,
223 ) -> PipelineCoverageReductionStateCreateInfoNVBuilder<'a> {
224 PipelineCoverageReductionStateCreateInfoNVBuilder(self, std::marker::PhantomData)
225 }
226}
227#[derive(Copy, Clone)]
228#[repr(transparent)]
230pub struct PipelineCoverageReductionStateCreateInfoNVBuilder<'a>(
231 PipelineCoverageReductionStateCreateInfoNV,
232 std::marker::PhantomData<&'a ()>,
233);
234impl<'a> PipelineCoverageReductionStateCreateInfoNVBuilder<'a> {
235 #[inline]
236 pub fn new() -> PipelineCoverageReductionStateCreateInfoNVBuilder<'a> {
237 PipelineCoverageReductionStateCreateInfoNVBuilder(
238 Default::default(),
239 std::marker::PhantomData,
240 )
241 }
242 #[inline]
243 #[must_use]
244 pub fn flags(
245 mut self,
246 flags: crate::extensions::nv_coverage_reduction_mode::PipelineCoverageReductionStateCreateFlagsNV,
247 ) -> Self {
248 self.0.flags = flags as _;
249 self
250 }
251 #[inline]
252 #[must_use]
253 pub fn coverage_reduction_mode(
254 mut self,
255 coverage_reduction_mode: crate::extensions::nv_coverage_reduction_mode::CoverageReductionModeNV,
256 ) -> Self {
257 self.0.coverage_reduction_mode = coverage_reduction_mode as _;
258 self
259 }
260 #[inline]
261 pub fn build_dangling(self) -> PipelineCoverageReductionStateCreateInfoNV {
264 self.0
265 }
266}
267impl<'a> std::default::Default
268for PipelineCoverageReductionStateCreateInfoNVBuilder<'a> {
269 fn default() -> PipelineCoverageReductionStateCreateInfoNVBuilder<'a> {
270 Self::new()
271 }
272}
273impl<'a> std::fmt::Debug for PipelineCoverageReductionStateCreateInfoNVBuilder<'a> {
274 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
275 std::fmt::Debug::fmt(&self.0, f)
276 }
277}
278impl<'a> std::ops::Deref for PipelineCoverageReductionStateCreateInfoNVBuilder<'a> {
279 type Target = PipelineCoverageReductionStateCreateInfoNV;
280 fn deref(&self) -> &Self::Target {
281 &self.0
282 }
283}
284impl<'a> std::ops::DerefMut for PipelineCoverageReductionStateCreateInfoNVBuilder<'a> {
285 fn deref_mut(&mut self) -> &mut Self::Target {
286 &mut self.0
287 }
288}
289#[doc(alias = "VkFramebufferMixedSamplesCombinationNV")]
291#[derive(Copy, Clone)]
292#[repr(C)]
293pub struct FramebufferMixedSamplesCombinationNV {
294 pub s_type: crate::vk1_0::StructureType,
295 pub p_next: *mut std::ffi::c_void,
296 pub coverage_reduction_mode: crate::extensions::nv_coverage_reduction_mode::CoverageReductionModeNV,
297 pub rasterization_samples: crate::vk1_0::SampleCountFlagBits,
298 pub depth_stencil_samples: crate::vk1_0::SampleCountFlags,
299 pub color_samples: crate::vk1_0::SampleCountFlags,
300}
301impl FramebufferMixedSamplesCombinationNV {
302 pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV;
303}
304impl Default for FramebufferMixedSamplesCombinationNV {
305 fn default() -> Self {
306 Self {
307 s_type: Self::STRUCTURE_TYPE,
308 p_next: std::ptr::null_mut(),
309 coverage_reduction_mode: Default::default(),
310 rasterization_samples: Default::default(),
311 depth_stencil_samples: Default::default(),
312 color_samples: Default::default(),
313 }
314 }
315}
316impl std::fmt::Debug for FramebufferMixedSamplesCombinationNV {
317 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
318 f.debug_struct("FramebufferMixedSamplesCombinationNV")
319 .field("s_type", &self.s_type)
320 .field("p_next", &self.p_next)
321 .field("coverage_reduction_mode", &self.coverage_reduction_mode)
322 .field("rasterization_samples", &self.rasterization_samples)
323 .field("depth_stencil_samples", &self.depth_stencil_samples)
324 .field("color_samples", &self.color_samples)
325 .finish()
326 }
327}
328impl FramebufferMixedSamplesCombinationNV {
329 #[inline]
330 pub fn into_builder<'a>(self) -> FramebufferMixedSamplesCombinationNVBuilder<'a> {
331 FramebufferMixedSamplesCombinationNVBuilder(self, std::marker::PhantomData)
332 }
333}
334#[derive(Copy, Clone)]
335#[repr(transparent)]
337pub struct FramebufferMixedSamplesCombinationNVBuilder<'a>(
338 FramebufferMixedSamplesCombinationNV,
339 std::marker::PhantomData<&'a ()>,
340);
341impl<'a> FramebufferMixedSamplesCombinationNVBuilder<'a> {
342 #[inline]
343 pub fn new() -> FramebufferMixedSamplesCombinationNVBuilder<'a> {
344 FramebufferMixedSamplesCombinationNVBuilder(
345 Default::default(),
346 std::marker::PhantomData,
347 )
348 }
349 #[inline]
350 #[must_use]
351 pub fn coverage_reduction_mode(
352 mut self,
353 coverage_reduction_mode: crate::extensions::nv_coverage_reduction_mode::CoverageReductionModeNV,
354 ) -> Self {
355 self.0.coverage_reduction_mode = coverage_reduction_mode as _;
356 self
357 }
358 #[inline]
359 #[must_use]
360 pub fn rasterization_samples(
361 mut self,
362 rasterization_samples: crate::vk1_0::SampleCountFlagBits,
363 ) -> Self {
364 self.0.rasterization_samples = rasterization_samples as _;
365 self
366 }
367 #[inline]
368 #[must_use]
369 pub fn depth_stencil_samples(
370 mut self,
371 depth_stencil_samples: crate::vk1_0::SampleCountFlags,
372 ) -> Self {
373 self.0.depth_stencil_samples = depth_stencil_samples as _;
374 self
375 }
376 #[inline]
377 #[must_use]
378 pub fn color_samples(
379 mut self,
380 color_samples: crate::vk1_0::SampleCountFlags,
381 ) -> Self {
382 self.0.color_samples = color_samples as _;
383 self
384 }
385 #[inline]
386 pub fn build_dangling(self) -> FramebufferMixedSamplesCombinationNV {
389 self.0
390 }
391}
392impl<'a> std::default::Default for FramebufferMixedSamplesCombinationNVBuilder<'a> {
393 fn default() -> FramebufferMixedSamplesCombinationNVBuilder<'a> {
394 Self::new()
395 }
396}
397impl<'a> std::fmt::Debug for FramebufferMixedSamplesCombinationNVBuilder<'a> {
398 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
399 std::fmt::Debug::fmt(&self.0, f)
400 }
401}
402impl<'a> std::ops::Deref for FramebufferMixedSamplesCombinationNVBuilder<'a> {
403 type Target = FramebufferMixedSamplesCombinationNV;
404 fn deref(&self) -> &Self::Target {
405 &self.0
406 }
407}
408impl<'a> std::ops::DerefMut for FramebufferMixedSamplesCombinationNVBuilder<'a> {
409 fn deref_mut(&mut self) -> &mut Self::Target {
410 &mut self.0
411 }
412}
413impl crate::InstanceLoader {
415 #[inline]
416 #[track_caller]
417 #[doc(alias = "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV")]
419 pub unsafe fn get_physical_device_supported_framebuffer_mixed_samples_combinations_nv(
420 &self,
421 physical_device: crate::vk1_0::PhysicalDevice,
422 combination_count: Option<u32>,
423 combinations_callback: impl FnMut(
424 &mut crate::SmallVec<
425 crate::extensions::nv_coverage_reduction_mode::FramebufferMixedSamplesCombinationNV,
426 >,
427 ) -> (),
428 ) -> crate::utils::VulkanResult<
429 crate::SmallVec<
430 crate::extensions::nv_coverage_reduction_mode::FramebufferMixedSamplesCombinationNV,
431 >,
432 > {
433 let _function = self
434 .get_physical_device_supported_framebuffer_mixed_samples_combinations_nv
435 .expect(crate::NOT_LOADED_MESSAGE);
436 let mut combination_count = match combination_count {
437 Some(v) => v,
438 None => {
439 let mut v = Default::default();
440 _function(physical_device as _, &mut v, std::ptr::null_mut());
441 v
442 }
443 };
444 let mut combinations = crate::SmallVec::from_elem(
445 Default::default(),
446 combination_count as _,
447 );
448 let mut _callback = combinations_callback;
449 _callback(&mut combinations);
450 let _return = _function(
451 physical_device as _,
452 &mut combination_count,
453 combinations.as_mut_ptr(),
454 );
455 crate::utils::VulkanResult::new(_return, combinations)
456 }
457}