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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
#[doc = "<s>Vulkan Manual Page</s> · Constant"]
#[doc(alias = "VK_EXT_DEVICE_MEMORY_REPORT_SPEC_VERSION")]
pub const EXT_DEVICE_MEMORY_REPORT_SPEC_VERSION: u32 = 2;
#[doc = "<s>Vulkan Manual Page</s> · Constant"]
#[doc(alias = "VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME")]
pub const EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME: *const std::os::raw::c_char =
    crate::cstr!("VK_EXT_device_memory_report");
bitflags::bitflags! { # [doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemoryReportFlagsEXT.html) · Bitmask of [`DeviceMemoryReportFlagBitsEXT`]"] # [doc (alias = "VkDeviceMemoryReportFlagsEXT")] # [derive (Default)] # [repr (transparent)] pub struct DeviceMemoryReportFlagsEXT : u32 { # [cfg (empty_bitflag_workaround)] const EMPTY_BITFLAG_WORKAROUND = 0 ; } }
#[doc = "<s>Vulkan Manual Page</s> · Bits enum of [`DeviceMemoryReportFlagsEXT`]"]
#[doc(alias = "VkDeviceMemoryReportFlagBitsEXT")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct DeviceMemoryReportFlagBitsEXT(pub u32);
impl DeviceMemoryReportFlagBitsEXT {
    #[inline]
    #[doc = "Converts this enum variant to the corresponding bitmask"]
    pub const fn bitmask(&self) -> DeviceMemoryReportFlagsEXT {
        DeviceMemoryReportFlagsEXT::from_bits_truncate(self.0)
    }
}
impl std::fmt::Debug for DeviceMemoryReportFlagBitsEXT {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.write_str(match self {
            _ => "(unknown variant)",
        })
    }
}
#[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemoryReportEventTypeEXT.html) · Enum"]
#[doc(alias = "VkDeviceMemoryReportEventTypeEXT")]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Default, Ord, PartialOrd)]
#[repr(transparent)]
pub struct DeviceMemoryReportEventTypeEXT(pub i32);
impl std::fmt::Debug for DeviceMemoryReportEventTypeEXT {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.write_str(match self {
            &Self::ALLOCATE_EXT => "ALLOCATE_EXT",
            &Self::FREE_EXT => "FREE_EXT",
            &Self::IMPORT_EXT => "IMPORT_EXT",
            &Self::UNIMPORT_EXT => "UNIMPORT_EXT",
            &Self::ALLOCATION_FAILED_EXT => "ALLOCATION_FAILED_EXT",
            _ => "(unknown variant)",
        })
    }
}
#[doc = "Provided by [`crate::extensions::ext_device_memory_report`]"]
impl DeviceMemoryReportEventTypeEXT {
    pub const ALLOCATE_EXT: Self = Self(0);
    pub const FREE_EXT: Self = Self(1);
    pub const IMPORT_EXT: Self = Self(2);
    pub const UNIMPORT_EXT: Self = Self(3);
    pub const ALLOCATION_FAILED_EXT: Self = Self(4);
}
#[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkDeviceMemoryReportCallbackEXT.html) · Function"]
#[allow(non_camel_case_types)]
pub type PFN_vkDeviceMemoryReportCallbackEXT = unsafe extern "system" fn (p_callback_data : * const crate :: extensions :: ext_device_memory_report :: DeviceMemoryReportCallbackDataEXT , p_user_data : * mut std :: ffi :: c_void) -> () ;
#[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.html) · Structure"]
#[doc(alias = "VkPhysicalDeviceDeviceMemoryReportFeaturesEXT")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct PhysicalDeviceDeviceMemoryReportFeaturesEXT {
    pub s_type: crate::vk1_0::StructureType,
    pub p_next: *mut std::ffi::c_void,
    pub device_memory_report: crate::vk1_0::Bool32,
}
impl Default for PhysicalDeviceDeviceMemoryReportFeaturesEXT {
    fn default() -> Self {
        Self {
            s_type: crate::vk1_0::StructureType::PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT,
            p_next: std::ptr::null_mut(),
            device_memory_report: Default::default(),
        }
    }
}
impl std::fmt::Debug for PhysicalDeviceDeviceMemoryReportFeaturesEXT {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("PhysicalDeviceDeviceMemoryReportFeaturesEXT")
            .field("s_type", &self.s_type)
            .field("p_next", &self.p_next)
            .field("device_memory_report", &(self.device_memory_report != 0))
            .finish()
    }
}
impl PhysicalDeviceDeviceMemoryReportFeaturesEXT {
    #[inline]
    pub fn into_builder<'a>(self) -> PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder<'a> {
        PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder(self, std::marker::PhantomData)
    }
}
#[derive(Copy, Clone)]
#[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceDeviceMemoryReportFeaturesEXT.html) · Builder of [`PhysicalDeviceDeviceMemoryReportFeaturesEXT`]"]
#[repr(transparent)]
pub struct PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder<'a>(
    PhysicalDeviceDeviceMemoryReportFeaturesEXT,
    std::marker::PhantomData<&'a ()>,
);
impl<'a> PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder<'a> {
    #[inline]
    pub fn new() -> PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder<'a> {
        PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder(
            Default::default(),
            std::marker::PhantomData,
        )
    }
    #[inline]
    pub fn device_memory_report(mut self, device_memory_report: bool) -> Self {
        self.0.device_memory_report = device_memory_report as _;
        self
    }
    #[inline]
    #[doc = "Discards all lifetime information. Use the `Deref` and `DerefMut` implementations if possible."]
    pub fn build(self) -> PhysicalDeviceDeviceMemoryReportFeaturesEXT {
        self.0
    }
}
impl<'a> std::default::Default for PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder<'a> {
    fn default() -> PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder<'a> {
        Self::new()
    }
}
impl<'a> std::fmt::Debug for PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder<'a> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        std::fmt::Debug::fmt(&self.0, f)
    }
}
impl<'a> std::ops::Deref for PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder<'a> {
    type Target = PhysicalDeviceDeviceMemoryReportFeaturesEXT;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl<'a> std::ops::DerefMut for PhysicalDeviceDeviceMemoryReportFeaturesEXTBuilder<'a> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
#[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceDeviceMemoryReportCreateInfoEXT.html) · Structure"]
#[doc(alias = "VkDeviceDeviceMemoryReportCreateInfoEXT")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct DeviceDeviceMemoryReportCreateInfoEXT {
    pub s_type: crate::vk1_0::StructureType,
    pub p_next: *const std::ffi::c_void,
    pub flags: crate::extensions::ext_device_memory_report::DeviceMemoryReportFlagsEXT,
    pub pfn_user_callback:
        Option<crate::extensions::ext_device_memory_report::PFN_vkDeviceMemoryReportCallbackEXT>,
    pub p_user_data: *mut std::ffi::c_void,
}
impl Default for DeviceDeviceMemoryReportCreateInfoEXT {
    fn default() -> Self {
        Self {
            s_type: crate::vk1_0::StructureType::DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT,
            p_next: std::ptr::null(),
            flags: Default::default(),
            pfn_user_callback: Default::default(),
            p_user_data: std::ptr::null_mut(),
        }
    }
}
impl std::fmt::Debug for DeviceDeviceMemoryReportCreateInfoEXT {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("DeviceDeviceMemoryReportCreateInfoEXT")
            .field("s_type", &self.s_type)
            .field("p_next", &self.p_next)
            .field("flags", &self.flags)
            .field("pfn_user_callback", unsafe {
                &std::mem::transmute::<_, *const ()>(self.pfn_user_callback)
            })
            .field("p_user_data", &self.p_user_data)
            .finish()
    }
}
impl DeviceDeviceMemoryReportCreateInfoEXT {
    #[inline]
    pub fn into_builder<'a>(self) -> DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a> {
        DeviceDeviceMemoryReportCreateInfoEXTBuilder(self, std::marker::PhantomData)
    }
}
#[derive(Copy, Clone)]
#[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceDeviceMemoryReportCreateInfoEXT.html) · Builder of [`DeviceDeviceMemoryReportCreateInfoEXT`]"]
#[repr(transparent)]
pub struct DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a>(
    DeviceDeviceMemoryReportCreateInfoEXT,
    std::marker::PhantomData<&'a ()>,
);
impl<'a> DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a> {
    #[inline]
    pub fn new() -> DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a> {
        DeviceDeviceMemoryReportCreateInfoEXTBuilder(Default::default(), std::marker::PhantomData)
    }
    #[inline]
    pub fn flags(
        mut self,
        flags: crate::extensions::ext_device_memory_report::DeviceMemoryReportFlagsEXT,
    ) -> Self {
        self.0.flags = flags as _;
        self
    }
    #[inline]
    pub fn pfn_user_callback(
        mut self,
        pfn_user_callback: Option<
            crate::extensions::ext_device_memory_report::PFN_vkDeviceMemoryReportCallbackEXT,
        >,
    ) -> Self {
        self.0.pfn_user_callback = pfn_user_callback as _;
        self
    }
    #[inline]
    pub fn user_data(mut self, user_data: *mut std::ffi::c_void) -> Self {
        self.0.p_user_data = user_data;
        self
    }
    #[inline]
    #[doc = "Discards all lifetime information. Use the `Deref` and `DerefMut` implementations if possible."]
    pub fn build(self) -> DeviceDeviceMemoryReportCreateInfoEXT {
        self.0
    }
}
impl<'a> std::default::Default for DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a> {
    fn default() -> DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a> {
        Self::new()
    }
}
impl<'a> std::fmt::Debug for DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        std::fmt::Debug::fmt(&self.0, f)
    }
}
impl<'a> std::ops::Deref for DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a> {
    type Target = DeviceDeviceMemoryReportCreateInfoEXT;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl<'a> std::ops::DerefMut for DeviceDeviceMemoryReportCreateInfoEXTBuilder<'a> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
#[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemoryReportCallbackDataEXT.html) · Structure"]
#[doc(alias = "VkDeviceMemoryReportCallbackDataEXT")]
#[derive(Copy, Clone)]
#[repr(C)]
pub struct DeviceMemoryReportCallbackDataEXT {
    pub s_type: crate::vk1_0::StructureType,
    pub p_next: *const std::ffi::c_void,
    pub flags: crate::extensions::ext_device_memory_report::DeviceMemoryReportFlagsEXT,
    pub _type: crate::extensions::ext_device_memory_report::DeviceMemoryReportEventTypeEXT,
    pub memory_object_id: u64,
    pub size: crate::vk1_0::DeviceSize,
    pub object_type: crate::vk1_0::ObjectType,
    pub object_handle: u64,
    pub heap_index: u32,
}
impl Default for DeviceMemoryReportCallbackDataEXT {
    fn default() -> Self {
        Self {
            s_type: crate::vk1_0::StructureType::DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT,
            p_next: std::ptr::null(),
            flags: Default::default(),
            _type: Default::default(),
            memory_object_id: Default::default(),
            size: Default::default(),
            object_type: Default::default(),
            object_handle: Default::default(),
            heap_index: Default::default(),
        }
    }
}
impl std::fmt::Debug for DeviceMemoryReportCallbackDataEXT {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        f.debug_struct("DeviceMemoryReportCallbackDataEXT")
            .field("s_type", &self.s_type)
            .field("p_next", &self.p_next)
            .field("flags", &self.flags)
            .field("_type", &self._type)
            .field("memory_object_id", &self.memory_object_id)
            .field("size", &self.size)
            .field("object_type", &self.object_type)
            .field("object_handle", &self.object_handle)
            .field("heap_index", &self.heap_index)
            .finish()
    }
}
impl DeviceMemoryReportCallbackDataEXT {
    #[inline]
    pub fn into_builder<'a>(self) -> DeviceMemoryReportCallbackDataEXTBuilder<'a> {
        DeviceMemoryReportCallbackDataEXTBuilder(self, std::marker::PhantomData)
    }
}
#[derive(Copy, Clone)]
#[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemoryReportCallbackDataEXT.html) · Builder of [`DeviceMemoryReportCallbackDataEXT`]"]
#[repr(transparent)]
pub struct DeviceMemoryReportCallbackDataEXTBuilder<'a>(
    DeviceMemoryReportCallbackDataEXT,
    std::marker::PhantomData<&'a ()>,
);
impl<'a> DeviceMemoryReportCallbackDataEXTBuilder<'a> {
    #[inline]
    pub fn new() -> DeviceMemoryReportCallbackDataEXTBuilder<'a> {
        DeviceMemoryReportCallbackDataEXTBuilder(Default::default(), std::marker::PhantomData)
    }
    #[inline]
    pub fn flags(
        mut self,
        flags: crate::extensions::ext_device_memory_report::DeviceMemoryReportFlagsEXT,
    ) -> Self {
        self.0.flags = flags as _;
        self
    }
    #[inline]
    pub fn _type(
        mut self,
        _type: crate::extensions::ext_device_memory_report::DeviceMemoryReportEventTypeEXT,
    ) -> Self {
        self.0._type = _type as _;
        self
    }
    #[inline]
    pub fn memory_object_id(mut self, memory_object_id: u64) -> Self {
        self.0.memory_object_id = memory_object_id as _;
        self
    }
    #[inline]
    pub fn size(mut self, size: crate::vk1_0::DeviceSize) -> Self {
        self.0.size = size as _;
        self
    }
    #[inline]
    pub fn object_type(mut self, object_type: crate::vk1_0::ObjectType) -> Self {
        self.0.object_type = object_type as _;
        self
    }
    #[inline]
    pub fn object_handle(mut self, object_handle: u64) -> Self {
        self.0.object_handle = object_handle as _;
        self
    }
    #[inline]
    pub fn heap_index(mut self, heap_index: u32) -> Self {
        self.0.heap_index = heap_index as _;
        self
    }
    #[inline]
    #[doc = "Discards all lifetime information. Use the `Deref` and `DerefMut` implementations if possible."]
    pub fn build(self) -> DeviceMemoryReportCallbackDataEXT {
        self.0
    }
}
impl<'a> std::default::Default for DeviceMemoryReportCallbackDataEXTBuilder<'a> {
    fn default() -> DeviceMemoryReportCallbackDataEXTBuilder<'a> {
        Self::new()
    }
}
impl<'a> std::fmt::Debug for DeviceMemoryReportCallbackDataEXTBuilder<'a> {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        std::fmt::Debug::fmt(&self.0, f)
    }
}
impl<'a> std::ops::Deref for DeviceMemoryReportCallbackDataEXTBuilder<'a> {
    type Target = DeviceMemoryReportCallbackDataEXT;
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl<'a> std::ops::DerefMut for DeviceMemoryReportCallbackDataEXTBuilder<'a> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}