erupt/generated/extensions/
nvx_image_view_handle.rs

1// DO NOT EDIT: @generated by erupt's generator
2///<s>Vulkan Manual Page</s> · Constant
3#[doc(alias = "VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION")]
4pub const NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION: u32 = 2;
5///<s>Vulkan Manual Page</s> · Constant
6#[doc(alias = "VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME")]
7pub const NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME: *const std::os::raw::c_char = crate::cstr!(
8    "VK_NVX_image_view_handle"
9);
10///<s>Vulkan Manual Page</s> · Constant
11pub const FN_GET_IMAGE_VIEW_HANDLE_NVX: *const std::os::raw::c_char = crate::cstr!(
12    "vkGetImageViewHandleNVX"
13);
14///<s>Vulkan Manual Page</s> · Constant
15pub const FN_GET_IMAGE_VIEW_ADDRESS_NVX: *const std::os::raw::c_char = crate::cstr!(
16    "vkGetImageViewAddressNVX"
17);
18///Provided by [`crate::extensions::nvx_image_view_handle`]
19impl crate::vk1_0::StructureType {
20    pub const IMAGE_VIEW_HANDLE_INFO_NVX: Self = Self(1000030000);
21    pub const IMAGE_VIEW_ADDRESS_PROPERTIES_NVX: Self = Self(1000030001);
22}
23///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkGetImageViewHandleNVX.html) · Function
24#[allow(non_camel_case_types)]
25pub type PFN_vkGetImageViewHandleNVX = unsafe extern "system" fn(
26    device: crate::vk1_0::Device,
27    p_info: *const crate::extensions::nvx_image_view_handle::ImageViewHandleInfoNVX,
28) -> u32;
29///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkGetImageViewAddressNVX.html) · Function
30#[allow(non_camel_case_types)]
31pub type PFN_vkGetImageViewAddressNVX = unsafe extern "system" fn(
32    device: crate::vk1_0::Device,
33    image_view: crate::vk1_0::ImageView,
34    p_properties: *mut crate::extensions::nvx_image_view_handle::ImageViewAddressPropertiesNVX,
35) -> crate::vk1_0::Result;
36///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkImageViewHandleInfoNVX.html) · Structure
37#[doc(alias = "VkImageViewHandleInfoNVX")]
38#[derive(Copy, Clone)]
39#[repr(C)]
40pub struct ImageViewHandleInfoNVX {
41    pub s_type: crate::vk1_0::StructureType,
42    pub p_next: *const std::ffi::c_void,
43    pub image_view: crate::vk1_0::ImageView,
44    pub descriptor_type: crate::vk1_0::DescriptorType,
45    pub sampler: crate::vk1_0::Sampler,
46}
47impl ImageViewHandleInfoNVX {
48    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::IMAGE_VIEW_HANDLE_INFO_NVX;
49}
50impl Default for ImageViewHandleInfoNVX {
51    fn default() -> Self {
52        Self {
53            s_type: Self::STRUCTURE_TYPE,
54            p_next: std::ptr::null(),
55            image_view: Default::default(),
56            descriptor_type: Default::default(),
57            sampler: Default::default(),
58        }
59    }
60}
61impl std::fmt::Debug for ImageViewHandleInfoNVX {
62    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
63        f.debug_struct("ImageViewHandleInfoNVX")
64            .field("s_type", &self.s_type)
65            .field("p_next", &self.p_next)
66            .field("image_view", &self.image_view)
67            .field("descriptor_type", &self.descriptor_type)
68            .field("sampler", &self.sampler)
69            .finish()
70    }
71}
72impl ImageViewHandleInfoNVX {
73    #[inline]
74    pub fn into_builder<'a>(self) -> ImageViewHandleInfoNVXBuilder<'a> {
75        ImageViewHandleInfoNVXBuilder(self, std::marker::PhantomData)
76    }
77}
78#[derive(Copy, Clone)]
79///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkImageViewHandleInfoNVX.html) · Builder of [`ImageViewHandleInfoNVX`]
80#[repr(transparent)]
81pub struct ImageViewHandleInfoNVXBuilder<'a>(
82    ImageViewHandleInfoNVX,
83    std::marker::PhantomData<&'a ()>,
84);
85impl<'a> ImageViewHandleInfoNVXBuilder<'a> {
86    #[inline]
87    pub fn new() -> ImageViewHandleInfoNVXBuilder<'a> {
88        ImageViewHandleInfoNVXBuilder(Default::default(), std::marker::PhantomData)
89    }
90    #[inline]
91    #[must_use]
92    pub fn image_view(mut self, image_view: crate::vk1_0::ImageView) -> Self {
93        self.0.image_view = image_view as _;
94        self
95    }
96    #[inline]
97    #[must_use]
98    pub fn descriptor_type(
99        mut self,
100        descriptor_type: crate::vk1_0::DescriptorType,
101    ) -> Self {
102        self.0.descriptor_type = descriptor_type as _;
103        self
104    }
105    #[inline]
106    #[must_use]
107    pub fn sampler(mut self, sampler: crate::vk1_0::Sampler) -> Self {
108        self.0.sampler = sampler as _;
109        self
110    }
111    #[inline]
112    /// Discards all lifetime information.
113    /// Use the `Deref` and `DerefMut` implementations if possible.
114    pub fn build_dangling(self) -> ImageViewHandleInfoNVX {
115        self.0
116    }
117}
118impl<'a> std::default::Default for ImageViewHandleInfoNVXBuilder<'a> {
119    fn default() -> ImageViewHandleInfoNVXBuilder<'a> {
120        Self::new()
121    }
122}
123impl<'a> std::fmt::Debug for ImageViewHandleInfoNVXBuilder<'a> {
124    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
125        std::fmt::Debug::fmt(&self.0, f)
126    }
127}
128impl<'a> std::ops::Deref for ImageViewHandleInfoNVXBuilder<'a> {
129    type Target = ImageViewHandleInfoNVX;
130    fn deref(&self) -> &Self::Target {
131        &self.0
132    }
133}
134impl<'a> std::ops::DerefMut for ImageViewHandleInfoNVXBuilder<'a> {
135    fn deref_mut(&mut self) -> &mut Self::Target {
136        &mut self.0
137    }
138}
139///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkImageViewAddressPropertiesNVX.html) · Structure
140#[doc(alias = "VkImageViewAddressPropertiesNVX")]
141#[derive(Copy, Clone)]
142#[repr(C)]
143pub struct ImageViewAddressPropertiesNVX {
144    pub s_type: crate::vk1_0::StructureType,
145    pub p_next: *mut std::ffi::c_void,
146    pub device_address: crate::vk1_0::DeviceAddress,
147    pub size: crate::vk1_0::DeviceSize,
148}
149impl ImageViewAddressPropertiesNVX {
150    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::IMAGE_VIEW_ADDRESS_PROPERTIES_NVX;
151}
152impl Default for ImageViewAddressPropertiesNVX {
153    fn default() -> Self {
154        Self {
155            s_type: Self::STRUCTURE_TYPE,
156            p_next: std::ptr::null_mut(),
157            device_address: Default::default(),
158            size: Default::default(),
159        }
160    }
161}
162impl std::fmt::Debug for ImageViewAddressPropertiesNVX {
163    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
164        f.debug_struct("ImageViewAddressPropertiesNVX")
165            .field("s_type", &self.s_type)
166            .field("p_next", &self.p_next)
167            .field("device_address", &self.device_address)
168            .field("size", &self.size)
169            .finish()
170    }
171}
172impl ImageViewAddressPropertiesNVX {
173    #[inline]
174    pub fn into_builder<'a>(self) -> ImageViewAddressPropertiesNVXBuilder<'a> {
175        ImageViewAddressPropertiesNVXBuilder(self, std::marker::PhantomData)
176    }
177}
178#[derive(Copy, Clone)]
179///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkImageViewAddressPropertiesNVX.html) · Builder of [`ImageViewAddressPropertiesNVX`]
180#[repr(transparent)]
181pub struct ImageViewAddressPropertiesNVXBuilder<'a>(
182    ImageViewAddressPropertiesNVX,
183    std::marker::PhantomData<&'a ()>,
184);
185impl<'a> ImageViewAddressPropertiesNVXBuilder<'a> {
186    #[inline]
187    pub fn new() -> ImageViewAddressPropertiesNVXBuilder<'a> {
188        ImageViewAddressPropertiesNVXBuilder(
189            Default::default(),
190            std::marker::PhantomData,
191        )
192    }
193    #[inline]
194    #[must_use]
195    pub fn device_address(
196        mut self,
197        device_address: crate::vk1_0::DeviceAddress,
198    ) -> Self {
199        self.0.device_address = device_address as _;
200        self
201    }
202    #[inline]
203    #[must_use]
204    pub fn size(mut self, size: crate::vk1_0::DeviceSize) -> Self {
205        self.0.size = size as _;
206        self
207    }
208    #[inline]
209    /// Discards all lifetime information.
210    /// Use the `Deref` and `DerefMut` implementations if possible.
211    pub fn build_dangling(self) -> ImageViewAddressPropertiesNVX {
212        self.0
213    }
214}
215impl<'a> std::default::Default for ImageViewAddressPropertiesNVXBuilder<'a> {
216    fn default() -> ImageViewAddressPropertiesNVXBuilder<'a> {
217        Self::new()
218    }
219}
220impl<'a> std::fmt::Debug for ImageViewAddressPropertiesNVXBuilder<'a> {
221    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
222        std::fmt::Debug::fmt(&self.0, f)
223    }
224}
225impl<'a> std::ops::Deref for ImageViewAddressPropertiesNVXBuilder<'a> {
226    type Target = ImageViewAddressPropertiesNVX;
227    fn deref(&self) -> &Self::Target {
228        &self.0
229    }
230}
231impl<'a> std::ops::DerefMut for ImageViewAddressPropertiesNVXBuilder<'a> {
232    fn deref_mut(&mut self) -> &mut Self::Target {
233        &mut self.0
234    }
235}
236///Provided by [`crate::extensions::nvx_image_view_handle`]
237impl crate::DeviceLoader {
238    #[inline]
239    #[track_caller]
240    ///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkGetImageViewHandleNVX.html) · Function
241    #[doc(alias = "vkGetImageViewHandleNVX")]
242    pub unsafe fn get_image_view_handle_nvx(
243        &self,
244        info: &crate::extensions::nvx_image_view_handle::ImageViewHandleInfoNVX,
245    ) -> u32 {
246        let _function = self.get_image_view_handle_nvx.expect(crate::NOT_LOADED_MESSAGE);
247        let _return = _function(self.handle, info as _);
248        _return
249    }
250    #[inline]
251    #[track_caller]
252    ///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkGetImageViewAddressNVX.html) · Function
253    #[doc(alias = "vkGetImageViewAddressNVX")]
254    pub unsafe fn get_image_view_address_nvx(
255        &self,
256        image_view: crate::vk1_0::ImageView,
257        properties: &mut crate::extensions::nvx_image_view_handle::ImageViewAddressPropertiesNVX,
258    ) -> crate::utils::VulkanResult<()> {
259        let _function = self
260            .get_image_view_address_nvx
261            .expect(crate::NOT_LOADED_MESSAGE);
262        let _return = _function(self.handle, image_view as _, properties as _);
263        crate::utils::VulkanResult::new(_return, ())
264    }
265}