1 use crate::vk::aliases::*; 2 use crate::vk::bitflags::*; 3 use crate::vk::constants::*; 4 use crate::vk::enums::*; 5 use crate::vk::platform_types::*; 6 use crate::vk::{ptr_chain_iter, Handle}; 7 use std::fmt; 8 use std::os::raw::*; 9 pub const API_VERSION_1_0: u32 = crate::vk::make_version(1, 0, 0); 10 pub const API_VERSION_1_1: u32 = crate::vk::make_version(1, 1, 0); 11 pub const API_VERSION_1_2: u32 = crate::vk::make_version(1, 2, 0); 12 pub const HEADER_VERSION: u32 = 168u32; 13 pub const HEADER_VERSION_COMPLETE: u32 = crate::vk::make_version(1, 2, HEADER_VERSION); 14 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSampleMask.html>"] 15 pub type SampleMask = u32; 16 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBool32.html>"] 17 pub type Bool32 = u32; 18 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFlags.html>"] 19 pub type Flags = u32; 20 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceSize.html>"] 21 pub type DeviceSize = u64; 22 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceAddress.html>"] 23 pub type DeviceAddress = u64; 24 #[repr(transparent)] 25 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 26 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryPoolCreateFlags.html>"] 27 pub struct QueryPoolCreateFlags(pub(crate) Flags); 28 vk_bitflags_wrapped!(QueryPoolCreateFlags, 0b0, Flags); 29 #[repr(transparent)] 30 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 31 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineLayoutCreateFlags.html>"] 32 pub struct PipelineLayoutCreateFlags(pub(crate) Flags); 33 vk_bitflags_wrapped!(PipelineLayoutCreateFlags, 0b0, Flags); 34 #[repr(transparent)] 35 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 36 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDepthStencilStateCreateFlags.html>"] 37 pub struct PipelineDepthStencilStateCreateFlags(pub(crate) Flags); 38 vk_bitflags_wrapped!(PipelineDepthStencilStateCreateFlags, 0b0, Flags); 39 #[repr(transparent)] 40 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 41 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDynamicStateCreateFlags.html>"] 42 pub struct PipelineDynamicStateCreateFlags(pub(crate) Flags); 43 vk_bitflags_wrapped!(PipelineDynamicStateCreateFlags, 0b0, Flags); 44 #[repr(transparent)] 45 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 46 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineColorBlendStateCreateFlags.html>"] 47 pub struct PipelineColorBlendStateCreateFlags(pub(crate) Flags); 48 vk_bitflags_wrapped!(PipelineColorBlendStateCreateFlags, 0b0, Flags); 49 #[repr(transparent)] 50 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 51 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineMultisampleStateCreateFlags.html>"] 52 pub struct PipelineMultisampleStateCreateFlags(pub(crate) Flags); 53 vk_bitflags_wrapped!(PipelineMultisampleStateCreateFlags, 0b0, Flags); 54 #[repr(transparent)] 55 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 56 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationStateCreateFlags.html>"] 57 pub struct PipelineRasterizationStateCreateFlags(pub(crate) Flags); 58 vk_bitflags_wrapped!(PipelineRasterizationStateCreateFlags, 0b0, Flags); 59 #[repr(transparent)] 60 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 61 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineViewportStateCreateFlags.html>"] 62 pub struct PipelineViewportStateCreateFlags(pub(crate) Flags); 63 vk_bitflags_wrapped!(PipelineViewportStateCreateFlags, 0b0, Flags); 64 #[repr(transparent)] 65 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 66 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineTessellationStateCreateFlags.html>"] 67 pub struct PipelineTessellationStateCreateFlags(pub(crate) Flags); 68 vk_bitflags_wrapped!(PipelineTessellationStateCreateFlags, 0b0, Flags); 69 #[repr(transparent)] 70 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 71 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineInputAssemblyStateCreateFlags.html>"] 72 pub struct PipelineInputAssemblyStateCreateFlags(pub(crate) Flags); 73 vk_bitflags_wrapped!(PipelineInputAssemblyStateCreateFlags, 0b0, Flags); 74 #[repr(transparent)] 75 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 76 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineVertexInputStateCreateFlags.html>"] 77 pub struct PipelineVertexInputStateCreateFlags(pub(crate) Flags); 78 vk_bitflags_wrapped!(PipelineVertexInputStateCreateFlags, 0b0, Flags); 79 #[repr(transparent)] 80 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 81 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferViewCreateFlags.html>"] 82 pub struct BufferViewCreateFlags(pub(crate) Flags); 83 vk_bitflags_wrapped!(BufferViewCreateFlags, 0b0, Flags); 84 #[repr(transparent)] 85 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 86 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstanceCreateFlags.html>"] 87 pub struct InstanceCreateFlags(pub(crate) Flags); 88 vk_bitflags_wrapped!(InstanceCreateFlags, 0b0, Flags); 89 #[repr(transparent)] 90 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 91 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceCreateFlags.html>"] 92 pub struct DeviceCreateFlags(pub(crate) Flags); 93 vk_bitflags_wrapped!(DeviceCreateFlags, 0b0, Flags); 94 #[repr(transparent)] 95 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 96 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSemaphoreCreateFlags.html>"] 97 pub struct SemaphoreCreateFlags(pub(crate) Flags); 98 vk_bitflags_wrapped!(SemaphoreCreateFlags, 0b0, Flags); 99 #[repr(transparent)] 100 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 101 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkEventCreateFlags.html>"] 102 pub struct EventCreateFlags(pub(crate) Flags); 103 vk_bitflags_wrapped!(EventCreateFlags, 0b0, Flags); 104 #[repr(transparent)] 105 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 106 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryMapFlags.html>"] 107 pub struct MemoryMapFlags(pub(crate) Flags); 108 vk_bitflags_wrapped!(MemoryMapFlags, 0b0, Flags); 109 #[repr(transparent)] 110 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 111 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPoolResetFlags.html>"] 112 pub struct DescriptorPoolResetFlags(pub(crate) Flags); 113 vk_bitflags_wrapped!(DescriptorPoolResetFlags, 0b0, Flags); 114 #[repr(transparent)] 115 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 116 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorUpdateTemplateCreateFlags.html>"] 117 pub struct DescriptorUpdateTemplateCreateFlags(pub(crate) Flags); 118 vk_bitflags_wrapped!(DescriptorUpdateTemplateCreateFlags, 0b0, Flags); 119 #[repr(transparent)] 120 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 121 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayModeCreateFlagsKHR.html>"] 122 pub struct DisplayModeCreateFlagsKHR(pub(crate) Flags); 123 vk_bitflags_wrapped!(DisplayModeCreateFlagsKHR, 0b0, Flags); 124 #[repr(transparent)] 125 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 126 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplaySurfaceCreateFlagsKHR.html>"] 127 pub struct DisplaySurfaceCreateFlagsKHR(pub(crate) Flags); 128 vk_bitflags_wrapped!(DisplaySurfaceCreateFlagsKHR, 0b0, Flags); 129 #[repr(transparent)] 130 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 131 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAndroidSurfaceCreateFlagsKHR.html>"] 132 pub struct AndroidSurfaceCreateFlagsKHR(pub(crate) Flags); 133 vk_bitflags_wrapped!(AndroidSurfaceCreateFlagsKHR, 0b0, Flags); 134 #[repr(transparent)] 135 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 136 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkViSurfaceCreateFlagsNN.html>"] 137 pub struct ViSurfaceCreateFlagsNN(pub(crate) Flags); 138 vk_bitflags_wrapped!(ViSurfaceCreateFlagsNN, 0b0, Flags); 139 #[repr(transparent)] 140 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 141 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkWaylandSurfaceCreateFlagsKHR.html>"] 142 pub struct WaylandSurfaceCreateFlagsKHR(pub(crate) Flags); 143 vk_bitflags_wrapped!(WaylandSurfaceCreateFlagsKHR, 0b0, Flags); 144 #[repr(transparent)] 145 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 146 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkWin32SurfaceCreateFlagsKHR.html>"] 147 pub struct Win32SurfaceCreateFlagsKHR(pub(crate) Flags); 148 vk_bitflags_wrapped!(Win32SurfaceCreateFlagsKHR, 0b0, Flags); 149 #[repr(transparent)] 150 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 151 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkXlibSurfaceCreateFlagsKHR.html>"] 152 pub struct XlibSurfaceCreateFlagsKHR(pub(crate) Flags); 153 vk_bitflags_wrapped!(XlibSurfaceCreateFlagsKHR, 0b0, Flags); 154 #[repr(transparent)] 155 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 156 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkXcbSurfaceCreateFlagsKHR.html>"] 157 pub struct XcbSurfaceCreateFlagsKHR(pub(crate) Flags); 158 vk_bitflags_wrapped!(XcbSurfaceCreateFlagsKHR, 0b0, Flags); 159 #[repr(transparent)] 160 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 161 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDirectFBSurfaceCreateFlagsEXT.html>"] 162 pub struct DirectFBSurfaceCreateFlagsEXT(pub(crate) Flags); 163 vk_bitflags_wrapped!(DirectFBSurfaceCreateFlagsEXT, 0b0, Flags); 164 #[repr(transparent)] 165 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 166 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkIOSSurfaceCreateFlagsMVK.html>"] 167 pub struct IOSSurfaceCreateFlagsMVK(pub(crate) Flags); 168 vk_bitflags_wrapped!(IOSSurfaceCreateFlagsMVK, 0b0, Flags); 169 #[repr(transparent)] 170 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 171 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMacOSSurfaceCreateFlagsMVK.html>"] 172 pub struct MacOSSurfaceCreateFlagsMVK(pub(crate) Flags); 173 vk_bitflags_wrapped!(MacOSSurfaceCreateFlagsMVK, 0b0, Flags); 174 #[repr(transparent)] 175 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 176 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMetalSurfaceCreateFlagsEXT.html>"] 177 pub struct MetalSurfaceCreateFlagsEXT(pub(crate) Flags); 178 vk_bitflags_wrapped!(MetalSurfaceCreateFlagsEXT, 0b0, Flags); 179 #[repr(transparent)] 180 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 181 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImagePipeSurfaceCreateFlagsFUCHSIA.html>"] 182 pub struct ImagePipeSurfaceCreateFlagsFUCHSIA(pub(crate) Flags); 183 vk_bitflags_wrapped!(ImagePipeSurfaceCreateFlagsFUCHSIA, 0b0, Flags); 184 #[repr(transparent)] 185 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 186 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkStreamDescriptorSurfaceCreateFlagsGGP.html>"] 187 pub struct StreamDescriptorSurfaceCreateFlagsGGP(pub(crate) Flags); 188 vk_bitflags_wrapped!(StreamDescriptorSurfaceCreateFlagsGGP, 0b0, Flags); 189 #[repr(transparent)] 190 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 191 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkHeadlessSurfaceCreateFlagsEXT.html>"] 192 pub struct HeadlessSurfaceCreateFlagsEXT(pub(crate) Flags); 193 vk_bitflags_wrapped!(HeadlessSurfaceCreateFlagsEXT, 0b0, Flags); 194 #[repr(transparent)] 195 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 196 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandPoolTrimFlags.html>"] 197 pub struct CommandPoolTrimFlags(pub(crate) Flags); 198 vk_bitflags_wrapped!(CommandPoolTrimFlags, 0b0, Flags); 199 #[repr(transparent)] 200 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 201 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineViewportSwizzleStateCreateFlagsNV.html>"] 202 pub struct PipelineViewportSwizzleStateCreateFlagsNV(pub(crate) Flags); 203 vk_bitflags_wrapped!(PipelineViewportSwizzleStateCreateFlagsNV, 0b0, Flags); 204 #[repr(transparent)] 205 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 206 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDiscardRectangleStateCreateFlagsEXT.html>"] 207 pub struct PipelineDiscardRectangleStateCreateFlagsEXT(pub(crate) Flags); 208 vk_bitflags_wrapped!(PipelineDiscardRectangleStateCreateFlagsEXT, 0b0, Flags); 209 #[repr(transparent)] 210 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 211 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCoverageToColorStateCreateFlagsNV.html>"] 212 pub struct PipelineCoverageToColorStateCreateFlagsNV(pub(crate) Flags); 213 vk_bitflags_wrapped!(PipelineCoverageToColorStateCreateFlagsNV, 0b0, Flags); 214 #[repr(transparent)] 215 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 216 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCoverageModulationStateCreateFlagsNV.html>"] 217 pub struct PipelineCoverageModulationStateCreateFlagsNV(pub(crate) Flags); 218 vk_bitflags_wrapped!(PipelineCoverageModulationStateCreateFlagsNV, 0b0, Flags); 219 #[repr(transparent)] 220 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 221 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCoverageReductionStateCreateFlagsNV.html>"] 222 pub struct PipelineCoverageReductionStateCreateFlagsNV(pub(crate) Flags); 223 vk_bitflags_wrapped!(PipelineCoverageReductionStateCreateFlagsNV, 0b0, Flags); 224 #[repr(transparent)] 225 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 226 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationCacheCreateFlagsEXT.html>"] 227 pub struct ValidationCacheCreateFlagsEXT(pub(crate) Flags); 228 vk_bitflags_wrapped!(ValidationCacheCreateFlagsEXT, 0b0, Flags); 229 #[repr(transparent)] 230 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 231 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugUtilsMessengerCreateFlagsEXT.html>"] 232 pub struct DebugUtilsMessengerCreateFlagsEXT(pub(crate) Flags); 233 vk_bitflags_wrapped!(DebugUtilsMessengerCreateFlagsEXT, 0b0, Flags); 234 #[repr(transparent)] 235 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 236 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugUtilsMessengerCallbackDataFlagsEXT.html>"] 237 pub struct DebugUtilsMessengerCallbackDataFlagsEXT(pub(crate) Flags); 238 vk_bitflags_wrapped!(DebugUtilsMessengerCallbackDataFlagsEXT, 0b0, Flags); 239 #[repr(transparent)] 240 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 241 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemoryReportFlagsEXT.html>"] 242 pub struct DeviceMemoryReportFlagsEXT(pub(crate) Flags); 243 vk_bitflags_wrapped!(DeviceMemoryReportFlagsEXT, 0b0, Flags); 244 #[repr(transparent)] 245 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 246 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationConservativeStateCreateFlagsEXT.html>"] 247 pub struct PipelineRasterizationConservativeStateCreateFlagsEXT(pub(crate) Flags); 248 vk_bitflags_wrapped!( 249 PipelineRasterizationConservativeStateCreateFlagsEXT, 250 0b0, 251 Flags 252 ); 253 #[repr(transparent)] 254 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 255 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationStateStreamCreateFlagsEXT.html>"] 256 pub struct PipelineRasterizationStateStreamCreateFlagsEXT(pub(crate) Flags); 257 vk_bitflags_wrapped!(PipelineRasterizationStateStreamCreateFlagsEXT, 0b0, Flags); 258 #[repr(transparent)] 259 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] 260 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationDepthClipStateCreateFlagsEXT.html>"] 261 pub struct PipelineRasterizationDepthClipStateCreateFlagsEXT(pub(crate) Flags); 262 vk_bitflags_wrapped!( 263 PipelineRasterizationDepthClipStateCreateFlagsEXT, 264 0b0, 265 Flags 266 ); 267 define_handle!( 268 Instance, 269 INSTANCE, 270 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstance.html>" 271 ); 272 define_handle ! (PhysicalDevice , PHYSICAL_DEVICE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDevice.html>") ; 273 define_handle!( 274 Device, 275 DEVICE, 276 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDevice.html>" 277 ); 278 define_handle!( 279 Queue, 280 QUEUE, 281 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueue.html>" 282 ); 283 define_handle ! (CommandBuffer , COMMAND_BUFFER , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandBuffer.html>") ; 284 handle_nondispatchable ! (DeviceMemory , DEVICE_MEMORY , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemory.html>") ; 285 handle_nondispatchable ! (CommandPool , COMMAND_POOL , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandPool.html>") ; 286 handle_nondispatchable!( 287 Buffer, 288 BUFFER, 289 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBuffer.html>" 290 ); 291 handle_nondispatchable!( 292 BufferView, 293 BUFFER_VIEW, 294 doc = 295 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferView.html>" 296 ); 297 handle_nondispatchable!( 298 Image, 299 IMAGE, 300 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImage.html>" 301 ); 302 handle_nondispatchable!( 303 ImageView, 304 IMAGE_VIEW, 305 doc = 306 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageView.html>" 307 ); 308 handle_nondispatchable ! (ShaderModule , SHADER_MODULE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderModule.html>") ; 309 handle_nondispatchable!( 310 Pipeline, 311 PIPELINE, 312 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipeline.html>" 313 ); 314 handle_nondispatchable ! (PipelineLayout , PIPELINE_LAYOUT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineLayout.html>") ; 315 handle_nondispatchable!( 316 Sampler, 317 SAMPLER, 318 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSampler.html>" 319 ); 320 handle_nondispatchable ! (DescriptorSet , DESCRIPTOR_SET , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSet.html>") ; 321 handle_nondispatchable ! (DescriptorSetLayout , DESCRIPTOR_SET_LAYOUT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayout.html>") ; 322 handle_nondispatchable ! (DescriptorPool , DESCRIPTOR_POOL , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPool.html>") ; 323 handle_nondispatchable!( 324 Fence, 325 FENCE, 326 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFence.html>" 327 ); 328 handle_nondispatchable!( 329 Semaphore, 330 SEMAPHORE, 331 doc = 332 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSemaphore.html>" 333 ); 334 handle_nondispatchable!( 335 Event, 336 EVENT, 337 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkEvent.html>" 338 ); 339 handle_nondispatchable!( 340 QueryPool, 341 QUERY_POOL, 342 doc = 343 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryPool.html>" 344 ); 345 handle_nondispatchable ! (Framebuffer , FRAMEBUFFER , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFramebuffer.html>") ; 346 handle_nondispatchable!( 347 RenderPass, 348 RENDER_PASS, 349 doc = 350 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRenderPass.html>" 351 ); 352 handle_nondispatchable ! (PipelineCache , PIPELINE_CACHE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCache.html>") ; 353 handle_nondispatchable ! (IndirectCommandsLayoutNV , INDIRECT_COMMANDS_LAYOUT_NV , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkIndirectCommandsLayoutNV.html>") ; 354 handle_nondispatchable ! (DescriptorUpdateTemplate , DESCRIPTOR_UPDATE_TEMPLATE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorUpdateTemplate.html>") ; 355 handle_nondispatchable ! (SamplerYcbcrConversion , SAMPLER_YCBCR_CONVERSION , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerYcbcrConversion.html>") ; 356 handle_nondispatchable ! (ValidationCacheEXT , VALIDATION_CACHE_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationCacheEXT.html>") ; 357 handle_nondispatchable ! (AccelerationStructureKHR , ACCELERATION_STRUCTURE_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureKHR.html>") ; 358 handle_nondispatchable ! (AccelerationStructureNV , ACCELERATION_STRUCTURE_NV , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureNV.html>") ; 359 handle_nondispatchable ! (PerformanceConfigurationINTEL , PERFORMANCE_CONFIGURATION_INTEL , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceConfigurationINTEL.html>") ; 360 handle_nondispatchable ! (DeferredOperationKHR , DEFERRED_OPERATION_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeferredOperationKHR.html>") ; 361 handle_nondispatchable ! (PrivateDataSlotEXT , PRIVATE_DATA_SLOT_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPrivateDataSlotEXT.html>") ; 362 handle_nondispatchable!( 363 DisplayKHR, 364 DISPLAY_KHR, 365 doc = 366 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayKHR.html>" 367 ); 368 handle_nondispatchable ! (DisplayModeKHR , DISPLAY_MODE_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayModeKHR.html>") ; 369 handle_nondispatchable!( 370 SurfaceKHR, 371 SURFACE_KHR, 372 doc = 373 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSurfaceKHR.html>" 374 ); 375 handle_nondispatchable ! (SwapchainKHR , SWAPCHAIN_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSwapchainKHR.html>") ; 376 handle_nondispatchable ! (DebugReportCallbackEXT , DEBUG_REPORT_CALLBACK_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugReportCallbackEXT.html>") ; 377 handle_nondispatchable ! (DebugUtilsMessengerEXT , DEBUG_UTILS_MESSENGER_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugUtilsMessengerEXT.html>") ; 378 #[allow(non_camel_case_types)] 379 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkInternalAllocationNotification.html>"] 380 pub type PFN_vkInternalAllocationNotification = Option< 381 unsafe extern "system" fn( 382 p_user_data: *mut c_void, 383 size: usize, 384 allocation_type: InternalAllocationType, 385 allocation_scope: SystemAllocationScope, 386 ), 387 >; 388 #[allow(non_camel_case_types)] 389 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkInternalFreeNotification.html>"] 390 pub type PFN_vkInternalFreeNotification = Option< 391 unsafe extern "system" fn( 392 p_user_data: *mut c_void, 393 size: usize, 394 allocation_type: InternalAllocationType, 395 allocation_scope: SystemAllocationScope, 396 ), 397 >; 398 #[allow(non_camel_case_types)] 399 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkReallocationFunction.html>"] 400 pub type PFN_vkReallocationFunction = Option< 401 unsafe extern "system" fn( 402 p_user_data: *mut c_void, 403 p_original: *mut c_void, 404 size: usize, 405 alignment: usize, 406 allocation_scope: SystemAllocationScope, 407 ) -> *mut c_void, 408 >; 409 #[allow(non_camel_case_types)] 410 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkAllocationFunction.html>"] 411 pub type PFN_vkAllocationFunction = Option< 412 unsafe extern "system" fn( 413 p_user_data: *mut c_void, 414 size: usize, 415 alignment: usize, 416 allocation_scope: SystemAllocationScope, 417 ) -> *mut c_void, 418 >; 419 #[allow(non_camel_case_types)] 420 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkFreeFunction.html>"] 421 pub type PFN_vkFreeFunction = 422 Option<unsafe extern "system" fn(p_user_data: *mut c_void, p_memory: *mut c_void)>; 423 #[allow(non_camel_case_types)] 424 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkVoidFunction.html>"] 425 pub type PFN_vkVoidFunction = Option<unsafe extern "system" fn()>; 426 #[allow(non_camel_case_types)] 427 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkDebugReportCallbackEXT.html>"] 428 pub type PFN_vkDebugReportCallbackEXT = Option< 429 unsafe extern "system" fn( 430 flags: DebugReportFlagsEXT, 431 object_type: DebugReportObjectTypeEXT, 432 object: u64, 433 location: usize, 434 message_code: i32, 435 p_layer_prefix: *const c_char, 436 p_message: *const c_char, 437 p_user_data: *mut c_void, 438 ) -> Bool32, 439 >; 440 #[allow(non_camel_case_types)] 441 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkDebugUtilsMessengerCallbackEXT.html>"] 442 pub type PFN_vkDebugUtilsMessengerCallbackEXT = Option< 443 unsafe extern "system" fn( 444 message_severity: DebugUtilsMessageSeverityFlagsEXT, 445 message_types: DebugUtilsMessageTypeFlagsEXT, 446 p_callback_data: *const DebugUtilsMessengerCallbackDataEXT, 447 p_user_data: *mut c_void, 448 ) -> Bool32, 449 >; 450 #[allow(non_camel_case_types)] 451 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkDeviceMemoryReportCallbackEXT.html>"] 452 pub type PFN_vkDeviceMemoryReportCallbackEXT = Option< 453 unsafe extern "system" fn( 454 p_callback_data: *const DeviceMemoryReportCallbackDataEXT, 455 p_user_data: *mut c_void, 456 ), 457 >; 458 #[repr(C)] 459 #[derive(Copy, Clone, Debug)] 460 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBaseOutStructure.html>"] 461 pub struct BaseOutStructure { 462 pub s_type: StructureType, 463 pub p_next: *mut BaseOutStructure, 464 } 465 impl ::std::default::Default for BaseOutStructure { default() -> BaseOutStructure466 fn default() -> BaseOutStructure { 467 BaseOutStructure { 468 s_type: unsafe { ::std::mem::zeroed() }, 469 p_next: ::std::ptr::null_mut(), 470 } 471 } 472 } 473 #[repr(C)] 474 #[derive(Copy, Clone, Debug)] 475 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBaseInStructure.html>"] 476 pub struct BaseInStructure { 477 pub s_type: StructureType, 478 pub p_next: *const BaseInStructure, 479 } 480 impl ::std::default::Default for BaseInStructure { default() -> BaseInStructure481 fn default() -> BaseInStructure { 482 BaseInStructure { 483 s_type: unsafe { ::std::mem::zeroed() }, 484 p_next: ::std::ptr::null(), 485 } 486 } 487 } 488 #[repr(C)] 489 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)] 490 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkOffset2D.html>"] 491 pub struct Offset2D { 492 pub x: i32, 493 pub y: i32, 494 } 495 impl Offset2D { builder<'a>() -> Offset2DBuilder<'a>496 pub fn builder<'a>() -> Offset2DBuilder<'a> { 497 Offset2DBuilder { 498 inner: Offset2D::default(), 499 marker: ::std::marker::PhantomData, 500 } 501 } 502 } 503 #[repr(transparent)] 504 pub struct Offset2DBuilder<'a> { 505 inner: Offset2D, 506 marker: ::std::marker::PhantomData<&'a ()>, 507 } 508 impl<'a> ::std::ops::Deref for Offset2DBuilder<'a> { 509 type Target = Offset2D; deref(&self) -> &Self::Target510 fn deref(&self) -> &Self::Target { 511 &self.inner 512 } 513 } 514 impl<'a> ::std::ops::DerefMut for Offset2DBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target515 fn deref_mut(&mut self) -> &mut Self::Target { 516 &mut self.inner 517 } 518 } 519 impl<'a> Offset2DBuilder<'a> { x(mut self, x: i32) -> Offset2DBuilder<'a>520 pub fn x(mut self, x: i32) -> Offset2DBuilder<'a> { 521 self.inner.x = x; 522 self 523 } y(mut self, y: i32) -> Offset2DBuilder<'a>524 pub fn y(mut self, y: i32) -> Offset2DBuilder<'a> { 525 self.inner.y = y; 526 self 527 } 528 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 529 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 530 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> Offset2D531 pub fn build(self) -> Offset2D { 532 self.inner 533 } 534 } 535 #[repr(C)] 536 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)] 537 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkOffset3D.html>"] 538 pub struct Offset3D { 539 pub x: i32, 540 pub y: i32, 541 pub z: i32, 542 } 543 impl Offset3D { builder<'a>() -> Offset3DBuilder<'a>544 pub fn builder<'a>() -> Offset3DBuilder<'a> { 545 Offset3DBuilder { 546 inner: Offset3D::default(), 547 marker: ::std::marker::PhantomData, 548 } 549 } 550 } 551 #[repr(transparent)] 552 pub struct Offset3DBuilder<'a> { 553 inner: Offset3D, 554 marker: ::std::marker::PhantomData<&'a ()>, 555 } 556 impl<'a> ::std::ops::Deref for Offset3DBuilder<'a> { 557 type Target = Offset3D; deref(&self) -> &Self::Target558 fn deref(&self) -> &Self::Target { 559 &self.inner 560 } 561 } 562 impl<'a> ::std::ops::DerefMut for Offset3DBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target563 fn deref_mut(&mut self) -> &mut Self::Target { 564 &mut self.inner 565 } 566 } 567 impl<'a> Offset3DBuilder<'a> { x(mut self, x: i32) -> Offset3DBuilder<'a>568 pub fn x(mut self, x: i32) -> Offset3DBuilder<'a> { 569 self.inner.x = x; 570 self 571 } y(mut self, y: i32) -> Offset3DBuilder<'a>572 pub fn y(mut self, y: i32) -> Offset3DBuilder<'a> { 573 self.inner.y = y; 574 self 575 } z(mut self, z: i32) -> Offset3DBuilder<'a>576 pub fn z(mut self, z: i32) -> Offset3DBuilder<'a> { 577 self.inner.z = z; 578 self 579 } 580 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 581 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 582 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> Offset3D583 pub fn build(self) -> Offset3D { 584 self.inner 585 } 586 } 587 #[repr(C)] 588 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)] 589 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkExtent2D.html>"] 590 pub struct Extent2D { 591 pub width: u32, 592 pub height: u32, 593 } 594 impl Extent2D { builder<'a>() -> Extent2DBuilder<'a>595 pub fn builder<'a>() -> Extent2DBuilder<'a> { 596 Extent2DBuilder { 597 inner: Extent2D::default(), 598 marker: ::std::marker::PhantomData, 599 } 600 } 601 } 602 #[repr(transparent)] 603 pub struct Extent2DBuilder<'a> { 604 inner: Extent2D, 605 marker: ::std::marker::PhantomData<&'a ()>, 606 } 607 impl<'a> ::std::ops::Deref for Extent2DBuilder<'a> { 608 type Target = Extent2D; deref(&self) -> &Self::Target609 fn deref(&self) -> &Self::Target { 610 &self.inner 611 } 612 } 613 impl<'a> ::std::ops::DerefMut for Extent2DBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target614 fn deref_mut(&mut self) -> &mut Self::Target { 615 &mut self.inner 616 } 617 } 618 impl<'a> Extent2DBuilder<'a> { width(mut self, width: u32) -> Extent2DBuilder<'a>619 pub fn width(mut self, width: u32) -> Extent2DBuilder<'a> { 620 self.inner.width = width; 621 self 622 } height(mut self, height: u32) -> Extent2DBuilder<'a>623 pub fn height(mut self, height: u32) -> Extent2DBuilder<'a> { 624 self.inner.height = height; 625 self 626 } 627 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 628 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 629 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> Extent2D630 pub fn build(self) -> Extent2D { 631 self.inner 632 } 633 } 634 #[repr(C)] 635 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)] 636 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkExtent3D.html>"] 637 pub struct Extent3D { 638 pub width: u32, 639 pub height: u32, 640 pub depth: u32, 641 } 642 impl Extent3D { builder<'a>() -> Extent3DBuilder<'a>643 pub fn builder<'a>() -> Extent3DBuilder<'a> { 644 Extent3DBuilder { 645 inner: Extent3D::default(), 646 marker: ::std::marker::PhantomData, 647 } 648 } 649 } 650 #[repr(transparent)] 651 pub struct Extent3DBuilder<'a> { 652 inner: Extent3D, 653 marker: ::std::marker::PhantomData<&'a ()>, 654 } 655 impl<'a> ::std::ops::Deref for Extent3DBuilder<'a> { 656 type Target = Extent3D; deref(&self) -> &Self::Target657 fn deref(&self) -> &Self::Target { 658 &self.inner 659 } 660 } 661 impl<'a> ::std::ops::DerefMut for Extent3DBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target662 fn deref_mut(&mut self) -> &mut Self::Target { 663 &mut self.inner 664 } 665 } 666 impl<'a> Extent3DBuilder<'a> { width(mut self, width: u32) -> Extent3DBuilder<'a>667 pub fn width(mut self, width: u32) -> Extent3DBuilder<'a> { 668 self.inner.width = width; 669 self 670 } height(mut self, height: u32) -> Extent3DBuilder<'a>671 pub fn height(mut self, height: u32) -> Extent3DBuilder<'a> { 672 self.inner.height = height; 673 self 674 } depth(mut self, depth: u32) -> Extent3DBuilder<'a>675 pub fn depth(mut self, depth: u32) -> Extent3DBuilder<'a> { 676 self.inner.depth = depth; 677 self 678 } 679 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 680 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 681 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> Extent3D682 pub fn build(self) -> Extent3D { 683 self.inner 684 } 685 } 686 #[repr(C)] 687 #[derive(Copy, Clone, Default, Debug)] 688 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkViewport.html>"] 689 pub struct Viewport { 690 pub x: f32, 691 pub y: f32, 692 pub width: f32, 693 pub height: f32, 694 pub min_depth: f32, 695 pub max_depth: f32, 696 } 697 impl Viewport { builder<'a>() -> ViewportBuilder<'a>698 pub fn builder<'a>() -> ViewportBuilder<'a> { 699 ViewportBuilder { 700 inner: Viewport::default(), 701 marker: ::std::marker::PhantomData, 702 } 703 } 704 } 705 #[repr(transparent)] 706 pub struct ViewportBuilder<'a> { 707 inner: Viewport, 708 marker: ::std::marker::PhantomData<&'a ()>, 709 } 710 impl<'a> ::std::ops::Deref for ViewportBuilder<'a> { 711 type Target = Viewport; deref(&self) -> &Self::Target712 fn deref(&self) -> &Self::Target { 713 &self.inner 714 } 715 } 716 impl<'a> ::std::ops::DerefMut for ViewportBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target717 fn deref_mut(&mut self) -> &mut Self::Target { 718 &mut self.inner 719 } 720 } 721 impl<'a> ViewportBuilder<'a> { x(mut self, x: f32) -> ViewportBuilder<'a>722 pub fn x(mut self, x: f32) -> ViewportBuilder<'a> { 723 self.inner.x = x; 724 self 725 } y(mut self, y: f32) -> ViewportBuilder<'a>726 pub fn y(mut self, y: f32) -> ViewportBuilder<'a> { 727 self.inner.y = y; 728 self 729 } width(mut self, width: f32) -> ViewportBuilder<'a>730 pub fn width(mut self, width: f32) -> ViewportBuilder<'a> { 731 self.inner.width = width; 732 self 733 } height(mut self, height: f32) -> ViewportBuilder<'a>734 pub fn height(mut self, height: f32) -> ViewportBuilder<'a> { 735 self.inner.height = height; 736 self 737 } min_depth(mut self, min_depth: f32) -> ViewportBuilder<'a>738 pub fn min_depth(mut self, min_depth: f32) -> ViewportBuilder<'a> { 739 self.inner.min_depth = min_depth; 740 self 741 } max_depth(mut self, max_depth: f32) -> ViewportBuilder<'a>742 pub fn max_depth(mut self, max_depth: f32) -> ViewportBuilder<'a> { 743 self.inner.max_depth = max_depth; 744 self 745 } 746 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 747 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 748 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> Viewport749 pub fn build(self) -> Viewport { 750 self.inner 751 } 752 } 753 #[repr(C)] 754 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)] 755 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRect2D.html>"] 756 pub struct Rect2D { 757 pub offset: Offset2D, 758 pub extent: Extent2D, 759 } 760 impl Rect2D { builder<'a>() -> Rect2DBuilder<'a>761 pub fn builder<'a>() -> Rect2DBuilder<'a> { 762 Rect2DBuilder { 763 inner: Rect2D::default(), 764 marker: ::std::marker::PhantomData, 765 } 766 } 767 } 768 #[repr(transparent)] 769 pub struct Rect2DBuilder<'a> { 770 inner: Rect2D, 771 marker: ::std::marker::PhantomData<&'a ()>, 772 } 773 impl<'a> ::std::ops::Deref for Rect2DBuilder<'a> { 774 type Target = Rect2D; deref(&self) -> &Self::Target775 fn deref(&self) -> &Self::Target { 776 &self.inner 777 } 778 } 779 impl<'a> ::std::ops::DerefMut for Rect2DBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target780 fn deref_mut(&mut self) -> &mut Self::Target { 781 &mut self.inner 782 } 783 } 784 impl<'a> Rect2DBuilder<'a> { offset(mut self, offset: Offset2D) -> Rect2DBuilder<'a>785 pub fn offset(mut self, offset: Offset2D) -> Rect2DBuilder<'a> { 786 self.inner.offset = offset; 787 self 788 } extent(mut self, extent: Extent2D) -> Rect2DBuilder<'a>789 pub fn extent(mut self, extent: Extent2D) -> Rect2DBuilder<'a> { 790 self.inner.extent = extent; 791 self 792 } 793 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 794 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 795 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> Rect2D796 pub fn build(self) -> Rect2D { 797 self.inner 798 } 799 } 800 #[repr(C)] 801 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)] 802 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkClearRect.html>"] 803 pub struct ClearRect { 804 pub rect: Rect2D, 805 pub base_array_layer: u32, 806 pub layer_count: u32, 807 } 808 impl ClearRect { builder<'a>() -> ClearRectBuilder<'a>809 pub fn builder<'a>() -> ClearRectBuilder<'a> { 810 ClearRectBuilder { 811 inner: ClearRect::default(), 812 marker: ::std::marker::PhantomData, 813 } 814 } 815 } 816 #[repr(transparent)] 817 pub struct ClearRectBuilder<'a> { 818 inner: ClearRect, 819 marker: ::std::marker::PhantomData<&'a ()>, 820 } 821 impl<'a> ::std::ops::Deref for ClearRectBuilder<'a> { 822 type Target = ClearRect; deref(&self) -> &Self::Target823 fn deref(&self) -> &Self::Target { 824 &self.inner 825 } 826 } 827 impl<'a> ::std::ops::DerefMut for ClearRectBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target828 fn deref_mut(&mut self) -> &mut Self::Target { 829 &mut self.inner 830 } 831 } 832 impl<'a> ClearRectBuilder<'a> { rect(mut self, rect: Rect2D) -> ClearRectBuilder<'a>833 pub fn rect(mut self, rect: Rect2D) -> ClearRectBuilder<'a> { 834 self.inner.rect = rect; 835 self 836 } base_array_layer(mut self, base_array_layer: u32) -> ClearRectBuilder<'a>837 pub fn base_array_layer(mut self, base_array_layer: u32) -> ClearRectBuilder<'a> { 838 self.inner.base_array_layer = base_array_layer; 839 self 840 } layer_count(mut self, layer_count: u32) -> ClearRectBuilder<'a>841 pub fn layer_count(mut self, layer_count: u32) -> ClearRectBuilder<'a> { 842 self.inner.layer_count = layer_count; 843 self 844 } 845 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 846 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 847 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ClearRect848 pub fn build(self) -> ClearRect { 849 self.inner 850 } 851 } 852 #[repr(C)] 853 #[derive(Copy, Clone, Default, Debug)] 854 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkComponentMapping.html>"] 855 pub struct ComponentMapping { 856 pub r: ComponentSwizzle, 857 pub g: ComponentSwizzle, 858 pub b: ComponentSwizzle, 859 pub a: ComponentSwizzle, 860 } 861 impl ComponentMapping { builder<'a>() -> ComponentMappingBuilder<'a>862 pub fn builder<'a>() -> ComponentMappingBuilder<'a> { 863 ComponentMappingBuilder { 864 inner: ComponentMapping::default(), 865 marker: ::std::marker::PhantomData, 866 } 867 } 868 } 869 #[repr(transparent)] 870 pub struct ComponentMappingBuilder<'a> { 871 inner: ComponentMapping, 872 marker: ::std::marker::PhantomData<&'a ()>, 873 } 874 impl<'a> ::std::ops::Deref for ComponentMappingBuilder<'a> { 875 type Target = ComponentMapping; deref(&self) -> &Self::Target876 fn deref(&self) -> &Self::Target { 877 &self.inner 878 } 879 } 880 impl<'a> ::std::ops::DerefMut for ComponentMappingBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target881 fn deref_mut(&mut self) -> &mut Self::Target { 882 &mut self.inner 883 } 884 } 885 impl<'a> ComponentMappingBuilder<'a> { r(mut self, r: ComponentSwizzle) -> ComponentMappingBuilder<'a>886 pub fn r(mut self, r: ComponentSwizzle) -> ComponentMappingBuilder<'a> { 887 self.inner.r = r; 888 self 889 } g(mut self, g: ComponentSwizzle) -> ComponentMappingBuilder<'a>890 pub fn g(mut self, g: ComponentSwizzle) -> ComponentMappingBuilder<'a> { 891 self.inner.g = g; 892 self 893 } b(mut self, b: ComponentSwizzle) -> ComponentMappingBuilder<'a>894 pub fn b(mut self, b: ComponentSwizzle) -> ComponentMappingBuilder<'a> { 895 self.inner.b = b; 896 self 897 } a(mut self, a: ComponentSwizzle) -> ComponentMappingBuilder<'a>898 pub fn a(mut self, a: ComponentSwizzle) -> ComponentMappingBuilder<'a> { 899 self.inner.a = a; 900 self 901 } 902 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 903 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 904 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ComponentMapping905 pub fn build(self) -> ComponentMapping { 906 self.inner 907 } 908 } 909 #[repr(C)] 910 #[derive(Copy, Clone)] 911 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceProperties.html>"] 912 pub struct PhysicalDeviceProperties { 913 pub api_version: u32, 914 pub driver_version: u32, 915 pub vendor_id: u32, 916 pub device_id: u32, 917 pub device_type: PhysicalDeviceType, 918 pub device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE], 919 pub pipeline_cache_uuid: [u8; UUID_SIZE], 920 pub limits: PhysicalDeviceLimits, 921 pub sparse_properties: PhysicalDeviceSparseProperties, 922 } 923 impl fmt::Debug for PhysicalDeviceProperties { fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result924 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { 925 fmt.debug_struct("PhysicalDeviceProperties") 926 .field("api_version", &self.api_version) 927 .field("driver_version", &self.driver_version) 928 .field("vendor_id", &self.vendor_id) 929 .field("device_id", &self.device_id) 930 .field("device_type", &self.device_type) 931 .field("device_name", &unsafe { 932 ::std::ffi::CStr::from_ptr(self.device_name.as_ptr() as *const c_char) 933 }) 934 .field("pipeline_cache_uuid", &self.pipeline_cache_uuid) 935 .field("limits", &self.limits) 936 .field("sparse_properties", &self.sparse_properties) 937 .finish() 938 } 939 } 940 impl ::std::default::Default for PhysicalDeviceProperties { default() -> PhysicalDeviceProperties941 fn default() -> PhysicalDeviceProperties { 942 PhysicalDeviceProperties { 943 api_version: u32::default(), 944 driver_version: u32::default(), 945 vendor_id: u32::default(), 946 device_id: u32::default(), 947 device_type: PhysicalDeviceType::default(), 948 device_name: unsafe { ::std::mem::zeroed() }, 949 pipeline_cache_uuid: unsafe { ::std::mem::zeroed() }, 950 limits: PhysicalDeviceLimits::default(), 951 sparse_properties: PhysicalDeviceSparseProperties::default(), 952 } 953 } 954 } 955 impl PhysicalDeviceProperties { builder<'a>() -> PhysicalDevicePropertiesBuilder<'a>956 pub fn builder<'a>() -> PhysicalDevicePropertiesBuilder<'a> { 957 PhysicalDevicePropertiesBuilder { 958 inner: PhysicalDeviceProperties::default(), 959 marker: ::std::marker::PhantomData, 960 } 961 } 962 } 963 #[repr(transparent)] 964 pub struct PhysicalDevicePropertiesBuilder<'a> { 965 inner: PhysicalDeviceProperties, 966 marker: ::std::marker::PhantomData<&'a ()>, 967 } 968 impl<'a> ::std::ops::Deref for PhysicalDevicePropertiesBuilder<'a> { 969 type Target = PhysicalDeviceProperties; deref(&self) -> &Self::Target970 fn deref(&self) -> &Self::Target { 971 &self.inner 972 } 973 } 974 impl<'a> ::std::ops::DerefMut for PhysicalDevicePropertiesBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target975 fn deref_mut(&mut self) -> &mut Self::Target { 976 &mut self.inner 977 } 978 } 979 impl<'a> PhysicalDevicePropertiesBuilder<'a> { api_version(mut self, api_version: u32) -> PhysicalDevicePropertiesBuilder<'a>980 pub fn api_version(mut self, api_version: u32) -> PhysicalDevicePropertiesBuilder<'a> { 981 self.inner.api_version = api_version; 982 self 983 } driver_version(mut self, driver_version: u32) -> PhysicalDevicePropertiesBuilder<'a>984 pub fn driver_version(mut self, driver_version: u32) -> PhysicalDevicePropertiesBuilder<'a> { 985 self.inner.driver_version = driver_version; 986 self 987 } vendor_id(mut self, vendor_id: u32) -> PhysicalDevicePropertiesBuilder<'a>988 pub fn vendor_id(mut self, vendor_id: u32) -> PhysicalDevicePropertiesBuilder<'a> { 989 self.inner.vendor_id = vendor_id; 990 self 991 } device_id(mut self, device_id: u32) -> PhysicalDevicePropertiesBuilder<'a>992 pub fn device_id(mut self, device_id: u32) -> PhysicalDevicePropertiesBuilder<'a> { 993 self.inner.device_id = device_id; 994 self 995 } device_type( mut self, device_type: PhysicalDeviceType, ) -> PhysicalDevicePropertiesBuilder<'a>996 pub fn device_type( 997 mut self, 998 device_type: PhysicalDeviceType, 999 ) -> PhysicalDevicePropertiesBuilder<'a> { 1000 self.inner.device_type = device_type; 1001 self 1002 } device_name( mut self, device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE], ) -> PhysicalDevicePropertiesBuilder<'a>1003 pub fn device_name( 1004 mut self, 1005 device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE], 1006 ) -> PhysicalDevicePropertiesBuilder<'a> { 1007 self.inner.device_name = device_name; 1008 self 1009 } pipeline_cache_uuid( mut self, pipeline_cache_uuid: [u8; UUID_SIZE], ) -> PhysicalDevicePropertiesBuilder<'a>1010 pub fn pipeline_cache_uuid( 1011 mut self, 1012 pipeline_cache_uuid: [u8; UUID_SIZE], 1013 ) -> PhysicalDevicePropertiesBuilder<'a> { 1014 self.inner.pipeline_cache_uuid = pipeline_cache_uuid; 1015 self 1016 } limits(mut self, limits: PhysicalDeviceLimits) -> PhysicalDevicePropertiesBuilder<'a>1017 pub fn limits(mut self, limits: PhysicalDeviceLimits) -> PhysicalDevicePropertiesBuilder<'a> { 1018 self.inner.limits = limits; 1019 self 1020 } sparse_properties( mut self, sparse_properties: PhysicalDeviceSparseProperties, ) -> PhysicalDevicePropertiesBuilder<'a>1021 pub fn sparse_properties( 1022 mut self, 1023 sparse_properties: PhysicalDeviceSparseProperties, 1024 ) -> PhysicalDevicePropertiesBuilder<'a> { 1025 self.inner.sparse_properties = sparse_properties; 1026 self 1027 } 1028 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1029 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1030 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PhysicalDeviceProperties1031 pub fn build(self) -> PhysicalDeviceProperties { 1032 self.inner 1033 } 1034 } 1035 #[repr(C)] 1036 #[derive(Copy, Clone)] 1037 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkExtensionProperties.html>"] 1038 pub struct ExtensionProperties { 1039 pub extension_name: [c_char; MAX_EXTENSION_NAME_SIZE], 1040 pub spec_version: u32, 1041 } 1042 impl fmt::Debug for ExtensionProperties { fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result1043 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { 1044 fmt.debug_struct("ExtensionProperties") 1045 .field("extension_name", &unsafe { 1046 ::std::ffi::CStr::from_ptr(self.extension_name.as_ptr() as *const c_char) 1047 }) 1048 .field("spec_version", &self.spec_version) 1049 .finish() 1050 } 1051 } 1052 impl ::std::default::Default for ExtensionProperties { default() -> ExtensionProperties1053 fn default() -> ExtensionProperties { 1054 ExtensionProperties { 1055 extension_name: unsafe { ::std::mem::zeroed() }, 1056 spec_version: u32::default(), 1057 } 1058 } 1059 } 1060 impl ExtensionProperties { builder<'a>() -> ExtensionPropertiesBuilder<'a>1061 pub fn builder<'a>() -> ExtensionPropertiesBuilder<'a> { 1062 ExtensionPropertiesBuilder { 1063 inner: ExtensionProperties::default(), 1064 marker: ::std::marker::PhantomData, 1065 } 1066 } 1067 } 1068 #[repr(transparent)] 1069 pub struct ExtensionPropertiesBuilder<'a> { 1070 inner: ExtensionProperties, 1071 marker: ::std::marker::PhantomData<&'a ()>, 1072 } 1073 impl<'a> ::std::ops::Deref for ExtensionPropertiesBuilder<'a> { 1074 type Target = ExtensionProperties; deref(&self) -> &Self::Target1075 fn deref(&self) -> &Self::Target { 1076 &self.inner 1077 } 1078 } 1079 impl<'a> ::std::ops::DerefMut for ExtensionPropertiesBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1080 fn deref_mut(&mut self) -> &mut Self::Target { 1081 &mut self.inner 1082 } 1083 } 1084 impl<'a> ExtensionPropertiesBuilder<'a> { extension_name( mut self, extension_name: [c_char; MAX_EXTENSION_NAME_SIZE], ) -> ExtensionPropertiesBuilder<'a>1085 pub fn extension_name( 1086 mut self, 1087 extension_name: [c_char; MAX_EXTENSION_NAME_SIZE], 1088 ) -> ExtensionPropertiesBuilder<'a> { 1089 self.inner.extension_name = extension_name; 1090 self 1091 } spec_version(mut self, spec_version: u32) -> ExtensionPropertiesBuilder<'a>1092 pub fn spec_version(mut self, spec_version: u32) -> ExtensionPropertiesBuilder<'a> { 1093 self.inner.spec_version = spec_version; 1094 self 1095 } 1096 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1097 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1098 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ExtensionProperties1099 pub fn build(self) -> ExtensionProperties { 1100 self.inner 1101 } 1102 } 1103 #[repr(C)] 1104 #[derive(Copy, Clone)] 1105 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkLayerProperties.html>"] 1106 pub struct LayerProperties { 1107 pub layer_name: [c_char; MAX_EXTENSION_NAME_SIZE], 1108 pub spec_version: u32, 1109 pub implementation_version: u32, 1110 pub description: [c_char; MAX_DESCRIPTION_SIZE], 1111 } 1112 impl fmt::Debug for LayerProperties { fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result1113 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { 1114 fmt.debug_struct("LayerProperties") 1115 .field("layer_name", &unsafe { 1116 ::std::ffi::CStr::from_ptr(self.layer_name.as_ptr() as *const c_char) 1117 }) 1118 .field("spec_version", &self.spec_version) 1119 .field("implementation_version", &self.implementation_version) 1120 .field("description", &unsafe { 1121 ::std::ffi::CStr::from_ptr(self.description.as_ptr() as *const c_char) 1122 }) 1123 .finish() 1124 } 1125 } 1126 impl ::std::default::Default for LayerProperties { default() -> LayerProperties1127 fn default() -> LayerProperties { 1128 LayerProperties { 1129 layer_name: unsafe { ::std::mem::zeroed() }, 1130 spec_version: u32::default(), 1131 implementation_version: u32::default(), 1132 description: unsafe { ::std::mem::zeroed() }, 1133 } 1134 } 1135 } 1136 impl LayerProperties { builder<'a>() -> LayerPropertiesBuilder<'a>1137 pub fn builder<'a>() -> LayerPropertiesBuilder<'a> { 1138 LayerPropertiesBuilder { 1139 inner: LayerProperties::default(), 1140 marker: ::std::marker::PhantomData, 1141 } 1142 } 1143 } 1144 #[repr(transparent)] 1145 pub struct LayerPropertiesBuilder<'a> { 1146 inner: LayerProperties, 1147 marker: ::std::marker::PhantomData<&'a ()>, 1148 } 1149 impl<'a> ::std::ops::Deref for LayerPropertiesBuilder<'a> { 1150 type Target = LayerProperties; deref(&self) -> &Self::Target1151 fn deref(&self) -> &Self::Target { 1152 &self.inner 1153 } 1154 } 1155 impl<'a> ::std::ops::DerefMut for LayerPropertiesBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1156 fn deref_mut(&mut self) -> &mut Self::Target { 1157 &mut self.inner 1158 } 1159 } 1160 impl<'a> LayerPropertiesBuilder<'a> { layer_name( mut self, layer_name: [c_char; MAX_EXTENSION_NAME_SIZE], ) -> LayerPropertiesBuilder<'a>1161 pub fn layer_name( 1162 mut self, 1163 layer_name: [c_char; MAX_EXTENSION_NAME_SIZE], 1164 ) -> LayerPropertiesBuilder<'a> { 1165 self.inner.layer_name = layer_name; 1166 self 1167 } spec_version(mut self, spec_version: u32) -> LayerPropertiesBuilder<'a>1168 pub fn spec_version(mut self, spec_version: u32) -> LayerPropertiesBuilder<'a> { 1169 self.inner.spec_version = spec_version; 1170 self 1171 } implementation_version( mut self, implementation_version: u32, ) -> LayerPropertiesBuilder<'a>1172 pub fn implementation_version( 1173 mut self, 1174 implementation_version: u32, 1175 ) -> LayerPropertiesBuilder<'a> { 1176 self.inner.implementation_version = implementation_version; 1177 self 1178 } description( mut self, description: [c_char; MAX_DESCRIPTION_SIZE], ) -> LayerPropertiesBuilder<'a>1179 pub fn description( 1180 mut self, 1181 description: [c_char; MAX_DESCRIPTION_SIZE], 1182 ) -> LayerPropertiesBuilder<'a> { 1183 self.inner.description = description; 1184 self 1185 } 1186 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1187 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1188 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> LayerProperties1189 pub fn build(self) -> LayerProperties { 1190 self.inner 1191 } 1192 } 1193 #[repr(C)] 1194 #[derive(Copy, Clone, Debug)] 1195 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkApplicationInfo.html>"] 1196 pub struct ApplicationInfo { 1197 pub s_type: StructureType, 1198 pub p_next: *const c_void, 1199 pub p_application_name: *const c_char, 1200 pub application_version: u32, 1201 pub p_engine_name: *const c_char, 1202 pub engine_version: u32, 1203 pub api_version: u32, 1204 } 1205 impl ::std::default::Default for ApplicationInfo { default() -> ApplicationInfo1206 fn default() -> ApplicationInfo { 1207 ApplicationInfo { 1208 s_type: StructureType::APPLICATION_INFO, 1209 p_next: ::std::ptr::null(), 1210 p_application_name: ::std::ptr::null(), 1211 application_version: u32::default(), 1212 p_engine_name: ::std::ptr::null(), 1213 engine_version: u32::default(), 1214 api_version: u32::default(), 1215 } 1216 } 1217 } 1218 impl ApplicationInfo { builder<'a>() -> ApplicationInfoBuilder<'a>1219 pub fn builder<'a>() -> ApplicationInfoBuilder<'a> { 1220 ApplicationInfoBuilder { 1221 inner: ApplicationInfo::default(), 1222 marker: ::std::marker::PhantomData, 1223 } 1224 } 1225 } 1226 #[repr(transparent)] 1227 pub struct ApplicationInfoBuilder<'a> { 1228 inner: ApplicationInfo, 1229 marker: ::std::marker::PhantomData<&'a ()>, 1230 } 1231 pub unsafe trait ExtendsApplicationInfo {} 1232 impl<'a> ::std::ops::Deref for ApplicationInfoBuilder<'a> { 1233 type Target = ApplicationInfo; deref(&self) -> &Self::Target1234 fn deref(&self) -> &Self::Target { 1235 &self.inner 1236 } 1237 } 1238 impl<'a> ::std::ops::DerefMut for ApplicationInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1239 fn deref_mut(&mut self) -> &mut Self::Target { 1240 &mut self.inner 1241 } 1242 } 1243 impl<'a> ApplicationInfoBuilder<'a> { application_name( mut self, application_name: &'a ::std::ffi::CStr, ) -> ApplicationInfoBuilder<'a>1244 pub fn application_name( 1245 mut self, 1246 application_name: &'a ::std::ffi::CStr, 1247 ) -> ApplicationInfoBuilder<'a> { 1248 self.inner.p_application_name = application_name.as_ptr(); 1249 self 1250 } application_version(mut self, application_version: u32) -> ApplicationInfoBuilder<'a>1251 pub fn application_version(mut self, application_version: u32) -> ApplicationInfoBuilder<'a> { 1252 self.inner.application_version = application_version; 1253 self 1254 } engine_name(mut self, engine_name: &'a ::std::ffi::CStr) -> ApplicationInfoBuilder<'a>1255 pub fn engine_name(mut self, engine_name: &'a ::std::ffi::CStr) -> ApplicationInfoBuilder<'a> { 1256 self.inner.p_engine_name = engine_name.as_ptr(); 1257 self 1258 } engine_version(mut self, engine_version: u32) -> ApplicationInfoBuilder<'a>1259 pub fn engine_version(mut self, engine_version: u32) -> ApplicationInfoBuilder<'a> { 1260 self.inner.engine_version = engine_version; 1261 self 1262 } api_version(mut self, api_version: u32) -> ApplicationInfoBuilder<'a>1263 pub fn api_version(mut self, api_version: u32) -> ApplicationInfoBuilder<'a> { 1264 self.inner.api_version = api_version; 1265 self 1266 } 1267 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 1268 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 1269 #[doc = r" valid extension structs can be pushed into the chain."] 1270 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 1271 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsApplicationInfo>( mut self, next: &'a mut T, ) -> ApplicationInfoBuilder<'a>1272 pub fn push_next<T: ExtendsApplicationInfo>( 1273 mut self, 1274 next: &'a mut T, 1275 ) -> ApplicationInfoBuilder<'a> { 1276 unsafe { 1277 let next_ptr = next as *mut T as *mut BaseOutStructure; 1278 let last_next = ptr_chain_iter(next).last().unwrap(); 1279 (*last_next).p_next = self.inner.p_next as _; 1280 self.inner.p_next = next_ptr as _; 1281 } 1282 self 1283 } 1284 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1285 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1286 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ApplicationInfo1287 pub fn build(self) -> ApplicationInfo { 1288 self.inner 1289 } 1290 } 1291 #[repr(C)] 1292 #[derive(Copy, Clone)] 1293 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAllocationCallbacks.html>"] 1294 pub struct AllocationCallbacks { 1295 pub p_user_data: *mut c_void, 1296 pub pfn_allocation: PFN_vkAllocationFunction, 1297 pub pfn_reallocation: PFN_vkReallocationFunction, 1298 pub pfn_free: PFN_vkFreeFunction, 1299 pub pfn_internal_allocation: PFN_vkInternalAllocationNotification, 1300 pub pfn_internal_free: PFN_vkInternalFreeNotification, 1301 } 1302 impl fmt::Debug for AllocationCallbacks { fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result1303 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { 1304 fmt.debug_struct("AllocationCallbacks") 1305 .field("p_user_data", &self.p_user_data) 1306 .field( 1307 "pfn_allocation", 1308 &(self.pfn_allocation.map(|x| x as *const ())), 1309 ) 1310 .field( 1311 "pfn_reallocation", 1312 &(self.pfn_reallocation.map(|x| x as *const ())), 1313 ) 1314 .field("pfn_free", &(self.pfn_free.map(|x| x as *const ()))) 1315 .field( 1316 "pfn_internal_allocation", 1317 &(self.pfn_internal_allocation.map(|x| x as *const ())), 1318 ) 1319 .field( 1320 "pfn_internal_free", 1321 &(self.pfn_internal_free.map(|x| x as *const ())), 1322 ) 1323 .finish() 1324 } 1325 } 1326 impl ::std::default::Default for AllocationCallbacks { default() -> AllocationCallbacks1327 fn default() -> AllocationCallbacks { 1328 AllocationCallbacks { 1329 p_user_data: ::std::ptr::null_mut(), 1330 pfn_allocation: PFN_vkAllocationFunction::default(), 1331 pfn_reallocation: PFN_vkReallocationFunction::default(), 1332 pfn_free: PFN_vkFreeFunction::default(), 1333 pfn_internal_allocation: PFN_vkInternalAllocationNotification::default(), 1334 pfn_internal_free: PFN_vkInternalFreeNotification::default(), 1335 } 1336 } 1337 } 1338 impl AllocationCallbacks { builder<'a>() -> AllocationCallbacksBuilder<'a>1339 pub fn builder<'a>() -> AllocationCallbacksBuilder<'a> { 1340 AllocationCallbacksBuilder { 1341 inner: AllocationCallbacks::default(), 1342 marker: ::std::marker::PhantomData, 1343 } 1344 } 1345 } 1346 #[repr(transparent)] 1347 pub struct AllocationCallbacksBuilder<'a> { 1348 inner: AllocationCallbacks, 1349 marker: ::std::marker::PhantomData<&'a ()>, 1350 } 1351 impl<'a> ::std::ops::Deref for AllocationCallbacksBuilder<'a> { 1352 type Target = AllocationCallbacks; deref(&self) -> &Self::Target1353 fn deref(&self) -> &Self::Target { 1354 &self.inner 1355 } 1356 } 1357 impl<'a> ::std::ops::DerefMut for AllocationCallbacksBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1358 fn deref_mut(&mut self) -> &mut Self::Target { 1359 &mut self.inner 1360 } 1361 } 1362 impl<'a> AllocationCallbacksBuilder<'a> { user_data(mut self, user_data: *mut c_void) -> AllocationCallbacksBuilder<'a>1363 pub fn user_data(mut self, user_data: *mut c_void) -> AllocationCallbacksBuilder<'a> { 1364 self.inner.p_user_data = user_data; 1365 self 1366 } pfn_allocation( mut self, pfn_allocation: PFN_vkAllocationFunction, ) -> AllocationCallbacksBuilder<'a>1367 pub fn pfn_allocation( 1368 mut self, 1369 pfn_allocation: PFN_vkAllocationFunction, 1370 ) -> AllocationCallbacksBuilder<'a> { 1371 self.inner.pfn_allocation = pfn_allocation; 1372 self 1373 } pfn_reallocation( mut self, pfn_reallocation: PFN_vkReallocationFunction, ) -> AllocationCallbacksBuilder<'a>1374 pub fn pfn_reallocation( 1375 mut self, 1376 pfn_reallocation: PFN_vkReallocationFunction, 1377 ) -> AllocationCallbacksBuilder<'a> { 1378 self.inner.pfn_reallocation = pfn_reallocation; 1379 self 1380 } pfn_free(mut self, pfn_free: PFN_vkFreeFunction) -> AllocationCallbacksBuilder<'a>1381 pub fn pfn_free(mut self, pfn_free: PFN_vkFreeFunction) -> AllocationCallbacksBuilder<'a> { 1382 self.inner.pfn_free = pfn_free; 1383 self 1384 } pfn_internal_allocation( mut self, pfn_internal_allocation: PFN_vkInternalAllocationNotification, ) -> AllocationCallbacksBuilder<'a>1385 pub fn pfn_internal_allocation( 1386 mut self, 1387 pfn_internal_allocation: PFN_vkInternalAllocationNotification, 1388 ) -> AllocationCallbacksBuilder<'a> { 1389 self.inner.pfn_internal_allocation = pfn_internal_allocation; 1390 self 1391 } pfn_internal_free( mut self, pfn_internal_free: PFN_vkInternalFreeNotification, ) -> AllocationCallbacksBuilder<'a>1392 pub fn pfn_internal_free( 1393 mut self, 1394 pfn_internal_free: PFN_vkInternalFreeNotification, 1395 ) -> AllocationCallbacksBuilder<'a> { 1396 self.inner.pfn_internal_free = pfn_internal_free; 1397 self 1398 } 1399 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1400 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1401 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> AllocationCallbacks1402 pub fn build(self) -> AllocationCallbacks { 1403 self.inner 1404 } 1405 } 1406 #[repr(C)] 1407 #[derive(Copy, Clone, Debug)] 1408 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceQueueCreateInfo.html>"] 1409 pub struct DeviceQueueCreateInfo { 1410 pub s_type: StructureType, 1411 pub p_next: *const c_void, 1412 pub flags: DeviceQueueCreateFlags, 1413 pub queue_family_index: u32, 1414 pub queue_count: u32, 1415 pub p_queue_priorities: *const f32, 1416 } 1417 impl ::std::default::Default for DeviceQueueCreateInfo { default() -> DeviceQueueCreateInfo1418 fn default() -> DeviceQueueCreateInfo { 1419 DeviceQueueCreateInfo { 1420 s_type: StructureType::DEVICE_QUEUE_CREATE_INFO, 1421 p_next: ::std::ptr::null(), 1422 flags: DeviceQueueCreateFlags::default(), 1423 queue_family_index: u32::default(), 1424 queue_count: u32::default(), 1425 p_queue_priorities: ::std::ptr::null(), 1426 } 1427 } 1428 } 1429 impl DeviceQueueCreateInfo { builder<'a>() -> DeviceQueueCreateInfoBuilder<'a>1430 pub fn builder<'a>() -> DeviceQueueCreateInfoBuilder<'a> { 1431 DeviceQueueCreateInfoBuilder { 1432 inner: DeviceQueueCreateInfo::default(), 1433 marker: ::std::marker::PhantomData, 1434 } 1435 } 1436 } 1437 #[repr(transparent)] 1438 pub struct DeviceQueueCreateInfoBuilder<'a> { 1439 inner: DeviceQueueCreateInfo, 1440 marker: ::std::marker::PhantomData<&'a ()>, 1441 } 1442 pub unsafe trait ExtendsDeviceQueueCreateInfo {} 1443 impl<'a> ::std::ops::Deref for DeviceQueueCreateInfoBuilder<'a> { 1444 type Target = DeviceQueueCreateInfo; deref(&self) -> &Self::Target1445 fn deref(&self) -> &Self::Target { 1446 &self.inner 1447 } 1448 } 1449 impl<'a> ::std::ops::DerefMut for DeviceQueueCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1450 fn deref_mut(&mut self) -> &mut Self::Target { 1451 &mut self.inner 1452 } 1453 } 1454 impl<'a> DeviceQueueCreateInfoBuilder<'a> { flags(mut self, flags: DeviceQueueCreateFlags) -> DeviceQueueCreateInfoBuilder<'a>1455 pub fn flags(mut self, flags: DeviceQueueCreateFlags) -> DeviceQueueCreateInfoBuilder<'a> { 1456 self.inner.flags = flags; 1457 self 1458 } queue_family_index( mut self, queue_family_index: u32, ) -> DeviceQueueCreateInfoBuilder<'a>1459 pub fn queue_family_index( 1460 mut self, 1461 queue_family_index: u32, 1462 ) -> DeviceQueueCreateInfoBuilder<'a> { 1463 self.inner.queue_family_index = queue_family_index; 1464 self 1465 } queue_priorities( mut self, queue_priorities: &'a [f32], ) -> DeviceQueueCreateInfoBuilder<'a>1466 pub fn queue_priorities( 1467 mut self, 1468 queue_priorities: &'a [f32], 1469 ) -> DeviceQueueCreateInfoBuilder<'a> { 1470 self.inner.queue_count = queue_priorities.len() as _; 1471 self.inner.p_queue_priorities = queue_priorities.as_ptr(); 1472 self 1473 } 1474 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 1475 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 1476 #[doc = r" valid extension structs can be pushed into the chain."] 1477 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 1478 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsDeviceQueueCreateInfo>( mut self, next: &'a mut T, ) -> DeviceQueueCreateInfoBuilder<'a>1479 pub fn push_next<T: ExtendsDeviceQueueCreateInfo>( 1480 mut self, 1481 next: &'a mut T, 1482 ) -> DeviceQueueCreateInfoBuilder<'a> { 1483 unsafe { 1484 let next_ptr = next as *mut T as *mut BaseOutStructure; 1485 let last_next = ptr_chain_iter(next).last().unwrap(); 1486 (*last_next).p_next = self.inner.p_next as _; 1487 self.inner.p_next = next_ptr as _; 1488 } 1489 self 1490 } 1491 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1492 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1493 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> DeviceQueueCreateInfo1494 pub fn build(self) -> DeviceQueueCreateInfo { 1495 self.inner 1496 } 1497 } 1498 #[repr(C)] 1499 #[derive(Copy, Clone, Debug)] 1500 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceCreateInfo.html>"] 1501 pub struct DeviceCreateInfo { 1502 pub s_type: StructureType, 1503 pub p_next: *const c_void, 1504 pub flags: DeviceCreateFlags, 1505 pub queue_create_info_count: u32, 1506 pub p_queue_create_infos: *const DeviceQueueCreateInfo, 1507 pub enabled_layer_count: u32, 1508 pub pp_enabled_layer_names: *const *const c_char, 1509 pub enabled_extension_count: u32, 1510 pub pp_enabled_extension_names: *const *const c_char, 1511 pub p_enabled_features: *const PhysicalDeviceFeatures, 1512 } 1513 impl ::std::default::Default for DeviceCreateInfo { default() -> DeviceCreateInfo1514 fn default() -> DeviceCreateInfo { 1515 DeviceCreateInfo { 1516 s_type: StructureType::DEVICE_CREATE_INFO, 1517 p_next: ::std::ptr::null(), 1518 flags: DeviceCreateFlags::default(), 1519 queue_create_info_count: u32::default(), 1520 p_queue_create_infos: ::std::ptr::null(), 1521 enabled_layer_count: u32::default(), 1522 pp_enabled_layer_names: ::std::ptr::null(), 1523 enabled_extension_count: u32::default(), 1524 pp_enabled_extension_names: ::std::ptr::null(), 1525 p_enabled_features: ::std::ptr::null(), 1526 } 1527 } 1528 } 1529 impl DeviceCreateInfo { builder<'a>() -> DeviceCreateInfoBuilder<'a>1530 pub fn builder<'a>() -> DeviceCreateInfoBuilder<'a> { 1531 DeviceCreateInfoBuilder { 1532 inner: DeviceCreateInfo::default(), 1533 marker: ::std::marker::PhantomData, 1534 } 1535 } 1536 } 1537 #[repr(transparent)] 1538 pub struct DeviceCreateInfoBuilder<'a> { 1539 inner: DeviceCreateInfo, 1540 marker: ::std::marker::PhantomData<&'a ()>, 1541 } 1542 pub unsafe trait ExtendsDeviceCreateInfo {} 1543 impl<'a> ::std::ops::Deref for DeviceCreateInfoBuilder<'a> { 1544 type Target = DeviceCreateInfo; deref(&self) -> &Self::Target1545 fn deref(&self) -> &Self::Target { 1546 &self.inner 1547 } 1548 } 1549 impl<'a> ::std::ops::DerefMut for DeviceCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1550 fn deref_mut(&mut self) -> &mut Self::Target { 1551 &mut self.inner 1552 } 1553 } 1554 impl<'a> DeviceCreateInfoBuilder<'a> { flags(mut self, flags: DeviceCreateFlags) -> DeviceCreateInfoBuilder<'a>1555 pub fn flags(mut self, flags: DeviceCreateFlags) -> DeviceCreateInfoBuilder<'a> { 1556 self.inner.flags = flags; 1557 self 1558 } queue_create_infos( mut self, queue_create_infos: &'a [DeviceQueueCreateInfo], ) -> DeviceCreateInfoBuilder<'a>1559 pub fn queue_create_infos( 1560 mut self, 1561 queue_create_infos: &'a [DeviceQueueCreateInfo], 1562 ) -> DeviceCreateInfoBuilder<'a> { 1563 self.inner.queue_create_info_count = queue_create_infos.len() as _; 1564 self.inner.p_queue_create_infos = queue_create_infos.as_ptr(); 1565 self 1566 } enabled_layer_names( mut self, enabled_layer_names: &'a [*const c_char], ) -> DeviceCreateInfoBuilder<'a>1567 pub fn enabled_layer_names( 1568 mut self, 1569 enabled_layer_names: &'a [*const c_char], 1570 ) -> DeviceCreateInfoBuilder<'a> { 1571 self.inner.enabled_layer_count = enabled_layer_names.len() as _; 1572 self.inner.pp_enabled_layer_names = enabled_layer_names.as_ptr(); 1573 self 1574 } enabled_extension_names( mut self, enabled_extension_names: &'a [*const c_char], ) -> DeviceCreateInfoBuilder<'a>1575 pub fn enabled_extension_names( 1576 mut self, 1577 enabled_extension_names: &'a [*const c_char], 1578 ) -> DeviceCreateInfoBuilder<'a> { 1579 self.inner.enabled_extension_count = enabled_extension_names.len() as _; 1580 self.inner.pp_enabled_extension_names = enabled_extension_names.as_ptr(); 1581 self 1582 } enabled_features( mut self, enabled_features: &'a PhysicalDeviceFeatures, ) -> DeviceCreateInfoBuilder<'a>1583 pub fn enabled_features( 1584 mut self, 1585 enabled_features: &'a PhysicalDeviceFeatures, 1586 ) -> DeviceCreateInfoBuilder<'a> { 1587 self.inner.p_enabled_features = enabled_features; 1588 self 1589 } 1590 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 1591 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 1592 #[doc = r" valid extension structs can be pushed into the chain."] 1593 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 1594 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsDeviceCreateInfo>( mut self, next: &'a mut T, ) -> DeviceCreateInfoBuilder<'a>1595 pub fn push_next<T: ExtendsDeviceCreateInfo>( 1596 mut self, 1597 next: &'a mut T, 1598 ) -> DeviceCreateInfoBuilder<'a> { 1599 unsafe { 1600 let next_ptr = next as *mut T as *mut BaseOutStructure; 1601 let last_next = ptr_chain_iter(next).last().unwrap(); 1602 (*last_next).p_next = self.inner.p_next as _; 1603 self.inner.p_next = next_ptr as _; 1604 } 1605 self 1606 } 1607 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1608 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1609 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> DeviceCreateInfo1610 pub fn build(self) -> DeviceCreateInfo { 1611 self.inner 1612 } 1613 } 1614 #[repr(C)] 1615 #[derive(Copy, Clone, Debug)] 1616 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstanceCreateInfo.html>"] 1617 pub struct InstanceCreateInfo { 1618 pub s_type: StructureType, 1619 pub p_next: *const c_void, 1620 pub flags: InstanceCreateFlags, 1621 pub p_application_info: *const ApplicationInfo, 1622 pub enabled_layer_count: u32, 1623 pub pp_enabled_layer_names: *const *const c_char, 1624 pub enabled_extension_count: u32, 1625 pub pp_enabled_extension_names: *const *const c_char, 1626 } 1627 impl ::std::default::Default for InstanceCreateInfo { default() -> InstanceCreateInfo1628 fn default() -> InstanceCreateInfo { 1629 InstanceCreateInfo { 1630 s_type: StructureType::INSTANCE_CREATE_INFO, 1631 p_next: ::std::ptr::null(), 1632 flags: InstanceCreateFlags::default(), 1633 p_application_info: ::std::ptr::null(), 1634 enabled_layer_count: u32::default(), 1635 pp_enabled_layer_names: ::std::ptr::null(), 1636 enabled_extension_count: u32::default(), 1637 pp_enabled_extension_names: ::std::ptr::null(), 1638 } 1639 } 1640 } 1641 impl InstanceCreateInfo { builder<'a>() -> InstanceCreateInfoBuilder<'a>1642 pub fn builder<'a>() -> InstanceCreateInfoBuilder<'a> { 1643 InstanceCreateInfoBuilder { 1644 inner: InstanceCreateInfo::default(), 1645 marker: ::std::marker::PhantomData, 1646 } 1647 } 1648 } 1649 #[repr(transparent)] 1650 pub struct InstanceCreateInfoBuilder<'a> { 1651 inner: InstanceCreateInfo, 1652 marker: ::std::marker::PhantomData<&'a ()>, 1653 } 1654 pub unsafe trait ExtendsInstanceCreateInfo {} 1655 impl<'a> ::std::ops::Deref for InstanceCreateInfoBuilder<'a> { 1656 type Target = InstanceCreateInfo; deref(&self) -> &Self::Target1657 fn deref(&self) -> &Self::Target { 1658 &self.inner 1659 } 1660 } 1661 impl<'a> ::std::ops::DerefMut for InstanceCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1662 fn deref_mut(&mut self) -> &mut Self::Target { 1663 &mut self.inner 1664 } 1665 } 1666 impl<'a> InstanceCreateInfoBuilder<'a> { flags(mut self, flags: InstanceCreateFlags) -> InstanceCreateInfoBuilder<'a>1667 pub fn flags(mut self, flags: InstanceCreateFlags) -> InstanceCreateInfoBuilder<'a> { 1668 self.inner.flags = flags; 1669 self 1670 } application_info( mut self, application_info: &'a ApplicationInfo, ) -> InstanceCreateInfoBuilder<'a>1671 pub fn application_info( 1672 mut self, 1673 application_info: &'a ApplicationInfo, 1674 ) -> InstanceCreateInfoBuilder<'a> { 1675 self.inner.p_application_info = application_info; 1676 self 1677 } enabled_layer_names( mut self, enabled_layer_names: &'a [*const c_char], ) -> InstanceCreateInfoBuilder<'a>1678 pub fn enabled_layer_names( 1679 mut self, 1680 enabled_layer_names: &'a [*const c_char], 1681 ) -> InstanceCreateInfoBuilder<'a> { 1682 self.inner.enabled_layer_count = enabled_layer_names.len() as _; 1683 self.inner.pp_enabled_layer_names = enabled_layer_names.as_ptr(); 1684 self 1685 } enabled_extension_names( mut self, enabled_extension_names: &'a [*const c_char], ) -> InstanceCreateInfoBuilder<'a>1686 pub fn enabled_extension_names( 1687 mut self, 1688 enabled_extension_names: &'a [*const c_char], 1689 ) -> InstanceCreateInfoBuilder<'a> { 1690 self.inner.enabled_extension_count = enabled_extension_names.len() as _; 1691 self.inner.pp_enabled_extension_names = enabled_extension_names.as_ptr(); 1692 self 1693 } 1694 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 1695 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 1696 #[doc = r" valid extension structs can be pushed into the chain."] 1697 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 1698 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsInstanceCreateInfo>( mut self, next: &'a mut T, ) -> InstanceCreateInfoBuilder<'a>1699 pub fn push_next<T: ExtendsInstanceCreateInfo>( 1700 mut self, 1701 next: &'a mut T, 1702 ) -> InstanceCreateInfoBuilder<'a> { 1703 unsafe { 1704 let next_ptr = next as *mut T as *mut BaseOutStructure; 1705 let last_next = ptr_chain_iter(next).last().unwrap(); 1706 (*last_next).p_next = self.inner.p_next as _; 1707 self.inner.p_next = next_ptr as _; 1708 } 1709 self 1710 } 1711 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1712 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1713 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> InstanceCreateInfo1714 pub fn build(self) -> InstanceCreateInfo { 1715 self.inner 1716 } 1717 } 1718 #[repr(C)] 1719 #[derive(Copy, Clone, Default, Debug)] 1720 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueueFamilyProperties.html>"] 1721 pub struct QueueFamilyProperties { 1722 pub queue_flags: QueueFlags, 1723 pub queue_count: u32, 1724 pub timestamp_valid_bits: u32, 1725 pub min_image_transfer_granularity: Extent3D, 1726 } 1727 impl QueueFamilyProperties { builder<'a>() -> QueueFamilyPropertiesBuilder<'a>1728 pub fn builder<'a>() -> QueueFamilyPropertiesBuilder<'a> { 1729 QueueFamilyPropertiesBuilder { 1730 inner: QueueFamilyProperties::default(), 1731 marker: ::std::marker::PhantomData, 1732 } 1733 } 1734 } 1735 #[repr(transparent)] 1736 pub struct QueueFamilyPropertiesBuilder<'a> { 1737 inner: QueueFamilyProperties, 1738 marker: ::std::marker::PhantomData<&'a ()>, 1739 } 1740 impl<'a> ::std::ops::Deref for QueueFamilyPropertiesBuilder<'a> { 1741 type Target = QueueFamilyProperties; deref(&self) -> &Self::Target1742 fn deref(&self) -> &Self::Target { 1743 &self.inner 1744 } 1745 } 1746 impl<'a> ::std::ops::DerefMut for QueueFamilyPropertiesBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1747 fn deref_mut(&mut self) -> &mut Self::Target { 1748 &mut self.inner 1749 } 1750 } 1751 impl<'a> QueueFamilyPropertiesBuilder<'a> { queue_flags(mut self, queue_flags: QueueFlags) -> QueueFamilyPropertiesBuilder<'a>1752 pub fn queue_flags(mut self, queue_flags: QueueFlags) -> QueueFamilyPropertiesBuilder<'a> { 1753 self.inner.queue_flags = queue_flags; 1754 self 1755 } queue_count(mut self, queue_count: u32) -> QueueFamilyPropertiesBuilder<'a>1756 pub fn queue_count(mut self, queue_count: u32) -> QueueFamilyPropertiesBuilder<'a> { 1757 self.inner.queue_count = queue_count; 1758 self 1759 } timestamp_valid_bits( mut self, timestamp_valid_bits: u32, ) -> QueueFamilyPropertiesBuilder<'a>1760 pub fn timestamp_valid_bits( 1761 mut self, 1762 timestamp_valid_bits: u32, 1763 ) -> QueueFamilyPropertiesBuilder<'a> { 1764 self.inner.timestamp_valid_bits = timestamp_valid_bits; 1765 self 1766 } min_image_transfer_granularity( mut self, min_image_transfer_granularity: Extent3D, ) -> QueueFamilyPropertiesBuilder<'a>1767 pub fn min_image_transfer_granularity( 1768 mut self, 1769 min_image_transfer_granularity: Extent3D, 1770 ) -> QueueFamilyPropertiesBuilder<'a> { 1771 self.inner.min_image_transfer_granularity = min_image_transfer_granularity; 1772 self 1773 } 1774 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1775 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1776 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> QueueFamilyProperties1777 pub fn build(self) -> QueueFamilyProperties { 1778 self.inner 1779 } 1780 } 1781 #[repr(C)] 1782 #[derive(Copy, Clone, Debug)] 1783 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceMemoryProperties.html>"] 1784 pub struct PhysicalDeviceMemoryProperties { 1785 pub memory_type_count: u32, 1786 pub memory_types: [MemoryType; MAX_MEMORY_TYPES], 1787 pub memory_heap_count: u32, 1788 pub memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS], 1789 } 1790 impl ::std::default::Default for PhysicalDeviceMemoryProperties { default() -> PhysicalDeviceMemoryProperties1791 fn default() -> PhysicalDeviceMemoryProperties { 1792 PhysicalDeviceMemoryProperties { 1793 memory_type_count: u32::default(), 1794 memory_types: unsafe { ::std::mem::zeroed() }, 1795 memory_heap_count: u32::default(), 1796 memory_heaps: unsafe { ::std::mem::zeroed() }, 1797 } 1798 } 1799 } 1800 impl PhysicalDeviceMemoryProperties { builder<'a>() -> PhysicalDeviceMemoryPropertiesBuilder<'a>1801 pub fn builder<'a>() -> PhysicalDeviceMemoryPropertiesBuilder<'a> { 1802 PhysicalDeviceMemoryPropertiesBuilder { 1803 inner: PhysicalDeviceMemoryProperties::default(), 1804 marker: ::std::marker::PhantomData, 1805 } 1806 } 1807 } 1808 #[repr(transparent)] 1809 pub struct PhysicalDeviceMemoryPropertiesBuilder<'a> { 1810 inner: PhysicalDeviceMemoryProperties, 1811 marker: ::std::marker::PhantomData<&'a ()>, 1812 } 1813 impl<'a> ::std::ops::Deref for PhysicalDeviceMemoryPropertiesBuilder<'a> { 1814 type Target = PhysicalDeviceMemoryProperties; deref(&self) -> &Self::Target1815 fn deref(&self) -> &Self::Target { 1816 &self.inner 1817 } 1818 } 1819 impl<'a> ::std::ops::DerefMut for PhysicalDeviceMemoryPropertiesBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1820 fn deref_mut(&mut self) -> &mut Self::Target { 1821 &mut self.inner 1822 } 1823 } 1824 impl<'a> PhysicalDeviceMemoryPropertiesBuilder<'a> { memory_type_count( mut self, memory_type_count: u32, ) -> PhysicalDeviceMemoryPropertiesBuilder<'a>1825 pub fn memory_type_count( 1826 mut self, 1827 memory_type_count: u32, 1828 ) -> PhysicalDeviceMemoryPropertiesBuilder<'a> { 1829 self.inner.memory_type_count = memory_type_count; 1830 self 1831 } memory_types( mut self, memory_types: [MemoryType; MAX_MEMORY_TYPES], ) -> PhysicalDeviceMemoryPropertiesBuilder<'a>1832 pub fn memory_types( 1833 mut self, 1834 memory_types: [MemoryType; MAX_MEMORY_TYPES], 1835 ) -> PhysicalDeviceMemoryPropertiesBuilder<'a> { 1836 self.inner.memory_types = memory_types; 1837 self 1838 } memory_heap_count( mut self, memory_heap_count: u32, ) -> PhysicalDeviceMemoryPropertiesBuilder<'a>1839 pub fn memory_heap_count( 1840 mut self, 1841 memory_heap_count: u32, 1842 ) -> PhysicalDeviceMemoryPropertiesBuilder<'a> { 1843 self.inner.memory_heap_count = memory_heap_count; 1844 self 1845 } memory_heaps( mut self, memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS], ) -> PhysicalDeviceMemoryPropertiesBuilder<'a>1846 pub fn memory_heaps( 1847 mut self, 1848 memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS], 1849 ) -> PhysicalDeviceMemoryPropertiesBuilder<'a> { 1850 self.inner.memory_heaps = memory_heaps; 1851 self 1852 } 1853 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1854 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1855 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PhysicalDeviceMemoryProperties1856 pub fn build(self) -> PhysicalDeviceMemoryProperties { 1857 self.inner 1858 } 1859 } 1860 #[repr(C)] 1861 #[derive(Copy, Clone, Debug)] 1862 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryAllocateInfo.html>"] 1863 pub struct MemoryAllocateInfo { 1864 pub s_type: StructureType, 1865 pub p_next: *const c_void, 1866 pub allocation_size: DeviceSize, 1867 pub memory_type_index: u32, 1868 } 1869 impl ::std::default::Default for MemoryAllocateInfo { default() -> MemoryAllocateInfo1870 fn default() -> MemoryAllocateInfo { 1871 MemoryAllocateInfo { 1872 s_type: StructureType::MEMORY_ALLOCATE_INFO, 1873 p_next: ::std::ptr::null(), 1874 allocation_size: DeviceSize::default(), 1875 memory_type_index: u32::default(), 1876 } 1877 } 1878 } 1879 impl MemoryAllocateInfo { builder<'a>() -> MemoryAllocateInfoBuilder<'a>1880 pub fn builder<'a>() -> MemoryAllocateInfoBuilder<'a> { 1881 MemoryAllocateInfoBuilder { 1882 inner: MemoryAllocateInfo::default(), 1883 marker: ::std::marker::PhantomData, 1884 } 1885 } 1886 } 1887 #[repr(transparent)] 1888 pub struct MemoryAllocateInfoBuilder<'a> { 1889 inner: MemoryAllocateInfo, 1890 marker: ::std::marker::PhantomData<&'a ()>, 1891 } 1892 pub unsafe trait ExtendsMemoryAllocateInfo {} 1893 impl<'a> ::std::ops::Deref for MemoryAllocateInfoBuilder<'a> { 1894 type Target = MemoryAllocateInfo; deref(&self) -> &Self::Target1895 fn deref(&self) -> &Self::Target { 1896 &self.inner 1897 } 1898 } 1899 impl<'a> ::std::ops::DerefMut for MemoryAllocateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1900 fn deref_mut(&mut self) -> &mut Self::Target { 1901 &mut self.inner 1902 } 1903 } 1904 impl<'a> MemoryAllocateInfoBuilder<'a> { allocation_size(mut self, allocation_size: DeviceSize) -> MemoryAllocateInfoBuilder<'a>1905 pub fn allocation_size(mut self, allocation_size: DeviceSize) -> MemoryAllocateInfoBuilder<'a> { 1906 self.inner.allocation_size = allocation_size; 1907 self 1908 } memory_type_index(mut self, memory_type_index: u32) -> MemoryAllocateInfoBuilder<'a>1909 pub fn memory_type_index(mut self, memory_type_index: u32) -> MemoryAllocateInfoBuilder<'a> { 1910 self.inner.memory_type_index = memory_type_index; 1911 self 1912 } 1913 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 1914 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 1915 #[doc = r" valid extension structs can be pushed into the chain."] 1916 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 1917 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsMemoryAllocateInfo>( mut self, next: &'a mut T, ) -> MemoryAllocateInfoBuilder<'a>1918 pub fn push_next<T: ExtendsMemoryAllocateInfo>( 1919 mut self, 1920 next: &'a mut T, 1921 ) -> MemoryAllocateInfoBuilder<'a> { 1922 unsafe { 1923 let next_ptr = next as *mut T as *mut BaseOutStructure; 1924 let last_next = ptr_chain_iter(next).last().unwrap(); 1925 (*last_next).p_next = self.inner.p_next as _; 1926 self.inner.p_next = next_ptr as _; 1927 } 1928 self 1929 } 1930 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1931 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1932 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> MemoryAllocateInfo1933 pub fn build(self) -> MemoryAllocateInfo { 1934 self.inner 1935 } 1936 } 1937 #[repr(C)] 1938 #[derive(Copy, Clone, Default, Debug)] 1939 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryRequirements.html>"] 1940 pub struct MemoryRequirements { 1941 pub size: DeviceSize, 1942 pub alignment: DeviceSize, 1943 pub memory_type_bits: u32, 1944 } 1945 impl MemoryRequirements { builder<'a>() -> MemoryRequirementsBuilder<'a>1946 pub fn builder<'a>() -> MemoryRequirementsBuilder<'a> { 1947 MemoryRequirementsBuilder { 1948 inner: MemoryRequirements::default(), 1949 marker: ::std::marker::PhantomData, 1950 } 1951 } 1952 } 1953 #[repr(transparent)] 1954 pub struct MemoryRequirementsBuilder<'a> { 1955 inner: MemoryRequirements, 1956 marker: ::std::marker::PhantomData<&'a ()>, 1957 } 1958 impl<'a> ::std::ops::Deref for MemoryRequirementsBuilder<'a> { 1959 type Target = MemoryRequirements; deref(&self) -> &Self::Target1960 fn deref(&self) -> &Self::Target { 1961 &self.inner 1962 } 1963 } 1964 impl<'a> ::std::ops::DerefMut for MemoryRequirementsBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target1965 fn deref_mut(&mut self) -> &mut Self::Target { 1966 &mut self.inner 1967 } 1968 } 1969 impl<'a> MemoryRequirementsBuilder<'a> { size(mut self, size: DeviceSize) -> MemoryRequirementsBuilder<'a>1970 pub fn size(mut self, size: DeviceSize) -> MemoryRequirementsBuilder<'a> { 1971 self.inner.size = size; 1972 self 1973 } alignment(mut self, alignment: DeviceSize) -> MemoryRequirementsBuilder<'a>1974 pub fn alignment(mut self, alignment: DeviceSize) -> MemoryRequirementsBuilder<'a> { 1975 self.inner.alignment = alignment; 1976 self 1977 } memory_type_bits(mut self, memory_type_bits: u32) -> MemoryRequirementsBuilder<'a>1978 pub fn memory_type_bits(mut self, memory_type_bits: u32) -> MemoryRequirementsBuilder<'a> { 1979 self.inner.memory_type_bits = memory_type_bits; 1980 self 1981 } 1982 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 1983 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 1984 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> MemoryRequirements1985 pub fn build(self) -> MemoryRequirements { 1986 self.inner 1987 } 1988 } 1989 #[repr(C)] 1990 #[derive(Copy, Clone, Default, Debug)] 1991 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageFormatProperties.html>"] 1992 pub struct SparseImageFormatProperties { 1993 pub aspect_mask: ImageAspectFlags, 1994 pub image_granularity: Extent3D, 1995 pub flags: SparseImageFormatFlags, 1996 } 1997 impl SparseImageFormatProperties { builder<'a>() -> SparseImageFormatPropertiesBuilder<'a>1998 pub fn builder<'a>() -> SparseImageFormatPropertiesBuilder<'a> { 1999 SparseImageFormatPropertiesBuilder { 2000 inner: SparseImageFormatProperties::default(), 2001 marker: ::std::marker::PhantomData, 2002 } 2003 } 2004 } 2005 #[repr(transparent)] 2006 pub struct SparseImageFormatPropertiesBuilder<'a> { 2007 inner: SparseImageFormatProperties, 2008 marker: ::std::marker::PhantomData<&'a ()>, 2009 } 2010 impl<'a> ::std::ops::Deref for SparseImageFormatPropertiesBuilder<'a> { 2011 type Target = SparseImageFormatProperties; deref(&self) -> &Self::Target2012 fn deref(&self) -> &Self::Target { 2013 &self.inner 2014 } 2015 } 2016 impl<'a> ::std::ops::DerefMut for SparseImageFormatPropertiesBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2017 fn deref_mut(&mut self) -> &mut Self::Target { 2018 &mut self.inner 2019 } 2020 } 2021 impl<'a> SparseImageFormatPropertiesBuilder<'a> { aspect_mask( mut self, aspect_mask: ImageAspectFlags, ) -> SparseImageFormatPropertiesBuilder<'a>2022 pub fn aspect_mask( 2023 mut self, 2024 aspect_mask: ImageAspectFlags, 2025 ) -> SparseImageFormatPropertiesBuilder<'a> { 2026 self.inner.aspect_mask = aspect_mask; 2027 self 2028 } image_granularity( mut self, image_granularity: Extent3D, ) -> SparseImageFormatPropertiesBuilder<'a>2029 pub fn image_granularity( 2030 mut self, 2031 image_granularity: Extent3D, 2032 ) -> SparseImageFormatPropertiesBuilder<'a> { 2033 self.inner.image_granularity = image_granularity; 2034 self 2035 } flags( mut self, flags: SparseImageFormatFlags, ) -> SparseImageFormatPropertiesBuilder<'a>2036 pub fn flags( 2037 mut self, 2038 flags: SparseImageFormatFlags, 2039 ) -> SparseImageFormatPropertiesBuilder<'a> { 2040 self.inner.flags = flags; 2041 self 2042 } 2043 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2044 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2045 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SparseImageFormatProperties2046 pub fn build(self) -> SparseImageFormatProperties { 2047 self.inner 2048 } 2049 } 2050 #[repr(C)] 2051 #[derive(Copy, Clone, Default, Debug)] 2052 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageMemoryRequirements.html>"] 2053 pub struct SparseImageMemoryRequirements { 2054 pub format_properties: SparseImageFormatProperties, 2055 pub image_mip_tail_first_lod: u32, 2056 pub image_mip_tail_size: DeviceSize, 2057 pub image_mip_tail_offset: DeviceSize, 2058 pub image_mip_tail_stride: DeviceSize, 2059 } 2060 impl SparseImageMemoryRequirements { builder<'a>() -> SparseImageMemoryRequirementsBuilder<'a>2061 pub fn builder<'a>() -> SparseImageMemoryRequirementsBuilder<'a> { 2062 SparseImageMemoryRequirementsBuilder { 2063 inner: SparseImageMemoryRequirements::default(), 2064 marker: ::std::marker::PhantomData, 2065 } 2066 } 2067 } 2068 #[repr(transparent)] 2069 pub struct SparseImageMemoryRequirementsBuilder<'a> { 2070 inner: SparseImageMemoryRequirements, 2071 marker: ::std::marker::PhantomData<&'a ()>, 2072 } 2073 impl<'a> ::std::ops::Deref for SparseImageMemoryRequirementsBuilder<'a> { 2074 type Target = SparseImageMemoryRequirements; deref(&self) -> &Self::Target2075 fn deref(&self) -> &Self::Target { 2076 &self.inner 2077 } 2078 } 2079 impl<'a> ::std::ops::DerefMut for SparseImageMemoryRequirementsBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2080 fn deref_mut(&mut self) -> &mut Self::Target { 2081 &mut self.inner 2082 } 2083 } 2084 impl<'a> SparseImageMemoryRequirementsBuilder<'a> { format_properties( mut self, format_properties: SparseImageFormatProperties, ) -> SparseImageMemoryRequirementsBuilder<'a>2085 pub fn format_properties( 2086 mut self, 2087 format_properties: SparseImageFormatProperties, 2088 ) -> SparseImageMemoryRequirementsBuilder<'a> { 2089 self.inner.format_properties = format_properties; 2090 self 2091 } image_mip_tail_first_lod( mut self, image_mip_tail_first_lod: u32, ) -> SparseImageMemoryRequirementsBuilder<'a>2092 pub fn image_mip_tail_first_lod( 2093 mut self, 2094 image_mip_tail_first_lod: u32, 2095 ) -> SparseImageMemoryRequirementsBuilder<'a> { 2096 self.inner.image_mip_tail_first_lod = image_mip_tail_first_lod; 2097 self 2098 } image_mip_tail_size( mut self, image_mip_tail_size: DeviceSize, ) -> SparseImageMemoryRequirementsBuilder<'a>2099 pub fn image_mip_tail_size( 2100 mut self, 2101 image_mip_tail_size: DeviceSize, 2102 ) -> SparseImageMemoryRequirementsBuilder<'a> { 2103 self.inner.image_mip_tail_size = image_mip_tail_size; 2104 self 2105 } image_mip_tail_offset( mut self, image_mip_tail_offset: DeviceSize, ) -> SparseImageMemoryRequirementsBuilder<'a>2106 pub fn image_mip_tail_offset( 2107 mut self, 2108 image_mip_tail_offset: DeviceSize, 2109 ) -> SparseImageMemoryRequirementsBuilder<'a> { 2110 self.inner.image_mip_tail_offset = image_mip_tail_offset; 2111 self 2112 } image_mip_tail_stride( mut self, image_mip_tail_stride: DeviceSize, ) -> SparseImageMemoryRequirementsBuilder<'a>2113 pub fn image_mip_tail_stride( 2114 mut self, 2115 image_mip_tail_stride: DeviceSize, 2116 ) -> SparseImageMemoryRequirementsBuilder<'a> { 2117 self.inner.image_mip_tail_stride = image_mip_tail_stride; 2118 self 2119 } 2120 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2121 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2122 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SparseImageMemoryRequirements2123 pub fn build(self) -> SparseImageMemoryRequirements { 2124 self.inner 2125 } 2126 } 2127 #[repr(C)] 2128 #[derive(Copy, Clone, Default, Debug)] 2129 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryType.html>"] 2130 pub struct MemoryType { 2131 pub property_flags: MemoryPropertyFlags, 2132 pub heap_index: u32, 2133 } 2134 impl MemoryType { builder<'a>() -> MemoryTypeBuilder<'a>2135 pub fn builder<'a>() -> MemoryTypeBuilder<'a> { 2136 MemoryTypeBuilder { 2137 inner: MemoryType::default(), 2138 marker: ::std::marker::PhantomData, 2139 } 2140 } 2141 } 2142 #[repr(transparent)] 2143 pub struct MemoryTypeBuilder<'a> { 2144 inner: MemoryType, 2145 marker: ::std::marker::PhantomData<&'a ()>, 2146 } 2147 impl<'a> ::std::ops::Deref for MemoryTypeBuilder<'a> { 2148 type Target = MemoryType; deref(&self) -> &Self::Target2149 fn deref(&self) -> &Self::Target { 2150 &self.inner 2151 } 2152 } 2153 impl<'a> ::std::ops::DerefMut for MemoryTypeBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2154 fn deref_mut(&mut self) -> &mut Self::Target { 2155 &mut self.inner 2156 } 2157 } 2158 impl<'a> MemoryTypeBuilder<'a> { property_flags(mut self, property_flags: MemoryPropertyFlags) -> MemoryTypeBuilder<'a>2159 pub fn property_flags(mut self, property_flags: MemoryPropertyFlags) -> MemoryTypeBuilder<'a> { 2160 self.inner.property_flags = property_flags; 2161 self 2162 } heap_index(mut self, heap_index: u32) -> MemoryTypeBuilder<'a>2163 pub fn heap_index(mut self, heap_index: u32) -> MemoryTypeBuilder<'a> { 2164 self.inner.heap_index = heap_index; 2165 self 2166 } 2167 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2168 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2169 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> MemoryType2170 pub fn build(self) -> MemoryType { 2171 self.inner 2172 } 2173 } 2174 #[repr(C)] 2175 #[derive(Copy, Clone, Default, Debug)] 2176 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryHeap.html>"] 2177 pub struct MemoryHeap { 2178 pub size: DeviceSize, 2179 pub flags: MemoryHeapFlags, 2180 } 2181 impl MemoryHeap { builder<'a>() -> MemoryHeapBuilder<'a>2182 pub fn builder<'a>() -> MemoryHeapBuilder<'a> { 2183 MemoryHeapBuilder { 2184 inner: MemoryHeap::default(), 2185 marker: ::std::marker::PhantomData, 2186 } 2187 } 2188 } 2189 #[repr(transparent)] 2190 pub struct MemoryHeapBuilder<'a> { 2191 inner: MemoryHeap, 2192 marker: ::std::marker::PhantomData<&'a ()>, 2193 } 2194 impl<'a> ::std::ops::Deref for MemoryHeapBuilder<'a> { 2195 type Target = MemoryHeap; deref(&self) -> &Self::Target2196 fn deref(&self) -> &Self::Target { 2197 &self.inner 2198 } 2199 } 2200 impl<'a> ::std::ops::DerefMut for MemoryHeapBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2201 fn deref_mut(&mut self) -> &mut Self::Target { 2202 &mut self.inner 2203 } 2204 } 2205 impl<'a> MemoryHeapBuilder<'a> { size(mut self, size: DeviceSize) -> MemoryHeapBuilder<'a>2206 pub fn size(mut self, size: DeviceSize) -> MemoryHeapBuilder<'a> { 2207 self.inner.size = size; 2208 self 2209 } flags(mut self, flags: MemoryHeapFlags) -> MemoryHeapBuilder<'a>2210 pub fn flags(mut self, flags: MemoryHeapFlags) -> MemoryHeapBuilder<'a> { 2211 self.inner.flags = flags; 2212 self 2213 } 2214 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2215 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2216 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> MemoryHeap2217 pub fn build(self) -> MemoryHeap { 2218 self.inner 2219 } 2220 } 2221 #[repr(C)] 2222 #[derive(Copy, Clone, Debug)] 2223 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMappedMemoryRange.html>"] 2224 pub struct MappedMemoryRange { 2225 pub s_type: StructureType, 2226 pub p_next: *const c_void, 2227 pub memory: DeviceMemory, 2228 pub offset: DeviceSize, 2229 pub size: DeviceSize, 2230 } 2231 impl ::std::default::Default for MappedMemoryRange { default() -> MappedMemoryRange2232 fn default() -> MappedMemoryRange { 2233 MappedMemoryRange { 2234 s_type: StructureType::MAPPED_MEMORY_RANGE, 2235 p_next: ::std::ptr::null(), 2236 memory: DeviceMemory::default(), 2237 offset: DeviceSize::default(), 2238 size: DeviceSize::default(), 2239 } 2240 } 2241 } 2242 impl MappedMemoryRange { builder<'a>() -> MappedMemoryRangeBuilder<'a>2243 pub fn builder<'a>() -> MappedMemoryRangeBuilder<'a> { 2244 MappedMemoryRangeBuilder { 2245 inner: MappedMemoryRange::default(), 2246 marker: ::std::marker::PhantomData, 2247 } 2248 } 2249 } 2250 #[repr(transparent)] 2251 pub struct MappedMemoryRangeBuilder<'a> { 2252 inner: MappedMemoryRange, 2253 marker: ::std::marker::PhantomData<&'a ()>, 2254 } 2255 pub unsafe trait ExtendsMappedMemoryRange {} 2256 impl<'a> ::std::ops::Deref for MappedMemoryRangeBuilder<'a> { 2257 type Target = MappedMemoryRange; deref(&self) -> &Self::Target2258 fn deref(&self) -> &Self::Target { 2259 &self.inner 2260 } 2261 } 2262 impl<'a> ::std::ops::DerefMut for MappedMemoryRangeBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2263 fn deref_mut(&mut self) -> &mut Self::Target { 2264 &mut self.inner 2265 } 2266 } 2267 impl<'a> MappedMemoryRangeBuilder<'a> { memory(mut self, memory: DeviceMemory) -> MappedMemoryRangeBuilder<'a>2268 pub fn memory(mut self, memory: DeviceMemory) -> MappedMemoryRangeBuilder<'a> { 2269 self.inner.memory = memory; 2270 self 2271 } offset(mut self, offset: DeviceSize) -> MappedMemoryRangeBuilder<'a>2272 pub fn offset(mut self, offset: DeviceSize) -> MappedMemoryRangeBuilder<'a> { 2273 self.inner.offset = offset; 2274 self 2275 } size(mut self, size: DeviceSize) -> MappedMemoryRangeBuilder<'a>2276 pub fn size(mut self, size: DeviceSize) -> MappedMemoryRangeBuilder<'a> { 2277 self.inner.size = size; 2278 self 2279 } 2280 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 2281 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 2282 #[doc = r" valid extension structs can be pushed into the chain."] 2283 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 2284 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsMappedMemoryRange>( mut self, next: &'a mut T, ) -> MappedMemoryRangeBuilder<'a>2285 pub fn push_next<T: ExtendsMappedMemoryRange>( 2286 mut self, 2287 next: &'a mut T, 2288 ) -> MappedMemoryRangeBuilder<'a> { 2289 unsafe { 2290 let next_ptr = next as *mut T as *mut BaseOutStructure; 2291 let last_next = ptr_chain_iter(next).last().unwrap(); 2292 (*last_next).p_next = self.inner.p_next as _; 2293 self.inner.p_next = next_ptr as _; 2294 } 2295 self 2296 } 2297 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2298 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2299 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> MappedMemoryRange2300 pub fn build(self) -> MappedMemoryRange { 2301 self.inner 2302 } 2303 } 2304 #[repr(C)] 2305 #[derive(Copy, Clone, Default, Debug)] 2306 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFormatProperties.html>"] 2307 pub struct FormatProperties { 2308 pub linear_tiling_features: FormatFeatureFlags, 2309 pub optimal_tiling_features: FormatFeatureFlags, 2310 pub buffer_features: FormatFeatureFlags, 2311 } 2312 impl FormatProperties { builder<'a>() -> FormatPropertiesBuilder<'a>2313 pub fn builder<'a>() -> FormatPropertiesBuilder<'a> { 2314 FormatPropertiesBuilder { 2315 inner: FormatProperties::default(), 2316 marker: ::std::marker::PhantomData, 2317 } 2318 } 2319 } 2320 #[repr(transparent)] 2321 pub struct FormatPropertiesBuilder<'a> { 2322 inner: FormatProperties, 2323 marker: ::std::marker::PhantomData<&'a ()>, 2324 } 2325 impl<'a> ::std::ops::Deref for FormatPropertiesBuilder<'a> { 2326 type Target = FormatProperties; deref(&self) -> &Self::Target2327 fn deref(&self) -> &Self::Target { 2328 &self.inner 2329 } 2330 } 2331 impl<'a> ::std::ops::DerefMut for FormatPropertiesBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2332 fn deref_mut(&mut self) -> &mut Self::Target { 2333 &mut self.inner 2334 } 2335 } 2336 impl<'a> FormatPropertiesBuilder<'a> { linear_tiling_features( mut self, linear_tiling_features: FormatFeatureFlags, ) -> FormatPropertiesBuilder<'a>2337 pub fn linear_tiling_features( 2338 mut self, 2339 linear_tiling_features: FormatFeatureFlags, 2340 ) -> FormatPropertiesBuilder<'a> { 2341 self.inner.linear_tiling_features = linear_tiling_features; 2342 self 2343 } optimal_tiling_features( mut self, optimal_tiling_features: FormatFeatureFlags, ) -> FormatPropertiesBuilder<'a>2344 pub fn optimal_tiling_features( 2345 mut self, 2346 optimal_tiling_features: FormatFeatureFlags, 2347 ) -> FormatPropertiesBuilder<'a> { 2348 self.inner.optimal_tiling_features = optimal_tiling_features; 2349 self 2350 } buffer_features( mut self, buffer_features: FormatFeatureFlags, ) -> FormatPropertiesBuilder<'a>2351 pub fn buffer_features( 2352 mut self, 2353 buffer_features: FormatFeatureFlags, 2354 ) -> FormatPropertiesBuilder<'a> { 2355 self.inner.buffer_features = buffer_features; 2356 self 2357 } 2358 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2359 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2360 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> FormatProperties2361 pub fn build(self) -> FormatProperties { 2362 self.inner 2363 } 2364 } 2365 #[repr(C)] 2366 #[derive(Copy, Clone, Default, Debug)] 2367 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageFormatProperties.html>"] 2368 pub struct ImageFormatProperties { 2369 pub max_extent: Extent3D, 2370 pub max_mip_levels: u32, 2371 pub max_array_layers: u32, 2372 pub sample_counts: SampleCountFlags, 2373 pub max_resource_size: DeviceSize, 2374 } 2375 impl ImageFormatProperties { builder<'a>() -> ImageFormatPropertiesBuilder<'a>2376 pub fn builder<'a>() -> ImageFormatPropertiesBuilder<'a> { 2377 ImageFormatPropertiesBuilder { 2378 inner: ImageFormatProperties::default(), 2379 marker: ::std::marker::PhantomData, 2380 } 2381 } 2382 } 2383 #[repr(transparent)] 2384 pub struct ImageFormatPropertiesBuilder<'a> { 2385 inner: ImageFormatProperties, 2386 marker: ::std::marker::PhantomData<&'a ()>, 2387 } 2388 impl<'a> ::std::ops::Deref for ImageFormatPropertiesBuilder<'a> { 2389 type Target = ImageFormatProperties; deref(&self) -> &Self::Target2390 fn deref(&self) -> &Self::Target { 2391 &self.inner 2392 } 2393 } 2394 impl<'a> ::std::ops::DerefMut for ImageFormatPropertiesBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2395 fn deref_mut(&mut self) -> &mut Self::Target { 2396 &mut self.inner 2397 } 2398 } 2399 impl<'a> ImageFormatPropertiesBuilder<'a> { max_extent(mut self, max_extent: Extent3D) -> ImageFormatPropertiesBuilder<'a>2400 pub fn max_extent(mut self, max_extent: Extent3D) -> ImageFormatPropertiesBuilder<'a> { 2401 self.inner.max_extent = max_extent; 2402 self 2403 } max_mip_levels(mut self, max_mip_levels: u32) -> ImageFormatPropertiesBuilder<'a>2404 pub fn max_mip_levels(mut self, max_mip_levels: u32) -> ImageFormatPropertiesBuilder<'a> { 2405 self.inner.max_mip_levels = max_mip_levels; 2406 self 2407 } max_array_layers(mut self, max_array_layers: u32) -> ImageFormatPropertiesBuilder<'a>2408 pub fn max_array_layers(mut self, max_array_layers: u32) -> ImageFormatPropertiesBuilder<'a> { 2409 self.inner.max_array_layers = max_array_layers; 2410 self 2411 } sample_counts( mut self, sample_counts: SampleCountFlags, ) -> ImageFormatPropertiesBuilder<'a>2412 pub fn sample_counts( 2413 mut self, 2414 sample_counts: SampleCountFlags, 2415 ) -> ImageFormatPropertiesBuilder<'a> { 2416 self.inner.sample_counts = sample_counts; 2417 self 2418 } max_resource_size( mut self, max_resource_size: DeviceSize, ) -> ImageFormatPropertiesBuilder<'a>2419 pub fn max_resource_size( 2420 mut self, 2421 max_resource_size: DeviceSize, 2422 ) -> ImageFormatPropertiesBuilder<'a> { 2423 self.inner.max_resource_size = max_resource_size; 2424 self 2425 } 2426 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2427 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2428 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageFormatProperties2429 pub fn build(self) -> ImageFormatProperties { 2430 self.inner 2431 } 2432 } 2433 #[repr(C)] 2434 #[derive(Copy, Clone, Default, Debug)] 2435 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorBufferInfo.html>"] 2436 pub struct DescriptorBufferInfo { 2437 pub buffer: Buffer, 2438 pub offset: DeviceSize, 2439 pub range: DeviceSize, 2440 } 2441 impl DescriptorBufferInfo { builder<'a>() -> DescriptorBufferInfoBuilder<'a>2442 pub fn builder<'a>() -> DescriptorBufferInfoBuilder<'a> { 2443 DescriptorBufferInfoBuilder { 2444 inner: DescriptorBufferInfo::default(), 2445 marker: ::std::marker::PhantomData, 2446 } 2447 } 2448 } 2449 #[repr(transparent)] 2450 pub struct DescriptorBufferInfoBuilder<'a> { 2451 inner: DescriptorBufferInfo, 2452 marker: ::std::marker::PhantomData<&'a ()>, 2453 } 2454 impl<'a> ::std::ops::Deref for DescriptorBufferInfoBuilder<'a> { 2455 type Target = DescriptorBufferInfo; deref(&self) -> &Self::Target2456 fn deref(&self) -> &Self::Target { 2457 &self.inner 2458 } 2459 } 2460 impl<'a> ::std::ops::DerefMut for DescriptorBufferInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2461 fn deref_mut(&mut self) -> &mut Self::Target { 2462 &mut self.inner 2463 } 2464 } 2465 impl<'a> DescriptorBufferInfoBuilder<'a> { buffer(mut self, buffer: Buffer) -> DescriptorBufferInfoBuilder<'a>2466 pub fn buffer(mut self, buffer: Buffer) -> DescriptorBufferInfoBuilder<'a> { 2467 self.inner.buffer = buffer; 2468 self 2469 } offset(mut self, offset: DeviceSize) -> DescriptorBufferInfoBuilder<'a>2470 pub fn offset(mut self, offset: DeviceSize) -> DescriptorBufferInfoBuilder<'a> { 2471 self.inner.offset = offset; 2472 self 2473 } range(mut self, range: DeviceSize) -> DescriptorBufferInfoBuilder<'a>2474 pub fn range(mut self, range: DeviceSize) -> DescriptorBufferInfoBuilder<'a> { 2475 self.inner.range = range; 2476 self 2477 } 2478 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2479 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2480 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> DescriptorBufferInfo2481 pub fn build(self) -> DescriptorBufferInfo { 2482 self.inner 2483 } 2484 } 2485 #[repr(C)] 2486 #[derive(Copy, Clone, Default, Debug)] 2487 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorImageInfo.html>"] 2488 pub struct DescriptorImageInfo { 2489 pub sampler: Sampler, 2490 pub image_view: ImageView, 2491 pub image_layout: ImageLayout, 2492 } 2493 impl DescriptorImageInfo { builder<'a>() -> DescriptorImageInfoBuilder<'a>2494 pub fn builder<'a>() -> DescriptorImageInfoBuilder<'a> { 2495 DescriptorImageInfoBuilder { 2496 inner: DescriptorImageInfo::default(), 2497 marker: ::std::marker::PhantomData, 2498 } 2499 } 2500 } 2501 #[repr(transparent)] 2502 pub struct DescriptorImageInfoBuilder<'a> { 2503 inner: DescriptorImageInfo, 2504 marker: ::std::marker::PhantomData<&'a ()>, 2505 } 2506 impl<'a> ::std::ops::Deref for DescriptorImageInfoBuilder<'a> { 2507 type Target = DescriptorImageInfo; deref(&self) -> &Self::Target2508 fn deref(&self) -> &Self::Target { 2509 &self.inner 2510 } 2511 } 2512 impl<'a> ::std::ops::DerefMut for DescriptorImageInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2513 fn deref_mut(&mut self) -> &mut Self::Target { 2514 &mut self.inner 2515 } 2516 } 2517 impl<'a> DescriptorImageInfoBuilder<'a> { sampler(mut self, sampler: Sampler) -> DescriptorImageInfoBuilder<'a>2518 pub fn sampler(mut self, sampler: Sampler) -> DescriptorImageInfoBuilder<'a> { 2519 self.inner.sampler = sampler; 2520 self 2521 } image_view(mut self, image_view: ImageView) -> DescriptorImageInfoBuilder<'a>2522 pub fn image_view(mut self, image_view: ImageView) -> DescriptorImageInfoBuilder<'a> { 2523 self.inner.image_view = image_view; 2524 self 2525 } image_layout(mut self, image_layout: ImageLayout) -> DescriptorImageInfoBuilder<'a>2526 pub fn image_layout(mut self, image_layout: ImageLayout) -> DescriptorImageInfoBuilder<'a> { 2527 self.inner.image_layout = image_layout; 2528 self 2529 } 2530 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2531 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2532 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> DescriptorImageInfo2533 pub fn build(self) -> DescriptorImageInfo { 2534 self.inner 2535 } 2536 } 2537 #[repr(C)] 2538 #[derive(Copy, Clone, Debug)] 2539 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkWriteDescriptorSet.html>"] 2540 pub struct WriteDescriptorSet { 2541 pub s_type: StructureType, 2542 pub p_next: *const c_void, 2543 pub dst_set: DescriptorSet, 2544 pub dst_binding: u32, 2545 pub dst_array_element: u32, 2546 pub descriptor_count: u32, 2547 pub descriptor_type: DescriptorType, 2548 pub p_image_info: *const DescriptorImageInfo, 2549 pub p_buffer_info: *const DescriptorBufferInfo, 2550 pub p_texel_buffer_view: *const BufferView, 2551 } 2552 impl ::std::default::Default for WriteDescriptorSet { default() -> WriteDescriptorSet2553 fn default() -> WriteDescriptorSet { 2554 WriteDescriptorSet { 2555 s_type: StructureType::WRITE_DESCRIPTOR_SET, 2556 p_next: ::std::ptr::null(), 2557 dst_set: DescriptorSet::default(), 2558 dst_binding: u32::default(), 2559 dst_array_element: u32::default(), 2560 descriptor_count: u32::default(), 2561 descriptor_type: DescriptorType::default(), 2562 p_image_info: ::std::ptr::null(), 2563 p_buffer_info: ::std::ptr::null(), 2564 p_texel_buffer_view: ::std::ptr::null(), 2565 } 2566 } 2567 } 2568 impl WriteDescriptorSet { builder<'a>() -> WriteDescriptorSetBuilder<'a>2569 pub fn builder<'a>() -> WriteDescriptorSetBuilder<'a> { 2570 WriteDescriptorSetBuilder { 2571 inner: WriteDescriptorSet::default(), 2572 marker: ::std::marker::PhantomData, 2573 } 2574 } 2575 } 2576 #[repr(transparent)] 2577 pub struct WriteDescriptorSetBuilder<'a> { 2578 inner: WriteDescriptorSet, 2579 marker: ::std::marker::PhantomData<&'a ()>, 2580 } 2581 pub unsafe trait ExtendsWriteDescriptorSet {} 2582 impl<'a> ::std::ops::Deref for WriteDescriptorSetBuilder<'a> { 2583 type Target = WriteDescriptorSet; deref(&self) -> &Self::Target2584 fn deref(&self) -> &Self::Target { 2585 &self.inner 2586 } 2587 } 2588 impl<'a> ::std::ops::DerefMut for WriteDescriptorSetBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2589 fn deref_mut(&mut self) -> &mut Self::Target { 2590 &mut self.inner 2591 } 2592 } 2593 impl<'a> WriteDescriptorSetBuilder<'a> { dst_set(mut self, dst_set: DescriptorSet) -> WriteDescriptorSetBuilder<'a>2594 pub fn dst_set(mut self, dst_set: DescriptorSet) -> WriteDescriptorSetBuilder<'a> { 2595 self.inner.dst_set = dst_set; 2596 self 2597 } dst_binding(mut self, dst_binding: u32) -> WriteDescriptorSetBuilder<'a>2598 pub fn dst_binding(mut self, dst_binding: u32) -> WriteDescriptorSetBuilder<'a> { 2599 self.inner.dst_binding = dst_binding; 2600 self 2601 } dst_array_element(mut self, dst_array_element: u32) -> WriteDescriptorSetBuilder<'a>2602 pub fn dst_array_element(mut self, dst_array_element: u32) -> WriteDescriptorSetBuilder<'a> { 2603 self.inner.dst_array_element = dst_array_element; 2604 self 2605 } descriptor_type( mut self, descriptor_type: DescriptorType, ) -> WriteDescriptorSetBuilder<'a>2606 pub fn descriptor_type( 2607 mut self, 2608 descriptor_type: DescriptorType, 2609 ) -> WriteDescriptorSetBuilder<'a> { 2610 self.inner.descriptor_type = descriptor_type; 2611 self 2612 } image_info( mut self, image_info: &'a [DescriptorImageInfo], ) -> WriteDescriptorSetBuilder<'a>2613 pub fn image_info( 2614 mut self, 2615 image_info: &'a [DescriptorImageInfo], 2616 ) -> WriteDescriptorSetBuilder<'a> { 2617 self.inner.descriptor_count = image_info.len() as _; 2618 self.inner.p_image_info = image_info.as_ptr(); 2619 self 2620 } buffer_info( mut self, buffer_info: &'a [DescriptorBufferInfo], ) -> WriteDescriptorSetBuilder<'a>2621 pub fn buffer_info( 2622 mut self, 2623 buffer_info: &'a [DescriptorBufferInfo], 2624 ) -> WriteDescriptorSetBuilder<'a> { 2625 self.inner.descriptor_count = buffer_info.len() as _; 2626 self.inner.p_buffer_info = buffer_info.as_ptr(); 2627 self 2628 } texel_buffer_view( mut self, texel_buffer_view: &'a [BufferView], ) -> WriteDescriptorSetBuilder<'a>2629 pub fn texel_buffer_view( 2630 mut self, 2631 texel_buffer_view: &'a [BufferView], 2632 ) -> WriteDescriptorSetBuilder<'a> { 2633 self.inner.descriptor_count = texel_buffer_view.len() as _; 2634 self.inner.p_texel_buffer_view = texel_buffer_view.as_ptr(); 2635 self 2636 } 2637 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 2638 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 2639 #[doc = r" valid extension structs can be pushed into the chain."] 2640 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 2641 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsWriteDescriptorSet>( mut self, next: &'a mut T, ) -> WriteDescriptorSetBuilder<'a>2642 pub fn push_next<T: ExtendsWriteDescriptorSet>( 2643 mut self, 2644 next: &'a mut T, 2645 ) -> WriteDescriptorSetBuilder<'a> { 2646 unsafe { 2647 let next_ptr = next as *mut T as *mut BaseOutStructure; 2648 let last_next = ptr_chain_iter(next).last().unwrap(); 2649 (*last_next).p_next = self.inner.p_next as _; 2650 self.inner.p_next = next_ptr as _; 2651 } 2652 self 2653 } 2654 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2655 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2656 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> WriteDescriptorSet2657 pub fn build(self) -> WriteDescriptorSet { 2658 self.inner 2659 } 2660 } 2661 #[repr(C)] 2662 #[derive(Copy, Clone, Debug)] 2663 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCopyDescriptorSet.html>"] 2664 pub struct CopyDescriptorSet { 2665 pub s_type: StructureType, 2666 pub p_next: *const c_void, 2667 pub src_set: DescriptorSet, 2668 pub src_binding: u32, 2669 pub src_array_element: u32, 2670 pub dst_set: DescriptorSet, 2671 pub dst_binding: u32, 2672 pub dst_array_element: u32, 2673 pub descriptor_count: u32, 2674 } 2675 impl ::std::default::Default for CopyDescriptorSet { default() -> CopyDescriptorSet2676 fn default() -> CopyDescriptorSet { 2677 CopyDescriptorSet { 2678 s_type: StructureType::COPY_DESCRIPTOR_SET, 2679 p_next: ::std::ptr::null(), 2680 src_set: DescriptorSet::default(), 2681 src_binding: u32::default(), 2682 src_array_element: u32::default(), 2683 dst_set: DescriptorSet::default(), 2684 dst_binding: u32::default(), 2685 dst_array_element: u32::default(), 2686 descriptor_count: u32::default(), 2687 } 2688 } 2689 } 2690 impl CopyDescriptorSet { builder<'a>() -> CopyDescriptorSetBuilder<'a>2691 pub fn builder<'a>() -> CopyDescriptorSetBuilder<'a> { 2692 CopyDescriptorSetBuilder { 2693 inner: CopyDescriptorSet::default(), 2694 marker: ::std::marker::PhantomData, 2695 } 2696 } 2697 } 2698 #[repr(transparent)] 2699 pub struct CopyDescriptorSetBuilder<'a> { 2700 inner: CopyDescriptorSet, 2701 marker: ::std::marker::PhantomData<&'a ()>, 2702 } 2703 pub unsafe trait ExtendsCopyDescriptorSet {} 2704 impl<'a> ::std::ops::Deref for CopyDescriptorSetBuilder<'a> { 2705 type Target = CopyDescriptorSet; deref(&self) -> &Self::Target2706 fn deref(&self) -> &Self::Target { 2707 &self.inner 2708 } 2709 } 2710 impl<'a> ::std::ops::DerefMut for CopyDescriptorSetBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2711 fn deref_mut(&mut self) -> &mut Self::Target { 2712 &mut self.inner 2713 } 2714 } 2715 impl<'a> CopyDescriptorSetBuilder<'a> { src_set(mut self, src_set: DescriptorSet) -> CopyDescriptorSetBuilder<'a>2716 pub fn src_set(mut self, src_set: DescriptorSet) -> CopyDescriptorSetBuilder<'a> { 2717 self.inner.src_set = src_set; 2718 self 2719 } src_binding(mut self, src_binding: u32) -> CopyDescriptorSetBuilder<'a>2720 pub fn src_binding(mut self, src_binding: u32) -> CopyDescriptorSetBuilder<'a> { 2721 self.inner.src_binding = src_binding; 2722 self 2723 } src_array_element(mut self, src_array_element: u32) -> CopyDescriptorSetBuilder<'a>2724 pub fn src_array_element(mut self, src_array_element: u32) -> CopyDescriptorSetBuilder<'a> { 2725 self.inner.src_array_element = src_array_element; 2726 self 2727 } dst_set(mut self, dst_set: DescriptorSet) -> CopyDescriptorSetBuilder<'a>2728 pub fn dst_set(mut self, dst_set: DescriptorSet) -> CopyDescriptorSetBuilder<'a> { 2729 self.inner.dst_set = dst_set; 2730 self 2731 } dst_binding(mut self, dst_binding: u32) -> CopyDescriptorSetBuilder<'a>2732 pub fn dst_binding(mut self, dst_binding: u32) -> CopyDescriptorSetBuilder<'a> { 2733 self.inner.dst_binding = dst_binding; 2734 self 2735 } dst_array_element(mut self, dst_array_element: u32) -> CopyDescriptorSetBuilder<'a>2736 pub fn dst_array_element(mut self, dst_array_element: u32) -> CopyDescriptorSetBuilder<'a> { 2737 self.inner.dst_array_element = dst_array_element; 2738 self 2739 } descriptor_count(mut self, descriptor_count: u32) -> CopyDescriptorSetBuilder<'a>2740 pub fn descriptor_count(mut self, descriptor_count: u32) -> CopyDescriptorSetBuilder<'a> { 2741 self.inner.descriptor_count = descriptor_count; 2742 self 2743 } 2744 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 2745 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 2746 #[doc = r" valid extension structs can be pushed into the chain."] 2747 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 2748 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsCopyDescriptorSet>( mut self, next: &'a mut T, ) -> CopyDescriptorSetBuilder<'a>2749 pub fn push_next<T: ExtendsCopyDescriptorSet>( 2750 mut self, 2751 next: &'a mut T, 2752 ) -> CopyDescriptorSetBuilder<'a> { 2753 unsafe { 2754 let next_ptr = next as *mut T as *mut BaseOutStructure; 2755 let last_next = ptr_chain_iter(next).last().unwrap(); 2756 (*last_next).p_next = self.inner.p_next as _; 2757 self.inner.p_next = next_ptr as _; 2758 } 2759 self 2760 } 2761 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2762 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2763 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> CopyDescriptorSet2764 pub fn build(self) -> CopyDescriptorSet { 2765 self.inner 2766 } 2767 } 2768 #[repr(C)] 2769 #[derive(Copy, Clone, Debug)] 2770 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferCreateInfo.html>"] 2771 pub struct BufferCreateInfo { 2772 pub s_type: StructureType, 2773 pub p_next: *const c_void, 2774 pub flags: BufferCreateFlags, 2775 pub size: DeviceSize, 2776 pub usage: BufferUsageFlags, 2777 pub sharing_mode: SharingMode, 2778 pub queue_family_index_count: u32, 2779 pub p_queue_family_indices: *const u32, 2780 } 2781 impl ::std::default::Default for BufferCreateInfo { default() -> BufferCreateInfo2782 fn default() -> BufferCreateInfo { 2783 BufferCreateInfo { 2784 s_type: StructureType::BUFFER_CREATE_INFO, 2785 p_next: ::std::ptr::null(), 2786 flags: BufferCreateFlags::default(), 2787 size: DeviceSize::default(), 2788 usage: BufferUsageFlags::default(), 2789 sharing_mode: SharingMode::default(), 2790 queue_family_index_count: u32::default(), 2791 p_queue_family_indices: ::std::ptr::null(), 2792 } 2793 } 2794 } 2795 impl BufferCreateInfo { builder<'a>() -> BufferCreateInfoBuilder<'a>2796 pub fn builder<'a>() -> BufferCreateInfoBuilder<'a> { 2797 BufferCreateInfoBuilder { 2798 inner: BufferCreateInfo::default(), 2799 marker: ::std::marker::PhantomData, 2800 } 2801 } 2802 } 2803 #[repr(transparent)] 2804 pub struct BufferCreateInfoBuilder<'a> { 2805 inner: BufferCreateInfo, 2806 marker: ::std::marker::PhantomData<&'a ()>, 2807 } 2808 pub unsafe trait ExtendsBufferCreateInfo {} 2809 impl<'a> ::std::ops::Deref for BufferCreateInfoBuilder<'a> { 2810 type Target = BufferCreateInfo; deref(&self) -> &Self::Target2811 fn deref(&self) -> &Self::Target { 2812 &self.inner 2813 } 2814 } 2815 impl<'a> ::std::ops::DerefMut for BufferCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2816 fn deref_mut(&mut self) -> &mut Self::Target { 2817 &mut self.inner 2818 } 2819 } 2820 impl<'a> BufferCreateInfoBuilder<'a> { flags(mut self, flags: BufferCreateFlags) -> BufferCreateInfoBuilder<'a>2821 pub fn flags(mut self, flags: BufferCreateFlags) -> BufferCreateInfoBuilder<'a> { 2822 self.inner.flags = flags; 2823 self 2824 } size(mut self, size: DeviceSize) -> BufferCreateInfoBuilder<'a>2825 pub fn size(mut self, size: DeviceSize) -> BufferCreateInfoBuilder<'a> { 2826 self.inner.size = size; 2827 self 2828 } usage(mut self, usage: BufferUsageFlags) -> BufferCreateInfoBuilder<'a>2829 pub fn usage(mut self, usage: BufferUsageFlags) -> BufferCreateInfoBuilder<'a> { 2830 self.inner.usage = usage; 2831 self 2832 } sharing_mode(mut self, sharing_mode: SharingMode) -> BufferCreateInfoBuilder<'a>2833 pub fn sharing_mode(mut self, sharing_mode: SharingMode) -> BufferCreateInfoBuilder<'a> { 2834 self.inner.sharing_mode = sharing_mode; 2835 self 2836 } queue_family_indices( mut self, queue_family_indices: &'a [u32], ) -> BufferCreateInfoBuilder<'a>2837 pub fn queue_family_indices( 2838 mut self, 2839 queue_family_indices: &'a [u32], 2840 ) -> BufferCreateInfoBuilder<'a> { 2841 self.inner.queue_family_index_count = queue_family_indices.len() as _; 2842 self.inner.p_queue_family_indices = queue_family_indices.as_ptr(); 2843 self 2844 } 2845 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 2846 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 2847 #[doc = r" valid extension structs can be pushed into the chain."] 2848 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 2849 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsBufferCreateInfo>( mut self, next: &'a mut T, ) -> BufferCreateInfoBuilder<'a>2850 pub fn push_next<T: ExtendsBufferCreateInfo>( 2851 mut self, 2852 next: &'a mut T, 2853 ) -> BufferCreateInfoBuilder<'a> { 2854 unsafe { 2855 let next_ptr = next as *mut T as *mut BaseOutStructure; 2856 let last_next = ptr_chain_iter(next).last().unwrap(); 2857 (*last_next).p_next = self.inner.p_next as _; 2858 self.inner.p_next = next_ptr as _; 2859 } 2860 self 2861 } 2862 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2863 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2864 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> BufferCreateInfo2865 pub fn build(self) -> BufferCreateInfo { 2866 self.inner 2867 } 2868 } 2869 #[repr(C)] 2870 #[derive(Copy, Clone, Debug)] 2871 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferViewCreateInfo.html>"] 2872 pub struct BufferViewCreateInfo { 2873 pub s_type: StructureType, 2874 pub p_next: *const c_void, 2875 pub flags: BufferViewCreateFlags, 2876 pub buffer: Buffer, 2877 pub format: Format, 2878 pub offset: DeviceSize, 2879 pub range: DeviceSize, 2880 } 2881 impl ::std::default::Default for BufferViewCreateInfo { default() -> BufferViewCreateInfo2882 fn default() -> BufferViewCreateInfo { 2883 BufferViewCreateInfo { 2884 s_type: StructureType::BUFFER_VIEW_CREATE_INFO, 2885 p_next: ::std::ptr::null(), 2886 flags: BufferViewCreateFlags::default(), 2887 buffer: Buffer::default(), 2888 format: Format::default(), 2889 offset: DeviceSize::default(), 2890 range: DeviceSize::default(), 2891 } 2892 } 2893 } 2894 impl BufferViewCreateInfo { builder<'a>() -> BufferViewCreateInfoBuilder<'a>2895 pub fn builder<'a>() -> BufferViewCreateInfoBuilder<'a> { 2896 BufferViewCreateInfoBuilder { 2897 inner: BufferViewCreateInfo::default(), 2898 marker: ::std::marker::PhantomData, 2899 } 2900 } 2901 } 2902 #[repr(transparent)] 2903 pub struct BufferViewCreateInfoBuilder<'a> { 2904 inner: BufferViewCreateInfo, 2905 marker: ::std::marker::PhantomData<&'a ()>, 2906 } 2907 pub unsafe trait ExtendsBufferViewCreateInfo {} 2908 impl<'a> ::std::ops::Deref for BufferViewCreateInfoBuilder<'a> { 2909 type Target = BufferViewCreateInfo; deref(&self) -> &Self::Target2910 fn deref(&self) -> &Self::Target { 2911 &self.inner 2912 } 2913 } 2914 impl<'a> ::std::ops::DerefMut for BufferViewCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2915 fn deref_mut(&mut self) -> &mut Self::Target { 2916 &mut self.inner 2917 } 2918 } 2919 impl<'a> BufferViewCreateInfoBuilder<'a> { flags(mut self, flags: BufferViewCreateFlags) -> BufferViewCreateInfoBuilder<'a>2920 pub fn flags(mut self, flags: BufferViewCreateFlags) -> BufferViewCreateInfoBuilder<'a> { 2921 self.inner.flags = flags; 2922 self 2923 } buffer(mut self, buffer: Buffer) -> BufferViewCreateInfoBuilder<'a>2924 pub fn buffer(mut self, buffer: Buffer) -> BufferViewCreateInfoBuilder<'a> { 2925 self.inner.buffer = buffer; 2926 self 2927 } format(mut self, format: Format) -> BufferViewCreateInfoBuilder<'a>2928 pub fn format(mut self, format: Format) -> BufferViewCreateInfoBuilder<'a> { 2929 self.inner.format = format; 2930 self 2931 } offset(mut self, offset: DeviceSize) -> BufferViewCreateInfoBuilder<'a>2932 pub fn offset(mut self, offset: DeviceSize) -> BufferViewCreateInfoBuilder<'a> { 2933 self.inner.offset = offset; 2934 self 2935 } range(mut self, range: DeviceSize) -> BufferViewCreateInfoBuilder<'a>2936 pub fn range(mut self, range: DeviceSize) -> BufferViewCreateInfoBuilder<'a> { 2937 self.inner.range = range; 2938 self 2939 } 2940 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 2941 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 2942 #[doc = r" valid extension structs can be pushed into the chain."] 2943 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 2944 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsBufferViewCreateInfo>( mut self, next: &'a mut T, ) -> BufferViewCreateInfoBuilder<'a>2945 pub fn push_next<T: ExtendsBufferViewCreateInfo>( 2946 mut self, 2947 next: &'a mut T, 2948 ) -> BufferViewCreateInfoBuilder<'a> { 2949 unsafe { 2950 let next_ptr = next as *mut T as *mut BaseOutStructure; 2951 let last_next = ptr_chain_iter(next).last().unwrap(); 2952 (*last_next).p_next = self.inner.p_next as _; 2953 self.inner.p_next = next_ptr as _; 2954 } 2955 self 2956 } 2957 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 2958 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 2959 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> BufferViewCreateInfo2960 pub fn build(self) -> BufferViewCreateInfo { 2961 self.inner 2962 } 2963 } 2964 #[repr(C)] 2965 #[derive(Copy, Clone, Default, Debug)] 2966 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageSubresource.html>"] 2967 pub struct ImageSubresource { 2968 pub aspect_mask: ImageAspectFlags, 2969 pub mip_level: u32, 2970 pub array_layer: u32, 2971 } 2972 impl ImageSubresource { builder<'a>() -> ImageSubresourceBuilder<'a>2973 pub fn builder<'a>() -> ImageSubresourceBuilder<'a> { 2974 ImageSubresourceBuilder { 2975 inner: ImageSubresource::default(), 2976 marker: ::std::marker::PhantomData, 2977 } 2978 } 2979 } 2980 #[repr(transparent)] 2981 pub struct ImageSubresourceBuilder<'a> { 2982 inner: ImageSubresource, 2983 marker: ::std::marker::PhantomData<&'a ()>, 2984 } 2985 impl<'a> ::std::ops::Deref for ImageSubresourceBuilder<'a> { 2986 type Target = ImageSubresource; deref(&self) -> &Self::Target2987 fn deref(&self) -> &Self::Target { 2988 &self.inner 2989 } 2990 } 2991 impl<'a> ::std::ops::DerefMut for ImageSubresourceBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target2992 fn deref_mut(&mut self) -> &mut Self::Target { 2993 &mut self.inner 2994 } 2995 } 2996 impl<'a> ImageSubresourceBuilder<'a> { aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> ImageSubresourceBuilder<'a>2997 pub fn aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> ImageSubresourceBuilder<'a> { 2998 self.inner.aspect_mask = aspect_mask; 2999 self 3000 } mip_level(mut self, mip_level: u32) -> ImageSubresourceBuilder<'a>3001 pub fn mip_level(mut self, mip_level: u32) -> ImageSubresourceBuilder<'a> { 3002 self.inner.mip_level = mip_level; 3003 self 3004 } array_layer(mut self, array_layer: u32) -> ImageSubresourceBuilder<'a>3005 pub fn array_layer(mut self, array_layer: u32) -> ImageSubresourceBuilder<'a> { 3006 self.inner.array_layer = array_layer; 3007 self 3008 } 3009 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3010 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3011 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageSubresource3012 pub fn build(self) -> ImageSubresource { 3013 self.inner 3014 } 3015 } 3016 #[repr(C)] 3017 #[derive(Copy, Clone, Default, Debug)] 3018 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageSubresourceLayers.html>"] 3019 pub struct ImageSubresourceLayers { 3020 pub aspect_mask: ImageAspectFlags, 3021 pub mip_level: u32, 3022 pub base_array_layer: u32, 3023 pub layer_count: u32, 3024 } 3025 impl ImageSubresourceLayers { builder<'a>() -> ImageSubresourceLayersBuilder<'a>3026 pub fn builder<'a>() -> ImageSubresourceLayersBuilder<'a> { 3027 ImageSubresourceLayersBuilder { 3028 inner: ImageSubresourceLayers::default(), 3029 marker: ::std::marker::PhantomData, 3030 } 3031 } 3032 } 3033 #[repr(transparent)] 3034 pub struct ImageSubresourceLayersBuilder<'a> { 3035 inner: ImageSubresourceLayers, 3036 marker: ::std::marker::PhantomData<&'a ()>, 3037 } 3038 impl<'a> ::std::ops::Deref for ImageSubresourceLayersBuilder<'a> { 3039 type Target = ImageSubresourceLayers; deref(&self) -> &Self::Target3040 fn deref(&self) -> &Self::Target { 3041 &self.inner 3042 } 3043 } 3044 impl<'a> ::std::ops::DerefMut for ImageSubresourceLayersBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3045 fn deref_mut(&mut self) -> &mut Self::Target { 3046 &mut self.inner 3047 } 3048 } 3049 impl<'a> ImageSubresourceLayersBuilder<'a> { aspect_mask( mut self, aspect_mask: ImageAspectFlags, ) -> ImageSubresourceLayersBuilder<'a>3050 pub fn aspect_mask( 3051 mut self, 3052 aspect_mask: ImageAspectFlags, 3053 ) -> ImageSubresourceLayersBuilder<'a> { 3054 self.inner.aspect_mask = aspect_mask; 3055 self 3056 } mip_level(mut self, mip_level: u32) -> ImageSubresourceLayersBuilder<'a>3057 pub fn mip_level(mut self, mip_level: u32) -> ImageSubresourceLayersBuilder<'a> { 3058 self.inner.mip_level = mip_level; 3059 self 3060 } base_array_layer(mut self, base_array_layer: u32) -> ImageSubresourceLayersBuilder<'a>3061 pub fn base_array_layer(mut self, base_array_layer: u32) -> ImageSubresourceLayersBuilder<'a> { 3062 self.inner.base_array_layer = base_array_layer; 3063 self 3064 } layer_count(mut self, layer_count: u32) -> ImageSubresourceLayersBuilder<'a>3065 pub fn layer_count(mut self, layer_count: u32) -> ImageSubresourceLayersBuilder<'a> { 3066 self.inner.layer_count = layer_count; 3067 self 3068 } 3069 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3070 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3071 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageSubresourceLayers3072 pub fn build(self) -> ImageSubresourceLayers { 3073 self.inner 3074 } 3075 } 3076 #[repr(C)] 3077 #[derive(Copy, Clone, Default, Debug)] 3078 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageSubresourceRange.html>"] 3079 pub struct ImageSubresourceRange { 3080 pub aspect_mask: ImageAspectFlags, 3081 pub base_mip_level: u32, 3082 pub level_count: u32, 3083 pub base_array_layer: u32, 3084 pub layer_count: u32, 3085 } 3086 impl ImageSubresourceRange { builder<'a>() -> ImageSubresourceRangeBuilder<'a>3087 pub fn builder<'a>() -> ImageSubresourceRangeBuilder<'a> { 3088 ImageSubresourceRangeBuilder { 3089 inner: ImageSubresourceRange::default(), 3090 marker: ::std::marker::PhantomData, 3091 } 3092 } 3093 } 3094 #[repr(transparent)] 3095 pub struct ImageSubresourceRangeBuilder<'a> { 3096 inner: ImageSubresourceRange, 3097 marker: ::std::marker::PhantomData<&'a ()>, 3098 } 3099 impl<'a> ::std::ops::Deref for ImageSubresourceRangeBuilder<'a> { 3100 type Target = ImageSubresourceRange; deref(&self) -> &Self::Target3101 fn deref(&self) -> &Self::Target { 3102 &self.inner 3103 } 3104 } 3105 impl<'a> ::std::ops::DerefMut for ImageSubresourceRangeBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3106 fn deref_mut(&mut self) -> &mut Self::Target { 3107 &mut self.inner 3108 } 3109 } 3110 impl<'a> ImageSubresourceRangeBuilder<'a> { aspect_mask( mut self, aspect_mask: ImageAspectFlags, ) -> ImageSubresourceRangeBuilder<'a>3111 pub fn aspect_mask( 3112 mut self, 3113 aspect_mask: ImageAspectFlags, 3114 ) -> ImageSubresourceRangeBuilder<'a> { 3115 self.inner.aspect_mask = aspect_mask; 3116 self 3117 } base_mip_level(mut self, base_mip_level: u32) -> ImageSubresourceRangeBuilder<'a>3118 pub fn base_mip_level(mut self, base_mip_level: u32) -> ImageSubresourceRangeBuilder<'a> { 3119 self.inner.base_mip_level = base_mip_level; 3120 self 3121 } level_count(mut self, level_count: u32) -> ImageSubresourceRangeBuilder<'a>3122 pub fn level_count(mut self, level_count: u32) -> ImageSubresourceRangeBuilder<'a> { 3123 self.inner.level_count = level_count; 3124 self 3125 } base_array_layer(mut self, base_array_layer: u32) -> ImageSubresourceRangeBuilder<'a>3126 pub fn base_array_layer(mut self, base_array_layer: u32) -> ImageSubresourceRangeBuilder<'a> { 3127 self.inner.base_array_layer = base_array_layer; 3128 self 3129 } layer_count(mut self, layer_count: u32) -> ImageSubresourceRangeBuilder<'a>3130 pub fn layer_count(mut self, layer_count: u32) -> ImageSubresourceRangeBuilder<'a> { 3131 self.inner.layer_count = layer_count; 3132 self 3133 } 3134 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3135 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3136 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageSubresourceRange3137 pub fn build(self) -> ImageSubresourceRange { 3138 self.inner 3139 } 3140 } 3141 #[repr(C)] 3142 #[derive(Copy, Clone, Debug)] 3143 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryBarrier.html>"] 3144 pub struct MemoryBarrier { 3145 pub s_type: StructureType, 3146 pub p_next: *const c_void, 3147 pub src_access_mask: AccessFlags, 3148 pub dst_access_mask: AccessFlags, 3149 } 3150 impl ::std::default::Default for MemoryBarrier { default() -> MemoryBarrier3151 fn default() -> MemoryBarrier { 3152 MemoryBarrier { 3153 s_type: StructureType::MEMORY_BARRIER, 3154 p_next: ::std::ptr::null(), 3155 src_access_mask: AccessFlags::default(), 3156 dst_access_mask: AccessFlags::default(), 3157 } 3158 } 3159 } 3160 impl MemoryBarrier { builder<'a>() -> MemoryBarrierBuilder<'a>3161 pub fn builder<'a>() -> MemoryBarrierBuilder<'a> { 3162 MemoryBarrierBuilder { 3163 inner: MemoryBarrier::default(), 3164 marker: ::std::marker::PhantomData, 3165 } 3166 } 3167 } 3168 #[repr(transparent)] 3169 pub struct MemoryBarrierBuilder<'a> { 3170 inner: MemoryBarrier, 3171 marker: ::std::marker::PhantomData<&'a ()>, 3172 } 3173 pub unsafe trait ExtendsMemoryBarrier {} 3174 impl<'a> ::std::ops::Deref for MemoryBarrierBuilder<'a> { 3175 type Target = MemoryBarrier; deref(&self) -> &Self::Target3176 fn deref(&self) -> &Self::Target { 3177 &self.inner 3178 } 3179 } 3180 impl<'a> ::std::ops::DerefMut for MemoryBarrierBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3181 fn deref_mut(&mut self) -> &mut Self::Target { 3182 &mut self.inner 3183 } 3184 } 3185 impl<'a> MemoryBarrierBuilder<'a> { src_access_mask(mut self, src_access_mask: AccessFlags) -> MemoryBarrierBuilder<'a>3186 pub fn src_access_mask(mut self, src_access_mask: AccessFlags) -> MemoryBarrierBuilder<'a> { 3187 self.inner.src_access_mask = src_access_mask; 3188 self 3189 } dst_access_mask(mut self, dst_access_mask: AccessFlags) -> MemoryBarrierBuilder<'a>3190 pub fn dst_access_mask(mut self, dst_access_mask: AccessFlags) -> MemoryBarrierBuilder<'a> { 3191 self.inner.dst_access_mask = dst_access_mask; 3192 self 3193 } 3194 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 3195 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 3196 #[doc = r" valid extension structs can be pushed into the chain."] 3197 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 3198 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsMemoryBarrier>( mut self, next: &'a mut T, ) -> MemoryBarrierBuilder<'a>3199 pub fn push_next<T: ExtendsMemoryBarrier>( 3200 mut self, 3201 next: &'a mut T, 3202 ) -> MemoryBarrierBuilder<'a> { 3203 unsafe { 3204 let next_ptr = next as *mut T as *mut BaseOutStructure; 3205 let last_next = ptr_chain_iter(next).last().unwrap(); 3206 (*last_next).p_next = self.inner.p_next as _; 3207 self.inner.p_next = next_ptr as _; 3208 } 3209 self 3210 } 3211 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3212 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3213 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> MemoryBarrier3214 pub fn build(self) -> MemoryBarrier { 3215 self.inner 3216 } 3217 } 3218 #[repr(C)] 3219 #[derive(Copy, Clone, Debug)] 3220 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferMemoryBarrier.html>"] 3221 pub struct BufferMemoryBarrier { 3222 pub s_type: StructureType, 3223 pub p_next: *const c_void, 3224 pub src_access_mask: AccessFlags, 3225 pub dst_access_mask: AccessFlags, 3226 pub src_queue_family_index: u32, 3227 pub dst_queue_family_index: u32, 3228 pub buffer: Buffer, 3229 pub offset: DeviceSize, 3230 pub size: DeviceSize, 3231 } 3232 impl ::std::default::Default for BufferMemoryBarrier { default() -> BufferMemoryBarrier3233 fn default() -> BufferMemoryBarrier { 3234 BufferMemoryBarrier { 3235 s_type: StructureType::BUFFER_MEMORY_BARRIER, 3236 p_next: ::std::ptr::null(), 3237 src_access_mask: AccessFlags::default(), 3238 dst_access_mask: AccessFlags::default(), 3239 src_queue_family_index: u32::default(), 3240 dst_queue_family_index: u32::default(), 3241 buffer: Buffer::default(), 3242 offset: DeviceSize::default(), 3243 size: DeviceSize::default(), 3244 } 3245 } 3246 } 3247 impl BufferMemoryBarrier { builder<'a>() -> BufferMemoryBarrierBuilder<'a>3248 pub fn builder<'a>() -> BufferMemoryBarrierBuilder<'a> { 3249 BufferMemoryBarrierBuilder { 3250 inner: BufferMemoryBarrier::default(), 3251 marker: ::std::marker::PhantomData, 3252 } 3253 } 3254 } 3255 #[repr(transparent)] 3256 pub struct BufferMemoryBarrierBuilder<'a> { 3257 inner: BufferMemoryBarrier, 3258 marker: ::std::marker::PhantomData<&'a ()>, 3259 } 3260 pub unsafe trait ExtendsBufferMemoryBarrier {} 3261 impl<'a> ::std::ops::Deref for BufferMemoryBarrierBuilder<'a> { 3262 type Target = BufferMemoryBarrier; deref(&self) -> &Self::Target3263 fn deref(&self) -> &Self::Target { 3264 &self.inner 3265 } 3266 } 3267 impl<'a> ::std::ops::DerefMut for BufferMemoryBarrierBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3268 fn deref_mut(&mut self) -> &mut Self::Target { 3269 &mut self.inner 3270 } 3271 } 3272 impl<'a> BufferMemoryBarrierBuilder<'a> { src_access_mask( mut self, src_access_mask: AccessFlags, ) -> BufferMemoryBarrierBuilder<'a>3273 pub fn src_access_mask( 3274 mut self, 3275 src_access_mask: AccessFlags, 3276 ) -> BufferMemoryBarrierBuilder<'a> { 3277 self.inner.src_access_mask = src_access_mask; 3278 self 3279 } dst_access_mask( mut self, dst_access_mask: AccessFlags, ) -> BufferMemoryBarrierBuilder<'a>3280 pub fn dst_access_mask( 3281 mut self, 3282 dst_access_mask: AccessFlags, 3283 ) -> BufferMemoryBarrierBuilder<'a> { 3284 self.inner.dst_access_mask = dst_access_mask; 3285 self 3286 } src_queue_family_index( mut self, src_queue_family_index: u32, ) -> BufferMemoryBarrierBuilder<'a>3287 pub fn src_queue_family_index( 3288 mut self, 3289 src_queue_family_index: u32, 3290 ) -> BufferMemoryBarrierBuilder<'a> { 3291 self.inner.src_queue_family_index = src_queue_family_index; 3292 self 3293 } dst_queue_family_index( mut self, dst_queue_family_index: u32, ) -> BufferMemoryBarrierBuilder<'a>3294 pub fn dst_queue_family_index( 3295 mut self, 3296 dst_queue_family_index: u32, 3297 ) -> BufferMemoryBarrierBuilder<'a> { 3298 self.inner.dst_queue_family_index = dst_queue_family_index; 3299 self 3300 } buffer(mut self, buffer: Buffer) -> BufferMemoryBarrierBuilder<'a>3301 pub fn buffer(mut self, buffer: Buffer) -> BufferMemoryBarrierBuilder<'a> { 3302 self.inner.buffer = buffer; 3303 self 3304 } offset(mut self, offset: DeviceSize) -> BufferMemoryBarrierBuilder<'a>3305 pub fn offset(mut self, offset: DeviceSize) -> BufferMemoryBarrierBuilder<'a> { 3306 self.inner.offset = offset; 3307 self 3308 } size(mut self, size: DeviceSize) -> BufferMemoryBarrierBuilder<'a>3309 pub fn size(mut self, size: DeviceSize) -> BufferMemoryBarrierBuilder<'a> { 3310 self.inner.size = size; 3311 self 3312 } 3313 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 3314 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 3315 #[doc = r" valid extension structs can be pushed into the chain."] 3316 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 3317 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsBufferMemoryBarrier>( mut self, next: &'a mut T, ) -> BufferMemoryBarrierBuilder<'a>3318 pub fn push_next<T: ExtendsBufferMemoryBarrier>( 3319 mut self, 3320 next: &'a mut T, 3321 ) -> BufferMemoryBarrierBuilder<'a> { 3322 unsafe { 3323 let next_ptr = next as *mut T as *mut BaseOutStructure; 3324 let last_next = ptr_chain_iter(next).last().unwrap(); 3325 (*last_next).p_next = self.inner.p_next as _; 3326 self.inner.p_next = next_ptr as _; 3327 } 3328 self 3329 } 3330 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3331 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3332 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> BufferMemoryBarrier3333 pub fn build(self) -> BufferMemoryBarrier { 3334 self.inner 3335 } 3336 } 3337 #[repr(C)] 3338 #[derive(Copy, Clone, Debug)] 3339 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageMemoryBarrier.html>"] 3340 pub struct ImageMemoryBarrier { 3341 pub s_type: StructureType, 3342 pub p_next: *const c_void, 3343 pub src_access_mask: AccessFlags, 3344 pub dst_access_mask: AccessFlags, 3345 pub old_layout: ImageLayout, 3346 pub new_layout: ImageLayout, 3347 pub src_queue_family_index: u32, 3348 pub dst_queue_family_index: u32, 3349 pub image: Image, 3350 pub subresource_range: ImageSubresourceRange, 3351 } 3352 impl ::std::default::Default for ImageMemoryBarrier { default() -> ImageMemoryBarrier3353 fn default() -> ImageMemoryBarrier { 3354 ImageMemoryBarrier { 3355 s_type: StructureType::IMAGE_MEMORY_BARRIER, 3356 p_next: ::std::ptr::null(), 3357 src_access_mask: AccessFlags::default(), 3358 dst_access_mask: AccessFlags::default(), 3359 old_layout: ImageLayout::default(), 3360 new_layout: ImageLayout::default(), 3361 src_queue_family_index: u32::default(), 3362 dst_queue_family_index: u32::default(), 3363 image: Image::default(), 3364 subresource_range: ImageSubresourceRange::default(), 3365 } 3366 } 3367 } 3368 impl ImageMemoryBarrier { builder<'a>() -> ImageMemoryBarrierBuilder<'a>3369 pub fn builder<'a>() -> ImageMemoryBarrierBuilder<'a> { 3370 ImageMemoryBarrierBuilder { 3371 inner: ImageMemoryBarrier::default(), 3372 marker: ::std::marker::PhantomData, 3373 } 3374 } 3375 } 3376 #[repr(transparent)] 3377 pub struct ImageMemoryBarrierBuilder<'a> { 3378 inner: ImageMemoryBarrier, 3379 marker: ::std::marker::PhantomData<&'a ()>, 3380 } 3381 pub unsafe trait ExtendsImageMemoryBarrier {} 3382 impl<'a> ::std::ops::Deref for ImageMemoryBarrierBuilder<'a> { 3383 type Target = ImageMemoryBarrier; deref(&self) -> &Self::Target3384 fn deref(&self) -> &Self::Target { 3385 &self.inner 3386 } 3387 } 3388 impl<'a> ::std::ops::DerefMut for ImageMemoryBarrierBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3389 fn deref_mut(&mut self) -> &mut Self::Target { 3390 &mut self.inner 3391 } 3392 } 3393 impl<'a> ImageMemoryBarrierBuilder<'a> { src_access_mask( mut self, src_access_mask: AccessFlags, ) -> ImageMemoryBarrierBuilder<'a>3394 pub fn src_access_mask( 3395 mut self, 3396 src_access_mask: AccessFlags, 3397 ) -> ImageMemoryBarrierBuilder<'a> { 3398 self.inner.src_access_mask = src_access_mask; 3399 self 3400 } dst_access_mask( mut self, dst_access_mask: AccessFlags, ) -> ImageMemoryBarrierBuilder<'a>3401 pub fn dst_access_mask( 3402 mut self, 3403 dst_access_mask: AccessFlags, 3404 ) -> ImageMemoryBarrierBuilder<'a> { 3405 self.inner.dst_access_mask = dst_access_mask; 3406 self 3407 } old_layout(mut self, old_layout: ImageLayout) -> ImageMemoryBarrierBuilder<'a>3408 pub fn old_layout(mut self, old_layout: ImageLayout) -> ImageMemoryBarrierBuilder<'a> { 3409 self.inner.old_layout = old_layout; 3410 self 3411 } new_layout(mut self, new_layout: ImageLayout) -> ImageMemoryBarrierBuilder<'a>3412 pub fn new_layout(mut self, new_layout: ImageLayout) -> ImageMemoryBarrierBuilder<'a> { 3413 self.inner.new_layout = new_layout; 3414 self 3415 } src_queue_family_index( mut self, src_queue_family_index: u32, ) -> ImageMemoryBarrierBuilder<'a>3416 pub fn src_queue_family_index( 3417 mut self, 3418 src_queue_family_index: u32, 3419 ) -> ImageMemoryBarrierBuilder<'a> { 3420 self.inner.src_queue_family_index = src_queue_family_index; 3421 self 3422 } dst_queue_family_index( mut self, dst_queue_family_index: u32, ) -> ImageMemoryBarrierBuilder<'a>3423 pub fn dst_queue_family_index( 3424 mut self, 3425 dst_queue_family_index: u32, 3426 ) -> ImageMemoryBarrierBuilder<'a> { 3427 self.inner.dst_queue_family_index = dst_queue_family_index; 3428 self 3429 } image(mut self, image: Image) -> ImageMemoryBarrierBuilder<'a>3430 pub fn image(mut self, image: Image) -> ImageMemoryBarrierBuilder<'a> { 3431 self.inner.image = image; 3432 self 3433 } subresource_range( mut self, subresource_range: ImageSubresourceRange, ) -> ImageMemoryBarrierBuilder<'a>3434 pub fn subresource_range( 3435 mut self, 3436 subresource_range: ImageSubresourceRange, 3437 ) -> ImageMemoryBarrierBuilder<'a> { 3438 self.inner.subresource_range = subresource_range; 3439 self 3440 } 3441 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 3442 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 3443 #[doc = r" valid extension structs can be pushed into the chain."] 3444 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 3445 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsImageMemoryBarrier>( mut self, next: &'a mut T, ) -> ImageMemoryBarrierBuilder<'a>3446 pub fn push_next<T: ExtendsImageMemoryBarrier>( 3447 mut self, 3448 next: &'a mut T, 3449 ) -> ImageMemoryBarrierBuilder<'a> { 3450 unsafe { 3451 let next_ptr = next as *mut T as *mut BaseOutStructure; 3452 let last_next = ptr_chain_iter(next).last().unwrap(); 3453 (*last_next).p_next = self.inner.p_next as _; 3454 self.inner.p_next = next_ptr as _; 3455 } 3456 self 3457 } 3458 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3459 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3460 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageMemoryBarrier3461 pub fn build(self) -> ImageMemoryBarrier { 3462 self.inner 3463 } 3464 } 3465 #[repr(C)] 3466 #[derive(Copy, Clone, Debug)] 3467 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageCreateInfo.html>"] 3468 pub struct ImageCreateInfo { 3469 pub s_type: StructureType, 3470 pub p_next: *const c_void, 3471 pub flags: ImageCreateFlags, 3472 pub image_type: ImageType, 3473 pub format: Format, 3474 pub extent: Extent3D, 3475 pub mip_levels: u32, 3476 pub array_layers: u32, 3477 pub samples: SampleCountFlags, 3478 pub tiling: ImageTiling, 3479 pub usage: ImageUsageFlags, 3480 pub sharing_mode: SharingMode, 3481 pub queue_family_index_count: u32, 3482 pub p_queue_family_indices: *const u32, 3483 pub initial_layout: ImageLayout, 3484 } 3485 impl ::std::default::Default for ImageCreateInfo { default() -> ImageCreateInfo3486 fn default() -> ImageCreateInfo { 3487 ImageCreateInfo { 3488 s_type: StructureType::IMAGE_CREATE_INFO, 3489 p_next: ::std::ptr::null(), 3490 flags: ImageCreateFlags::default(), 3491 image_type: ImageType::default(), 3492 format: Format::default(), 3493 extent: Extent3D::default(), 3494 mip_levels: u32::default(), 3495 array_layers: u32::default(), 3496 samples: SampleCountFlags::default(), 3497 tiling: ImageTiling::default(), 3498 usage: ImageUsageFlags::default(), 3499 sharing_mode: SharingMode::default(), 3500 queue_family_index_count: u32::default(), 3501 p_queue_family_indices: ::std::ptr::null(), 3502 initial_layout: ImageLayout::default(), 3503 } 3504 } 3505 } 3506 impl ImageCreateInfo { builder<'a>() -> ImageCreateInfoBuilder<'a>3507 pub fn builder<'a>() -> ImageCreateInfoBuilder<'a> { 3508 ImageCreateInfoBuilder { 3509 inner: ImageCreateInfo::default(), 3510 marker: ::std::marker::PhantomData, 3511 } 3512 } 3513 } 3514 #[repr(transparent)] 3515 pub struct ImageCreateInfoBuilder<'a> { 3516 inner: ImageCreateInfo, 3517 marker: ::std::marker::PhantomData<&'a ()>, 3518 } 3519 pub unsafe trait ExtendsImageCreateInfo {} 3520 impl<'a> ::std::ops::Deref for ImageCreateInfoBuilder<'a> { 3521 type Target = ImageCreateInfo; deref(&self) -> &Self::Target3522 fn deref(&self) -> &Self::Target { 3523 &self.inner 3524 } 3525 } 3526 impl<'a> ::std::ops::DerefMut for ImageCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3527 fn deref_mut(&mut self) -> &mut Self::Target { 3528 &mut self.inner 3529 } 3530 } 3531 impl<'a> ImageCreateInfoBuilder<'a> { flags(mut self, flags: ImageCreateFlags) -> ImageCreateInfoBuilder<'a>3532 pub fn flags(mut self, flags: ImageCreateFlags) -> ImageCreateInfoBuilder<'a> { 3533 self.inner.flags = flags; 3534 self 3535 } image_type(mut self, image_type: ImageType) -> ImageCreateInfoBuilder<'a>3536 pub fn image_type(mut self, image_type: ImageType) -> ImageCreateInfoBuilder<'a> { 3537 self.inner.image_type = image_type; 3538 self 3539 } format(mut self, format: Format) -> ImageCreateInfoBuilder<'a>3540 pub fn format(mut self, format: Format) -> ImageCreateInfoBuilder<'a> { 3541 self.inner.format = format; 3542 self 3543 } extent(mut self, extent: Extent3D) -> ImageCreateInfoBuilder<'a>3544 pub fn extent(mut self, extent: Extent3D) -> ImageCreateInfoBuilder<'a> { 3545 self.inner.extent = extent; 3546 self 3547 } mip_levels(mut self, mip_levels: u32) -> ImageCreateInfoBuilder<'a>3548 pub fn mip_levels(mut self, mip_levels: u32) -> ImageCreateInfoBuilder<'a> { 3549 self.inner.mip_levels = mip_levels; 3550 self 3551 } array_layers(mut self, array_layers: u32) -> ImageCreateInfoBuilder<'a>3552 pub fn array_layers(mut self, array_layers: u32) -> ImageCreateInfoBuilder<'a> { 3553 self.inner.array_layers = array_layers; 3554 self 3555 } samples(mut self, samples: SampleCountFlags) -> ImageCreateInfoBuilder<'a>3556 pub fn samples(mut self, samples: SampleCountFlags) -> ImageCreateInfoBuilder<'a> { 3557 self.inner.samples = samples; 3558 self 3559 } tiling(mut self, tiling: ImageTiling) -> ImageCreateInfoBuilder<'a>3560 pub fn tiling(mut self, tiling: ImageTiling) -> ImageCreateInfoBuilder<'a> { 3561 self.inner.tiling = tiling; 3562 self 3563 } usage(mut self, usage: ImageUsageFlags) -> ImageCreateInfoBuilder<'a>3564 pub fn usage(mut self, usage: ImageUsageFlags) -> ImageCreateInfoBuilder<'a> { 3565 self.inner.usage = usage; 3566 self 3567 } sharing_mode(mut self, sharing_mode: SharingMode) -> ImageCreateInfoBuilder<'a>3568 pub fn sharing_mode(mut self, sharing_mode: SharingMode) -> ImageCreateInfoBuilder<'a> { 3569 self.inner.sharing_mode = sharing_mode; 3570 self 3571 } queue_family_indices( mut self, queue_family_indices: &'a [u32], ) -> ImageCreateInfoBuilder<'a>3572 pub fn queue_family_indices( 3573 mut self, 3574 queue_family_indices: &'a [u32], 3575 ) -> ImageCreateInfoBuilder<'a> { 3576 self.inner.queue_family_index_count = queue_family_indices.len() as _; 3577 self.inner.p_queue_family_indices = queue_family_indices.as_ptr(); 3578 self 3579 } initial_layout(mut self, initial_layout: ImageLayout) -> ImageCreateInfoBuilder<'a>3580 pub fn initial_layout(mut self, initial_layout: ImageLayout) -> ImageCreateInfoBuilder<'a> { 3581 self.inner.initial_layout = initial_layout; 3582 self 3583 } 3584 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 3585 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 3586 #[doc = r" valid extension structs can be pushed into the chain."] 3587 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 3588 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsImageCreateInfo>( mut self, next: &'a mut T, ) -> ImageCreateInfoBuilder<'a>3589 pub fn push_next<T: ExtendsImageCreateInfo>( 3590 mut self, 3591 next: &'a mut T, 3592 ) -> ImageCreateInfoBuilder<'a> { 3593 unsafe { 3594 let next_ptr = next as *mut T as *mut BaseOutStructure; 3595 let last_next = ptr_chain_iter(next).last().unwrap(); 3596 (*last_next).p_next = self.inner.p_next as _; 3597 self.inner.p_next = next_ptr as _; 3598 } 3599 self 3600 } 3601 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3602 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3603 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageCreateInfo3604 pub fn build(self) -> ImageCreateInfo { 3605 self.inner 3606 } 3607 } 3608 #[repr(C)] 3609 #[derive(Copy, Clone, Default, Debug)] 3610 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSubresourceLayout.html>"] 3611 pub struct SubresourceLayout { 3612 pub offset: DeviceSize, 3613 pub size: DeviceSize, 3614 pub row_pitch: DeviceSize, 3615 pub array_pitch: DeviceSize, 3616 pub depth_pitch: DeviceSize, 3617 } 3618 impl SubresourceLayout { builder<'a>() -> SubresourceLayoutBuilder<'a>3619 pub fn builder<'a>() -> SubresourceLayoutBuilder<'a> { 3620 SubresourceLayoutBuilder { 3621 inner: SubresourceLayout::default(), 3622 marker: ::std::marker::PhantomData, 3623 } 3624 } 3625 } 3626 #[repr(transparent)] 3627 pub struct SubresourceLayoutBuilder<'a> { 3628 inner: SubresourceLayout, 3629 marker: ::std::marker::PhantomData<&'a ()>, 3630 } 3631 impl<'a> ::std::ops::Deref for SubresourceLayoutBuilder<'a> { 3632 type Target = SubresourceLayout; deref(&self) -> &Self::Target3633 fn deref(&self) -> &Self::Target { 3634 &self.inner 3635 } 3636 } 3637 impl<'a> ::std::ops::DerefMut for SubresourceLayoutBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3638 fn deref_mut(&mut self) -> &mut Self::Target { 3639 &mut self.inner 3640 } 3641 } 3642 impl<'a> SubresourceLayoutBuilder<'a> { offset(mut self, offset: DeviceSize) -> SubresourceLayoutBuilder<'a>3643 pub fn offset(mut self, offset: DeviceSize) -> SubresourceLayoutBuilder<'a> { 3644 self.inner.offset = offset; 3645 self 3646 } size(mut self, size: DeviceSize) -> SubresourceLayoutBuilder<'a>3647 pub fn size(mut self, size: DeviceSize) -> SubresourceLayoutBuilder<'a> { 3648 self.inner.size = size; 3649 self 3650 } row_pitch(mut self, row_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a>3651 pub fn row_pitch(mut self, row_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a> { 3652 self.inner.row_pitch = row_pitch; 3653 self 3654 } array_pitch(mut self, array_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a>3655 pub fn array_pitch(mut self, array_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a> { 3656 self.inner.array_pitch = array_pitch; 3657 self 3658 } depth_pitch(mut self, depth_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a>3659 pub fn depth_pitch(mut self, depth_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a> { 3660 self.inner.depth_pitch = depth_pitch; 3661 self 3662 } 3663 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3664 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3665 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SubresourceLayout3666 pub fn build(self) -> SubresourceLayout { 3667 self.inner 3668 } 3669 } 3670 #[repr(C)] 3671 #[derive(Copy, Clone, Debug)] 3672 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageViewCreateInfo.html>"] 3673 pub struct ImageViewCreateInfo { 3674 pub s_type: StructureType, 3675 pub p_next: *const c_void, 3676 pub flags: ImageViewCreateFlags, 3677 pub image: Image, 3678 pub view_type: ImageViewType, 3679 pub format: Format, 3680 pub components: ComponentMapping, 3681 pub subresource_range: ImageSubresourceRange, 3682 } 3683 impl ::std::default::Default for ImageViewCreateInfo { default() -> ImageViewCreateInfo3684 fn default() -> ImageViewCreateInfo { 3685 ImageViewCreateInfo { 3686 s_type: StructureType::IMAGE_VIEW_CREATE_INFO, 3687 p_next: ::std::ptr::null(), 3688 flags: ImageViewCreateFlags::default(), 3689 image: Image::default(), 3690 view_type: ImageViewType::default(), 3691 format: Format::default(), 3692 components: ComponentMapping::default(), 3693 subresource_range: ImageSubresourceRange::default(), 3694 } 3695 } 3696 } 3697 impl ImageViewCreateInfo { builder<'a>() -> ImageViewCreateInfoBuilder<'a>3698 pub fn builder<'a>() -> ImageViewCreateInfoBuilder<'a> { 3699 ImageViewCreateInfoBuilder { 3700 inner: ImageViewCreateInfo::default(), 3701 marker: ::std::marker::PhantomData, 3702 } 3703 } 3704 } 3705 #[repr(transparent)] 3706 pub struct ImageViewCreateInfoBuilder<'a> { 3707 inner: ImageViewCreateInfo, 3708 marker: ::std::marker::PhantomData<&'a ()>, 3709 } 3710 pub unsafe trait ExtendsImageViewCreateInfo {} 3711 impl<'a> ::std::ops::Deref for ImageViewCreateInfoBuilder<'a> { 3712 type Target = ImageViewCreateInfo; deref(&self) -> &Self::Target3713 fn deref(&self) -> &Self::Target { 3714 &self.inner 3715 } 3716 } 3717 impl<'a> ::std::ops::DerefMut for ImageViewCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3718 fn deref_mut(&mut self) -> &mut Self::Target { 3719 &mut self.inner 3720 } 3721 } 3722 impl<'a> ImageViewCreateInfoBuilder<'a> { flags(mut self, flags: ImageViewCreateFlags) -> ImageViewCreateInfoBuilder<'a>3723 pub fn flags(mut self, flags: ImageViewCreateFlags) -> ImageViewCreateInfoBuilder<'a> { 3724 self.inner.flags = flags; 3725 self 3726 } image(mut self, image: Image) -> ImageViewCreateInfoBuilder<'a>3727 pub fn image(mut self, image: Image) -> ImageViewCreateInfoBuilder<'a> { 3728 self.inner.image = image; 3729 self 3730 } view_type(mut self, view_type: ImageViewType) -> ImageViewCreateInfoBuilder<'a>3731 pub fn view_type(mut self, view_type: ImageViewType) -> ImageViewCreateInfoBuilder<'a> { 3732 self.inner.view_type = view_type; 3733 self 3734 } format(mut self, format: Format) -> ImageViewCreateInfoBuilder<'a>3735 pub fn format(mut self, format: Format) -> ImageViewCreateInfoBuilder<'a> { 3736 self.inner.format = format; 3737 self 3738 } components(mut self, components: ComponentMapping) -> ImageViewCreateInfoBuilder<'a>3739 pub fn components(mut self, components: ComponentMapping) -> ImageViewCreateInfoBuilder<'a> { 3740 self.inner.components = components; 3741 self 3742 } subresource_range( mut self, subresource_range: ImageSubresourceRange, ) -> ImageViewCreateInfoBuilder<'a>3743 pub fn subresource_range( 3744 mut self, 3745 subresource_range: ImageSubresourceRange, 3746 ) -> ImageViewCreateInfoBuilder<'a> { 3747 self.inner.subresource_range = subresource_range; 3748 self 3749 } 3750 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 3751 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 3752 #[doc = r" valid extension structs can be pushed into the chain."] 3753 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 3754 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsImageViewCreateInfo>( mut self, next: &'a mut T, ) -> ImageViewCreateInfoBuilder<'a>3755 pub fn push_next<T: ExtendsImageViewCreateInfo>( 3756 mut self, 3757 next: &'a mut T, 3758 ) -> ImageViewCreateInfoBuilder<'a> { 3759 unsafe { 3760 let next_ptr = next as *mut T as *mut BaseOutStructure; 3761 let last_next = ptr_chain_iter(next).last().unwrap(); 3762 (*last_next).p_next = self.inner.p_next as _; 3763 self.inner.p_next = next_ptr as _; 3764 } 3765 self 3766 } 3767 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3768 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3769 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageViewCreateInfo3770 pub fn build(self) -> ImageViewCreateInfo { 3771 self.inner 3772 } 3773 } 3774 #[repr(C)] 3775 #[derive(Copy, Clone, Default, Debug)] 3776 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferCopy.html>"] 3777 pub struct BufferCopy { 3778 pub src_offset: DeviceSize, 3779 pub dst_offset: DeviceSize, 3780 pub size: DeviceSize, 3781 } 3782 impl BufferCopy { builder<'a>() -> BufferCopyBuilder<'a>3783 pub fn builder<'a>() -> BufferCopyBuilder<'a> { 3784 BufferCopyBuilder { 3785 inner: BufferCopy::default(), 3786 marker: ::std::marker::PhantomData, 3787 } 3788 } 3789 } 3790 #[repr(transparent)] 3791 pub struct BufferCopyBuilder<'a> { 3792 inner: BufferCopy, 3793 marker: ::std::marker::PhantomData<&'a ()>, 3794 } 3795 impl<'a> ::std::ops::Deref for BufferCopyBuilder<'a> { 3796 type Target = BufferCopy; deref(&self) -> &Self::Target3797 fn deref(&self) -> &Self::Target { 3798 &self.inner 3799 } 3800 } 3801 impl<'a> ::std::ops::DerefMut for BufferCopyBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3802 fn deref_mut(&mut self) -> &mut Self::Target { 3803 &mut self.inner 3804 } 3805 } 3806 impl<'a> BufferCopyBuilder<'a> { src_offset(mut self, src_offset: DeviceSize) -> BufferCopyBuilder<'a>3807 pub fn src_offset(mut self, src_offset: DeviceSize) -> BufferCopyBuilder<'a> { 3808 self.inner.src_offset = src_offset; 3809 self 3810 } dst_offset(mut self, dst_offset: DeviceSize) -> BufferCopyBuilder<'a>3811 pub fn dst_offset(mut self, dst_offset: DeviceSize) -> BufferCopyBuilder<'a> { 3812 self.inner.dst_offset = dst_offset; 3813 self 3814 } size(mut self, size: DeviceSize) -> BufferCopyBuilder<'a>3815 pub fn size(mut self, size: DeviceSize) -> BufferCopyBuilder<'a> { 3816 self.inner.size = size; 3817 self 3818 } 3819 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3820 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3821 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> BufferCopy3822 pub fn build(self) -> BufferCopy { 3823 self.inner 3824 } 3825 } 3826 #[repr(C)] 3827 #[derive(Copy, Clone, Default, Debug)] 3828 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseMemoryBind.html>"] 3829 pub struct SparseMemoryBind { 3830 pub resource_offset: DeviceSize, 3831 pub size: DeviceSize, 3832 pub memory: DeviceMemory, 3833 pub memory_offset: DeviceSize, 3834 pub flags: SparseMemoryBindFlags, 3835 } 3836 impl SparseMemoryBind { builder<'a>() -> SparseMemoryBindBuilder<'a>3837 pub fn builder<'a>() -> SparseMemoryBindBuilder<'a> { 3838 SparseMemoryBindBuilder { 3839 inner: SparseMemoryBind::default(), 3840 marker: ::std::marker::PhantomData, 3841 } 3842 } 3843 } 3844 #[repr(transparent)] 3845 pub struct SparseMemoryBindBuilder<'a> { 3846 inner: SparseMemoryBind, 3847 marker: ::std::marker::PhantomData<&'a ()>, 3848 } 3849 impl<'a> ::std::ops::Deref for SparseMemoryBindBuilder<'a> { 3850 type Target = SparseMemoryBind; deref(&self) -> &Self::Target3851 fn deref(&self) -> &Self::Target { 3852 &self.inner 3853 } 3854 } 3855 impl<'a> ::std::ops::DerefMut for SparseMemoryBindBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3856 fn deref_mut(&mut self) -> &mut Self::Target { 3857 &mut self.inner 3858 } 3859 } 3860 impl<'a> SparseMemoryBindBuilder<'a> { resource_offset(mut self, resource_offset: DeviceSize) -> SparseMemoryBindBuilder<'a>3861 pub fn resource_offset(mut self, resource_offset: DeviceSize) -> SparseMemoryBindBuilder<'a> { 3862 self.inner.resource_offset = resource_offset; 3863 self 3864 } size(mut self, size: DeviceSize) -> SparseMemoryBindBuilder<'a>3865 pub fn size(mut self, size: DeviceSize) -> SparseMemoryBindBuilder<'a> { 3866 self.inner.size = size; 3867 self 3868 } memory(mut self, memory: DeviceMemory) -> SparseMemoryBindBuilder<'a>3869 pub fn memory(mut self, memory: DeviceMemory) -> SparseMemoryBindBuilder<'a> { 3870 self.inner.memory = memory; 3871 self 3872 } memory_offset(mut self, memory_offset: DeviceSize) -> SparseMemoryBindBuilder<'a>3873 pub fn memory_offset(mut self, memory_offset: DeviceSize) -> SparseMemoryBindBuilder<'a> { 3874 self.inner.memory_offset = memory_offset; 3875 self 3876 } flags(mut self, flags: SparseMemoryBindFlags) -> SparseMemoryBindBuilder<'a>3877 pub fn flags(mut self, flags: SparseMemoryBindFlags) -> SparseMemoryBindBuilder<'a> { 3878 self.inner.flags = flags; 3879 self 3880 } 3881 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3882 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3883 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SparseMemoryBind3884 pub fn build(self) -> SparseMemoryBind { 3885 self.inner 3886 } 3887 } 3888 #[repr(C)] 3889 #[derive(Copy, Clone, Default, Debug)] 3890 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageMemoryBind.html>"] 3891 pub struct SparseImageMemoryBind { 3892 pub subresource: ImageSubresource, 3893 pub offset: Offset3D, 3894 pub extent: Extent3D, 3895 pub memory: DeviceMemory, 3896 pub memory_offset: DeviceSize, 3897 pub flags: SparseMemoryBindFlags, 3898 } 3899 impl SparseImageMemoryBind { builder<'a>() -> SparseImageMemoryBindBuilder<'a>3900 pub fn builder<'a>() -> SparseImageMemoryBindBuilder<'a> { 3901 SparseImageMemoryBindBuilder { 3902 inner: SparseImageMemoryBind::default(), 3903 marker: ::std::marker::PhantomData, 3904 } 3905 } 3906 } 3907 #[repr(transparent)] 3908 pub struct SparseImageMemoryBindBuilder<'a> { 3909 inner: SparseImageMemoryBind, 3910 marker: ::std::marker::PhantomData<&'a ()>, 3911 } 3912 impl<'a> ::std::ops::Deref for SparseImageMemoryBindBuilder<'a> { 3913 type Target = SparseImageMemoryBind; deref(&self) -> &Self::Target3914 fn deref(&self) -> &Self::Target { 3915 &self.inner 3916 } 3917 } 3918 impl<'a> ::std::ops::DerefMut for SparseImageMemoryBindBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3919 fn deref_mut(&mut self) -> &mut Self::Target { 3920 &mut self.inner 3921 } 3922 } 3923 impl<'a> SparseImageMemoryBindBuilder<'a> { subresource( mut self, subresource: ImageSubresource, ) -> SparseImageMemoryBindBuilder<'a>3924 pub fn subresource( 3925 mut self, 3926 subresource: ImageSubresource, 3927 ) -> SparseImageMemoryBindBuilder<'a> { 3928 self.inner.subresource = subresource; 3929 self 3930 } offset(mut self, offset: Offset3D) -> SparseImageMemoryBindBuilder<'a>3931 pub fn offset(mut self, offset: Offset3D) -> SparseImageMemoryBindBuilder<'a> { 3932 self.inner.offset = offset; 3933 self 3934 } extent(mut self, extent: Extent3D) -> SparseImageMemoryBindBuilder<'a>3935 pub fn extent(mut self, extent: Extent3D) -> SparseImageMemoryBindBuilder<'a> { 3936 self.inner.extent = extent; 3937 self 3938 } memory(mut self, memory: DeviceMemory) -> SparseImageMemoryBindBuilder<'a>3939 pub fn memory(mut self, memory: DeviceMemory) -> SparseImageMemoryBindBuilder<'a> { 3940 self.inner.memory = memory; 3941 self 3942 } memory_offset(mut self, memory_offset: DeviceSize) -> SparseImageMemoryBindBuilder<'a>3943 pub fn memory_offset(mut self, memory_offset: DeviceSize) -> SparseImageMemoryBindBuilder<'a> { 3944 self.inner.memory_offset = memory_offset; 3945 self 3946 } flags(mut self, flags: SparseMemoryBindFlags) -> SparseImageMemoryBindBuilder<'a>3947 pub fn flags(mut self, flags: SparseMemoryBindFlags) -> SparseImageMemoryBindBuilder<'a> { 3948 self.inner.flags = flags; 3949 self 3950 } 3951 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 3952 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 3953 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SparseImageMemoryBind3954 pub fn build(self) -> SparseImageMemoryBind { 3955 self.inner 3956 } 3957 } 3958 #[repr(C)] 3959 #[derive(Copy, Clone, Debug)] 3960 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseBufferMemoryBindInfo.html>"] 3961 pub struct SparseBufferMemoryBindInfo { 3962 pub buffer: Buffer, 3963 pub bind_count: u32, 3964 pub p_binds: *const SparseMemoryBind, 3965 } 3966 impl ::std::default::Default for SparseBufferMemoryBindInfo { default() -> SparseBufferMemoryBindInfo3967 fn default() -> SparseBufferMemoryBindInfo { 3968 SparseBufferMemoryBindInfo { 3969 buffer: Buffer::default(), 3970 bind_count: u32::default(), 3971 p_binds: ::std::ptr::null(), 3972 } 3973 } 3974 } 3975 impl SparseBufferMemoryBindInfo { builder<'a>() -> SparseBufferMemoryBindInfoBuilder<'a>3976 pub fn builder<'a>() -> SparseBufferMemoryBindInfoBuilder<'a> { 3977 SparseBufferMemoryBindInfoBuilder { 3978 inner: SparseBufferMemoryBindInfo::default(), 3979 marker: ::std::marker::PhantomData, 3980 } 3981 } 3982 } 3983 #[repr(transparent)] 3984 pub struct SparseBufferMemoryBindInfoBuilder<'a> { 3985 inner: SparseBufferMemoryBindInfo, 3986 marker: ::std::marker::PhantomData<&'a ()>, 3987 } 3988 impl<'a> ::std::ops::Deref for SparseBufferMemoryBindInfoBuilder<'a> { 3989 type Target = SparseBufferMemoryBindInfo; deref(&self) -> &Self::Target3990 fn deref(&self) -> &Self::Target { 3991 &self.inner 3992 } 3993 } 3994 impl<'a> ::std::ops::DerefMut for SparseBufferMemoryBindInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target3995 fn deref_mut(&mut self) -> &mut Self::Target { 3996 &mut self.inner 3997 } 3998 } 3999 impl<'a> SparseBufferMemoryBindInfoBuilder<'a> { buffer(mut self, buffer: Buffer) -> SparseBufferMemoryBindInfoBuilder<'a>4000 pub fn buffer(mut self, buffer: Buffer) -> SparseBufferMemoryBindInfoBuilder<'a> { 4001 self.inner.buffer = buffer; 4002 self 4003 } binds(mut self, binds: &'a [SparseMemoryBind]) -> SparseBufferMemoryBindInfoBuilder<'a>4004 pub fn binds(mut self, binds: &'a [SparseMemoryBind]) -> SparseBufferMemoryBindInfoBuilder<'a> { 4005 self.inner.bind_count = binds.len() as _; 4006 self.inner.p_binds = binds.as_ptr(); 4007 self 4008 } 4009 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4010 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4011 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SparseBufferMemoryBindInfo4012 pub fn build(self) -> SparseBufferMemoryBindInfo { 4013 self.inner 4014 } 4015 } 4016 #[repr(C)] 4017 #[derive(Copy, Clone, Debug)] 4018 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageOpaqueMemoryBindInfo.html>"] 4019 pub struct SparseImageOpaqueMemoryBindInfo { 4020 pub image: Image, 4021 pub bind_count: u32, 4022 pub p_binds: *const SparseMemoryBind, 4023 } 4024 impl ::std::default::Default for SparseImageOpaqueMemoryBindInfo { default() -> SparseImageOpaqueMemoryBindInfo4025 fn default() -> SparseImageOpaqueMemoryBindInfo { 4026 SparseImageOpaqueMemoryBindInfo { 4027 image: Image::default(), 4028 bind_count: u32::default(), 4029 p_binds: ::std::ptr::null(), 4030 } 4031 } 4032 } 4033 impl SparseImageOpaqueMemoryBindInfo { builder<'a>() -> SparseImageOpaqueMemoryBindInfoBuilder<'a>4034 pub fn builder<'a>() -> SparseImageOpaqueMemoryBindInfoBuilder<'a> { 4035 SparseImageOpaqueMemoryBindInfoBuilder { 4036 inner: SparseImageOpaqueMemoryBindInfo::default(), 4037 marker: ::std::marker::PhantomData, 4038 } 4039 } 4040 } 4041 #[repr(transparent)] 4042 pub struct SparseImageOpaqueMemoryBindInfoBuilder<'a> { 4043 inner: SparseImageOpaqueMemoryBindInfo, 4044 marker: ::std::marker::PhantomData<&'a ()>, 4045 } 4046 impl<'a> ::std::ops::Deref for SparseImageOpaqueMemoryBindInfoBuilder<'a> { 4047 type Target = SparseImageOpaqueMemoryBindInfo; deref(&self) -> &Self::Target4048 fn deref(&self) -> &Self::Target { 4049 &self.inner 4050 } 4051 } 4052 impl<'a> ::std::ops::DerefMut for SparseImageOpaqueMemoryBindInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4053 fn deref_mut(&mut self) -> &mut Self::Target { 4054 &mut self.inner 4055 } 4056 } 4057 impl<'a> SparseImageOpaqueMemoryBindInfoBuilder<'a> { image(mut self, image: Image) -> SparseImageOpaqueMemoryBindInfoBuilder<'a>4058 pub fn image(mut self, image: Image) -> SparseImageOpaqueMemoryBindInfoBuilder<'a> { 4059 self.inner.image = image; 4060 self 4061 } binds( mut self, binds: &'a [SparseMemoryBind], ) -> SparseImageOpaqueMemoryBindInfoBuilder<'a>4062 pub fn binds( 4063 mut self, 4064 binds: &'a [SparseMemoryBind], 4065 ) -> SparseImageOpaqueMemoryBindInfoBuilder<'a> { 4066 self.inner.bind_count = binds.len() as _; 4067 self.inner.p_binds = binds.as_ptr(); 4068 self 4069 } 4070 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4071 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4072 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SparseImageOpaqueMemoryBindInfo4073 pub fn build(self) -> SparseImageOpaqueMemoryBindInfo { 4074 self.inner 4075 } 4076 } 4077 #[repr(C)] 4078 #[derive(Copy, Clone, Debug)] 4079 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageMemoryBindInfo.html>"] 4080 pub struct SparseImageMemoryBindInfo { 4081 pub image: Image, 4082 pub bind_count: u32, 4083 pub p_binds: *const SparseImageMemoryBind, 4084 } 4085 impl ::std::default::Default for SparseImageMemoryBindInfo { default() -> SparseImageMemoryBindInfo4086 fn default() -> SparseImageMemoryBindInfo { 4087 SparseImageMemoryBindInfo { 4088 image: Image::default(), 4089 bind_count: u32::default(), 4090 p_binds: ::std::ptr::null(), 4091 } 4092 } 4093 } 4094 impl SparseImageMemoryBindInfo { builder<'a>() -> SparseImageMemoryBindInfoBuilder<'a>4095 pub fn builder<'a>() -> SparseImageMemoryBindInfoBuilder<'a> { 4096 SparseImageMemoryBindInfoBuilder { 4097 inner: SparseImageMemoryBindInfo::default(), 4098 marker: ::std::marker::PhantomData, 4099 } 4100 } 4101 } 4102 #[repr(transparent)] 4103 pub struct SparseImageMemoryBindInfoBuilder<'a> { 4104 inner: SparseImageMemoryBindInfo, 4105 marker: ::std::marker::PhantomData<&'a ()>, 4106 } 4107 impl<'a> ::std::ops::Deref for SparseImageMemoryBindInfoBuilder<'a> { 4108 type Target = SparseImageMemoryBindInfo; deref(&self) -> &Self::Target4109 fn deref(&self) -> &Self::Target { 4110 &self.inner 4111 } 4112 } 4113 impl<'a> ::std::ops::DerefMut for SparseImageMemoryBindInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4114 fn deref_mut(&mut self) -> &mut Self::Target { 4115 &mut self.inner 4116 } 4117 } 4118 impl<'a> SparseImageMemoryBindInfoBuilder<'a> { image(mut self, image: Image) -> SparseImageMemoryBindInfoBuilder<'a>4119 pub fn image(mut self, image: Image) -> SparseImageMemoryBindInfoBuilder<'a> { 4120 self.inner.image = image; 4121 self 4122 } binds( mut self, binds: &'a [SparseImageMemoryBind], ) -> SparseImageMemoryBindInfoBuilder<'a>4123 pub fn binds( 4124 mut self, 4125 binds: &'a [SparseImageMemoryBind], 4126 ) -> SparseImageMemoryBindInfoBuilder<'a> { 4127 self.inner.bind_count = binds.len() as _; 4128 self.inner.p_binds = binds.as_ptr(); 4129 self 4130 } 4131 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4132 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4133 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SparseImageMemoryBindInfo4134 pub fn build(self) -> SparseImageMemoryBindInfo { 4135 self.inner 4136 } 4137 } 4138 #[repr(C)] 4139 #[derive(Copy, Clone, Debug)] 4140 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBindSparseInfo.html>"] 4141 pub struct BindSparseInfo { 4142 pub s_type: StructureType, 4143 pub p_next: *const c_void, 4144 pub wait_semaphore_count: u32, 4145 pub p_wait_semaphores: *const Semaphore, 4146 pub buffer_bind_count: u32, 4147 pub p_buffer_binds: *const SparseBufferMemoryBindInfo, 4148 pub image_opaque_bind_count: u32, 4149 pub p_image_opaque_binds: *const SparseImageOpaqueMemoryBindInfo, 4150 pub image_bind_count: u32, 4151 pub p_image_binds: *const SparseImageMemoryBindInfo, 4152 pub signal_semaphore_count: u32, 4153 pub p_signal_semaphores: *const Semaphore, 4154 } 4155 impl ::std::default::Default for BindSparseInfo { default() -> BindSparseInfo4156 fn default() -> BindSparseInfo { 4157 BindSparseInfo { 4158 s_type: StructureType::BIND_SPARSE_INFO, 4159 p_next: ::std::ptr::null(), 4160 wait_semaphore_count: u32::default(), 4161 p_wait_semaphores: ::std::ptr::null(), 4162 buffer_bind_count: u32::default(), 4163 p_buffer_binds: ::std::ptr::null(), 4164 image_opaque_bind_count: u32::default(), 4165 p_image_opaque_binds: ::std::ptr::null(), 4166 image_bind_count: u32::default(), 4167 p_image_binds: ::std::ptr::null(), 4168 signal_semaphore_count: u32::default(), 4169 p_signal_semaphores: ::std::ptr::null(), 4170 } 4171 } 4172 } 4173 impl BindSparseInfo { builder<'a>() -> BindSparseInfoBuilder<'a>4174 pub fn builder<'a>() -> BindSparseInfoBuilder<'a> { 4175 BindSparseInfoBuilder { 4176 inner: BindSparseInfo::default(), 4177 marker: ::std::marker::PhantomData, 4178 } 4179 } 4180 } 4181 #[repr(transparent)] 4182 pub struct BindSparseInfoBuilder<'a> { 4183 inner: BindSparseInfo, 4184 marker: ::std::marker::PhantomData<&'a ()>, 4185 } 4186 pub unsafe trait ExtendsBindSparseInfo {} 4187 impl<'a> ::std::ops::Deref for BindSparseInfoBuilder<'a> { 4188 type Target = BindSparseInfo; deref(&self) -> &Self::Target4189 fn deref(&self) -> &Self::Target { 4190 &self.inner 4191 } 4192 } 4193 impl<'a> ::std::ops::DerefMut for BindSparseInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4194 fn deref_mut(&mut self) -> &mut Self::Target { 4195 &mut self.inner 4196 } 4197 } 4198 impl<'a> BindSparseInfoBuilder<'a> { wait_semaphores( mut self, wait_semaphores: &'a [Semaphore], ) -> BindSparseInfoBuilder<'a>4199 pub fn wait_semaphores( 4200 mut self, 4201 wait_semaphores: &'a [Semaphore], 4202 ) -> BindSparseInfoBuilder<'a> { 4203 self.inner.wait_semaphore_count = wait_semaphores.len() as _; 4204 self.inner.p_wait_semaphores = wait_semaphores.as_ptr(); 4205 self 4206 } buffer_binds( mut self, buffer_binds: &'a [SparseBufferMemoryBindInfo], ) -> BindSparseInfoBuilder<'a>4207 pub fn buffer_binds( 4208 mut self, 4209 buffer_binds: &'a [SparseBufferMemoryBindInfo], 4210 ) -> BindSparseInfoBuilder<'a> { 4211 self.inner.buffer_bind_count = buffer_binds.len() as _; 4212 self.inner.p_buffer_binds = buffer_binds.as_ptr(); 4213 self 4214 } image_opaque_binds( mut self, image_opaque_binds: &'a [SparseImageOpaqueMemoryBindInfo], ) -> BindSparseInfoBuilder<'a>4215 pub fn image_opaque_binds( 4216 mut self, 4217 image_opaque_binds: &'a [SparseImageOpaqueMemoryBindInfo], 4218 ) -> BindSparseInfoBuilder<'a> { 4219 self.inner.image_opaque_bind_count = image_opaque_binds.len() as _; 4220 self.inner.p_image_opaque_binds = image_opaque_binds.as_ptr(); 4221 self 4222 } image_binds( mut self, image_binds: &'a [SparseImageMemoryBindInfo], ) -> BindSparseInfoBuilder<'a>4223 pub fn image_binds( 4224 mut self, 4225 image_binds: &'a [SparseImageMemoryBindInfo], 4226 ) -> BindSparseInfoBuilder<'a> { 4227 self.inner.image_bind_count = image_binds.len() as _; 4228 self.inner.p_image_binds = image_binds.as_ptr(); 4229 self 4230 } signal_semaphores( mut self, signal_semaphores: &'a [Semaphore], ) -> BindSparseInfoBuilder<'a>4231 pub fn signal_semaphores( 4232 mut self, 4233 signal_semaphores: &'a [Semaphore], 4234 ) -> BindSparseInfoBuilder<'a> { 4235 self.inner.signal_semaphore_count = signal_semaphores.len() as _; 4236 self.inner.p_signal_semaphores = signal_semaphores.as_ptr(); 4237 self 4238 } 4239 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 4240 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 4241 #[doc = r" valid extension structs can be pushed into the chain."] 4242 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 4243 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsBindSparseInfo>( mut self, next: &'a mut T, ) -> BindSparseInfoBuilder<'a>4244 pub fn push_next<T: ExtendsBindSparseInfo>( 4245 mut self, 4246 next: &'a mut T, 4247 ) -> BindSparseInfoBuilder<'a> { 4248 unsafe { 4249 let next_ptr = next as *mut T as *mut BaseOutStructure; 4250 let last_next = ptr_chain_iter(next).last().unwrap(); 4251 (*last_next).p_next = self.inner.p_next as _; 4252 self.inner.p_next = next_ptr as _; 4253 } 4254 self 4255 } 4256 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4257 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4258 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> BindSparseInfo4259 pub fn build(self) -> BindSparseInfo { 4260 self.inner 4261 } 4262 } 4263 #[repr(C)] 4264 #[derive(Copy, Clone, Default, Debug)] 4265 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageCopy.html>"] 4266 pub struct ImageCopy { 4267 pub src_subresource: ImageSubresourceLayers, 4268 pub src_offset: Offset3D, 4269 pub dst_subresource: ImageSubresourceLayers, 4270 pub dst_offset: Offset3D, 4271 pub extent: Extent3D, 4272 } 4273 impl ImageCopy { builder<'a>() -> ImageCopyBuilder<'a>4274 pub fn builder<'a>() -> ImageCopyBuilder<'a> { 4275 ImageCopyBuilder { 4276 inner: ImageCopy::default(), 4277 marker: ::std::marker::PhantomData, 4278 } 4279 } 4280 } 4281 #[repr(transparent)] 4282 pub struct ImageCopyBuilder<'a> { 4283 inner: ImageCopy, 4284 marker: ::std::marker::PhantomData<&'a ()>, 4285 } 4286 impl<'a> ::std::ops::Deref for ImageCopyBuilder<'a> { 4287 type Target = ImageCopy; deref(&self) -> &Self::Target4288 fn deref(&self) -> &Self::Target { 4289 &self.inner 4290 } 4291 } 4292 impl<'a> ::std::ops::DerefMut for ImageCopyBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4293 fn deref_mut(&mut self) -> &mut Self::Target { 4294 &mut self.inner 4295 } 4296 } 4297 impl<'a> ImageCopyBuilder<'a> { src_subresource( mut self, src_subresource: ImageSubresourceLayers, ) -> ImageCopyBuilder<'a>4298 pub fn src_subresource( 4299 mut self, 4300 src_subresource: ImageSubresourceLayers, 4301 ) -> ImageCopyBuilder<'a> { 4302 self.inner.src_subresource = src_subresource; 4303 self 4304 } src_offset(mut self, src_offset: Offset3D) -> ImageCopyBuilder<'a>4305 pub fn src_offset(mut self, src_offset: Offset3D) -> ImageCopyBuilder<'a> { 4306 self.inner.src_offset = src_offset; 4307 self 4308 } dst_subresource( mut self, dst_subresource: ImageSubresourceLayers, ) -> ImageCopyBuilder<'a>4309 pub fn dst_subresource( 4310 mut self, 4311 dst_subresource: ImageSubresourceLayers, 4312 ) -> ImageCopyBuilder<'a> { 4313 self.inner.dst_subresource = dst_subresource; 4314 self 4315 } dst_offset(mut self, dst_offset: Offset3D) -> ImageCopyBuilder<'a>4316 pub fn dst_offset(mut self, dst_offset: Offset3D) -> ImageCopyBuilder<'a> { 4317 self.inner.dst_offset = dst_offset; 4318 self 4319 } extent(mut self, extent: Extent3D) -> ImageCopyBuilder<'a>4320 pub fn extent(mut self, extent: Extent3D) -> ImageCopyBuilder<'a> { 4321 self.inner.extent = extent; 4322 self 4323 } 4324 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4325 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4326 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageCopy4327 pub fn build(self) -> ImageCopy { 4328 self.inner 4329 } 4330 } 4331 #[repr(C)] 4332 #[derive(Copy, Clone, Debug)] 4333 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageBlit.html>"] 4334 pub struct ImageBlit { 4335 pub src_subresource: ImageSubresourceLayers, 4336 pub src_offsets: [Offset3D; 2], 4337 pub dst_subresource: ImageSubresourceLayers, 4338 pub dst_offsets: [Offset3D; 2], 4339 } 4340 impl ::std::default::Default for ImageBlit { default() -> ImageBlit4341 fn default() -> ImageBlit { 4342 ImageBlit { 4343 src_subresource: ImageSubresourceLayers::default(), 4344 src_offsets: unsafe { ::std::mem::zeroed() }, 4345 dst_subresource: ImageSubresourceLayers::default(), 4346 dst_offsets: unsafe { ::std::mem::zeroed() }, 4347 } 4348 } 4349 } 4350 impl ImageBlit { builder<'a>() -> ImageBlitBuilder<'a>4351 pub fn builder<'a>() -> ImageBlitBuilder<'a> { 4352 ImageBlitBuilder { 4353 inner: ImageBlit::default(), 4354 marker: ::std::marker::PhantomData, 4355 } 4356 } 4357 } 4358 #[repr(transparent)] 4359 pub struct ImageBlitBuilder<'a> { 4360 inner: ImageBlit, 4361 marker: ::std::marker::PhantomData<&'a ()>, 4362 } 4363 impl<'a> ::std::ops::Deref for ImageBlitBuilder<'a> { 4364 type Target = ImageBlit; deref(&self) -> &Self::Target4365 fn deref(&self) -> &Self::Target { 4366 &self.inner 4367 } 4368 } 4369 impl<'a> ::std::ops::DerefMut for ImageBlitBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4370 fn deref_mut(&mut self) -> &mut Self::Target { 4371 &mut self.inner 4372 } 4373 } 4374 impl<'a> ImageBlitBuilder<'a> { src_subresource( mut self, src_subresource: ImageSubresourceLayers, ) -> ImageBlitBuilder<'a>4375 pub fn src_subresource( 4376 mut self, 4377 src_subresource: ImageSubresourceLayers, 4378 ) -> ImageBlitBuilder<'a> { 4379 self.inner.src_subresource = src_subresource; 4380 self 4381 } src_offsets(mut self, src_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a>4382 pub fn src_offsets(mut self, src_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a> { 4383 self.inner.src_offsets = src_offsets; 4384 self 4385 } dst_subresource( mut self, dst_subresource: ImageSubresourceLayers, ) -> ImageBlitBuilder<'a>4386 pub fn dst_subresource( 4387 mut self, 4388 dst_subresource: ImageSubresourceLayers, 4389 ) -> ImageBlitBuilder<'a> { 4390 self.inner.dst_subresource = dst_subresource; 4391 self 4392 } dst_offsets(mut self, dst_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a>4393 pub fn dst_offsets(mut self, dst_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a> { 4394 self.inner.dst_offsets = dst_offsets; 4395 self 4396 } 4397 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4398 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4399 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageBlit4400 pub fn build(self) -> ImageBlit { 4401 self.inner 4402 } 4403 } 4404 #[repr(C)] 4405 #[derive(Copy, Clone, Default, Debug)] 4406 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferImageCopy.html>"] 4407 pub struct BufferImageCopy { 4408 pub buffer_offset: DeviceSize, 4409 pub buffer_row_length: u32, 4410 pub buffer_image_height: u32, 4411 pub image_subresource: ImageSubresourceLayers, 4412 pub image_offset: Offset3D, 4413 pub image_extent: Extent3D, 4414 } 4415 impl BufferImageCopy { builder<'a>() -> BufferImageCopyBuilder<'a>4416 pub fn builder<'a>() -> BufferImageCopyBuilder<'a> { 4417 BufferImageCopyBuilder { 4418 inner: BufferImageCopy::default(), 4419 marker: ::std::marker::PhantomData, 4420 } 4421 } 4422 } 4423 #[repr(transparent)] 4424 pub struct BufferImageCopyBuilder<'a> { 4425 inner: BufferImageCopy, 4426 marker: ::std::marker::PhantomData<&'a ()>, 4427 } 4428 impl<'a> ::std::ops::Deref for BufferImageCopyBuilder<'a> { 4429 type Target = BufferImageCopy; deref(&self) -> &Self::Target4430 fn deref(&self) -> &Self::Target { 4431 &self.inner 4432 } 4433 } 4434 impl<'a> ::std::ops::DerefMut for BufferImageCopyBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4435 fn deref_mut(&mut self) -> &mut Self::Target { 4436 &mut self.inner 4437 } 4438 } 4439 impl<'a> BufferImageCopyBuilder<'a> { buffer_offset(mut self, buffer_offset: DeviceSize) -> BufferImageCopyBuilder<'a>4440 pub fn buffer_offset(mut self, buffer_offset: DeviceSize) -> BufferImageCopyBuilder<'a> { 4441 self.inner.buffer_offset = buffer_offset; 4442 self 4443 } buffer_row_length(mut self, buffer_row_length: u32) -> BufferImageCopyBuilder<'a>4444 pub fn buffer_row_length(mut self, buffer_row_length: u32) -> BufferImageCopyBuilder<'a> { 4445 self.inner.buffer_row_length = buffer_row_length; 4446 self 4447 } buffer_image_height(mut self, buffer_image_height: u32) -> BufferImageCopyBuilder<'a>4448 pub fn buffer_image_height(mut self, buffer_image_height: u32) -> BufferImageCopyBuilder<'a> { 4449 self.inner.buffer_image_height = buffer_image_height; 4450 self 4451 } image_subresource( mut self, image_subresource: ImageSubresourceLayers, ) -> BufferImageCopyBuilder<'a>4452 pub fn image_subresource( 4453 mut self, 4454 image_subresource: ImageSubresourceLayers, 4455 ) -> BufferImageCopyBuilder<'a> { 4456 self.inner.image_subresource = image_subresource; 4457 self 4458 } image_offset(mut self, image_offset: Offset3D) -> BufferImageCopyBuilder<'a>4459 pub fn image_offset(mut self, image_offset: Offset3D) -> BufferImageCopyBuilder<'a> { 4460 self.inner.image_offset = image_offset; 4461 self 4462 } image_extent(mut self, image_extent: Extent3D) -> BufferImageCopyBuilder<'a>4463 pub fn image_extent(mut self, image_extent: Extent3D) -> BufferImageCopyBuilder<'a> { 4464 self.inner.image_extent = image_extent; 4465 self 4466 } 4467 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4468 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4469 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> BufferImageCopy4470 pub fn build(self) -> BufferImageCopy { 4471 self.inner 4472 } 4473 } 4474 #[repr(C)] 4475 #[derive(Copy, Clone, Default, Debug)] 4476 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageResolve.html>"] 4477 pub struct ImageResolve { 4478 pub src_subresource: ImageSubresourceLayers, 4479 pub src_offset: Offset3D, 4480 pub dst_subresource: ImageSubresourceLayers, 4481 pub dst_offset: Offset3D, 4482 pub extent: Extent3D, 4483 } 4484 impl ImageResolve { builder<'a>() -> ImageResolveBuilder<'a>4485 pub fn builder<'a>() -> ImageResolveBuilder<'a> { 4486 ImageResolveBuilder { 4487 inner: ImageResolve::default(), 4488 marker: ::std::marker::PhantomData, 4489 } 4490 } 4491 } 4492 #[repr(transparent)] 4493 pub struct ImageResolveBuilder<'a> { 4494 inner: ImageResolve, 4495 marker: ::std::marker::PhantomData<&'a ()>, 4496 } 4497 impl<'a> ::std::ops::Deref for ImageResolveBuilder<'a> { 4498 type Target = ImageResolve; deref(&self) -> &Self::Target4499 fn deref(&self) -> &Self::Target { 4500 &self.inner 4501 } 4502 } 4503 impl<'a> ::std::ops::DerefMut for ImageResolveBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4504 fn deref_mut(&mut self) -> &mut Self::Target { 4505 &mut self.inner 4506 } 4507 } 4508 impl<'a> ImageResolveBuilder<'a> { src_subresource( mut self, src_subresource: ImageSubresourceLayers, ) -> ImageResolveBuilder<'a>4509 pub fn src_subresource( 4510 mut self, 4511 src_subresource: ImageSubresourceLayers, 4512 ) -> ImageResolveBuilder<'a> { 4513 self.inner.src_subresource = src_subresource; 4514 self 4515 } src_offset(mut self, src_offset: Offset3D) -> ImageResolveBuilder<'a>4516 pub fn src_offset(mut self, src_offset: Offset3D) -> ImageResolveBuilder<'a> { 4517 self.inner.src_offset = src_offset; 4518 self 4519 } dst_subresource( mut self, dst_subresource: ImageSubresourceLayers, ) -> ImageResolveBuilder<'a>4520 pub fn dst_subresource( 4521 mut self, 4522 dst_subresource: ImageSubresourceLayers, 4523 ) -> ImageResolveBuilder<'a> { 4524 self.inner.dst_subresource = dst_subresource; 4525 self 4526 } dst_offset(mut self, dst_offset: Offset3D) -> ImageResolveBuilder<'a>4527 pub fn dst_offset(mut self, dst_offset: Offset3D) -> ImageResolveBuilder<'a> { 4528 self.inner.dst_offset = dst_offset; 4529 self 4530 } extent(mut self, extent: Extent3D) -> ImageResolveBuilder<'a>4531 pub fn extent(mut self, extent: Extent3D) -> ImageResolveBuilder<'a> { 4532 self.inner.extent = extent; 4533 self 4534 } 4535 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4536 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4537 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ImageResolve4538 pub fn build(self) -> ImageResolve { 4539 self.inner 4540 } 4541 } 4542 #[repr(C)] 4543 #[derive(Copy, Clone, Debug)] 4544 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderModuleCreateInfo.html>"] 4545 pub struct ShaderModuleCreateInfo { 4546 pub s_type: StructureType, 4547 pub p_next: *const c_void, 4548 pub flags: ShaderModuleCreateFlags, 4549 pub code_size: usize, 4550 pub p_code: *const u32, 4551 } 4552 impl ::std::default::Default for ShaderModuleCreateInfo { default() -> ShaderModuleCreateInfo4553 fn default() -> ShaderModuleCreateInfo { 4554 ShaderModuleCreateInfo { 4555 s_type: StructureType::SHADER_MODULE_CREATE_INFO, 4556 p_next: ::std::ptr::null(), 4557 flags: ShaderModuleCreateFlags::default(), 4558 code_size: usize::default(), 4559 p_code: ::std::ptr::null(), 4560 } 4561 } 4562 } 4563 impl ShaderModuleCreateInfo { builder<'a>() -> ShaderModuleCreateInfoBuilder<'a>4564 pub fn builder<'a>() -> ShaderModuleCreateInfoBuilder<'a> { 4565 ShaderModuleCreateInfoBuilder { 4566 inner: ShaderModuleCreateInfo::default(), 4567 marker: ::std::marker::PhantomData, 4568 } 4569 } 4570 } 4571 #[repr(transparent)] 4572 pub struct ShaderModuleCreateInfoBuilder<'a> { 4573 inner: ShaderModuleCreateInfo, 4574 marker: ::std::marker::PhantomData<&'a ()>, 4575 } 4576 pub unsafe trait ExtendsShaderModuleCreateInfo {} 4577 impl<'a> ::std::ops::Deref for ShaderModuleCreateInfoBuilder<'a> { 4578 type Target = ShaderModuleCreateInfo; deref(&self) -> &Self::Target4579 fn deref(&self) -> &Self::Target { 4580 &self.inner 4581 } 4582 } 4583 impl<'a> ::std::ops::DerefMut for ShaderModuleCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4584 fn deref_mut(&mut self) -> &mut Self::Target { 4585 &mut self.inner 4586 } 4587 } 4588 impl<'a> ShaderModuleCreateInfoBuilder<'a> { flags(mut self, flags: ShaderModuleCreateFlags) -> ShaderModuleCreateInfoBuilder<'a>4589 pub fn flags(mut self, flags: ShaderModuleCreateFlags) -> ShaderModuleCreateInfoBuilder<'a> { 4590 self.inner.flags = flags; 4591 self 4592 } code(mut self, code: &'a [u32]) -> ShaderModuleCreateInfoBuilder<'a>4593 pub fn code(mut self, code: &'a [u32]) -> ShaderModuleCreateInfoBuilder<'a> { 4594 self.inner.code_size = code.len() * 4; 4595 self.inner.p_code = code.as_ptr() as *const u32; 4596 self 4597 } 4598 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 4599 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 4600 #[doc = r" valid extension structs can be pushed into the chain."] 4601 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 4602 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsShaderModuleCreateInfo>( mut self, next: &'a mut T, ) -> ShaderModuleCreateInfoBuilder<'a>4603 pub fn push_next<T: ExtendsShaderModuleCreateInfo>( 4604 mut self, 4605 next: &'a mut T, 4606 ) -> ShaderModuleCreateInfoBuilder<'a> { 4607 unsafe { 4608 let next_ptr = next as *mut T as *mut BaseOutStructure; 4609 let last_next = ptr_chain_iter(next).last().unwrap(); 4610 (*last_next).p_next = self.inner.p_next as _; 4611 self.inner.p_next = next_ptr as _; 4612 } 4613 self 4614 } 4615 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4616 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4617 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ShaderModuleCreateInfo4618 pub fn build(self) -> ShaderModuleCreateInfo { 4619 self.inner 4620 } 4621 } 4622 #[repr(C)] 4623 #[derive(Copy, Clone, Debug)] 4624 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayoutBinding.html>"] 4625 pub struct DescriptorSetLayoutBinding { 4626 pub binding: u32, 4627 pub descriptor_type: DescriptorType, 4628 pub descriptor_count: u32, 4629 pub stage_flags: ShaderStageFlags, 4630 pub p_immutable_samplers: *const Sampler, 4631 } 4632 impl ::std::default::Default for DescriptorSetLayoutBinding { default() -> DescriptorSetLayoutBinding4633 fn default() -> DescriptorSetLayoutBinding { 4634 DescriptorSetLayoutBinding { 4635 binding: u32::default(), 4636 descriptor_type: DescriptorType::default(), 4637 descriptor_count: u32::default(), 4638 stage_flags: ShaderStageFlags::default(), 4639 p_immutable_samplers: ::std::ptr::null(), 4640 } 4641 } 4642 } 4643 impl DescriptorSetLayoutBinding { builder<'a>() -> DescriptorSetLayoutBindingBuilder<'a>4644 pub fn builder<'a>() -> DescriptorSetLayoutBindingBuilder<'a> { 4645 DescriptorSetLayoutBindingBuilder { 4646 inner: DescriptorSetLayoutBinding::default(), 4647 marker: ::std::marker::PhantomData, 4648 } 4649 } 4650 } 4651 #[repr(transparent)] 4652 pub struct DescriptorSetLayoutBindingBuilder<'a> { 4653 inner: DescriptorSetLayoutBinding, 4654 marker: ::std::marker::PhantomData<&'a ()>, 4655 } 4656 impl<'a> ::std::ops::Deref for DescriptorSetLayoutBindingBuilder<'a> { 4657 type Target = DescriptorSetLayoutBinding; deref(&self) -> &Self::Target4658 fn deref(&self) -> &Self::Target { 4659 &self.inner 4660 } 4661 } 4662 impl<'a> ::std::ops::DerefMut for DescriptorSetLayoutBindingBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4663 fn deref_mut(&mut self) -> &mut Self::Target { 4664 &mut self.inner 4665 } 4666 } 4667 impl<'a> DescriptorSetLayoutBindingBuilder<'a> { binding(mut self, binding: u32) -> DescriptorSetLayoutBindingBuilder<'a>4668 pub fn binding(mut self, binding: u32) -> DescriptorSetLayoutBindingBuilder<'a> { 4669 self.inner.binding = binding; 4670 self 4671 } descriptor_type( mut self, descriptor_type: DescriptorType, ) -> DescriptorSetLayoutBindingBuilder<'a>4672 pub fn descriptor_type( 4673 mut self, 4674 descriptor_type: DescriptorType, 4675 ) -> DescriptorSetLayoutBindingBuilder<'a> { 4676 self.inner.descriptor_type = descriptor_type; 4677 self 4678 } descriptor_count( mut self, descriptor_count: u32, ) -> DescriptorSetLayoutBindingBuilder<'a>4679 pub fn descriptor_count( 4680 mut self, 4681 descriptor_count: u32, 4682 ) -> DescriptorSetLayoutBindingBuilder<'a> { 4683 self.inner.descriptor_count = descriptor_count; 4684 self 4685 } stage_flags( mut self, stage_flags: ShaderStageFlags, ) -> DescriptorSetLayoutBindingBuilder<'a>4686 pub fn stage_flags( 4687 mut self, 4688 stage_flags: ShaderStageFlags, 4689 ) -> DescriptorSetLayoutBindingBuilder<'a> { 4690 self.inner.stage_flags = stage_flags; 4691 self 4692 } immutable_samplers( mut self, immutable_samplers: &'a [Sampler], ) -> DescriptorSetLayoutBindingBuilder<'a>4693 pub fn immutable_samplers( 4694 mut self, 4695 immutable_samplers: &'a [Sampler], 4696 ) -> DescriptorSetLayoutBindingBuilder<'a> { 4697 self.inner.descriptor_count = immutable_samplers.len() as _; 4698 self.inner.p_immutable_samplers = immutable_samplers.as_ptr(); 4699 self 4700 } 4701 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4702 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4703 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> DescriptorSetLayoutBinding4704 pub fn build(self) -> DescriptorSetLayoutBinding { 4705 self.inner 4706 } 4707 } 4708 #[repr(C)] 4709 #[derive(Copy, Clone, Debug)] 4710 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayoutCreateInfo.html>"] 4711 pub struct DescriptorSetLayoutCreateInfo { 4712 pub s_type: StructureType, 4713 pub p_next: *const c_void, 4714 pub flags: DescriptorSetLayoutCreateFlags, 4715 pub binding_count: u32, 4716 pub p_bindings: *const DescriptorSetLayoutBinding, 4717 } 4718 impl ::std::default::Default for DescriptorSetLayoutCreateInfo { default() -> DescriptorSetLayoutCreateInfo4719 fn default() -> DescriptorSetLayoutCreateInfo { 4720 DescriptorSetLayoutCreateInfo { 4721 s_type: StructureType::DESCRIPTOR_SET_LAYOUT_CREATE_INFO, 4722 p_next: ::std::ptr::null(), 4723 flags: DescriptorSetLayoutCreateFlags::default(), 4724 binding_count: u32::default(), 4725 p_bindings: ::std::ptr::null(), 4726 } 4727 } 4728 } 4729 impl DescriptorSetLayoutCreateInfo { builder<'a>() -> DescriptorSetLayoutCreateInfoBuilder<'a>4730 pub fn builder<'a>() -> DescriptorSetLayoutCreateInfoBuilder<'a> { 4731 DescriptorSetLayoutCreateInfoBuilder { 4732 inner: DescriptorSetLayoutCreateInfo::default(), 4733 marker: ::std::marker::PhantomData, 4734 } 4735 } 4736 } 4737 #[repr(transparent)] 4738 pub struct DescriptorSetLayoutCreateInfoBuilder<'a> { 4739 inner: DescriptorSetLayoutCreateInfo, 4740 marker: ::std::marker::PhantomData<&'a ()>, 4741 } 4742 pub unsafe trait ExtendsDescriptorSetLayoutCreateInfo {} 4743 impl<'a> ::std::ops::Deref for DescriptorSetLayoutCreateInfoBuilder<'a> { 4744 type Target = DescriptorSetLayoutCreateInfo; deref(&self) -> &Self::Target4745 fn deref(&self) -> &Self::Target { 4746 &self.inner 4747 } 4748 } 4749 impl<'a> ::std::ops::DerefMut for DescriptorSetLayoutCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4750 fn deref_mut(&mut self) -> &mut Self::Target { 4751 &mut self.inner 4752 } 4753 } 4754 impl<'a> DescriptorSetLayoutCreateInfoBuilder<'a> { flags( mut self, flags: DescriptorSetLayoutCreateFlags, ) -> DescriptorSetLayoutCreateInfoBuilder<'a>4755 pub fn flags( 4756 mut self, 4757 flags: DescriptorSetLayoutCreateFlags, 4758 ) -> DescriptorSetLayoutCreateInfoBuilder<'a> { 4759 self.inner.flags = flags; 4760 self 4761 } bindings( mut self, bindings: &'a [DescriptorSetLayoutBinding], ) -> DescriptorSetLayoutCreateInfoBuilder<'a>4762 pub fn bindings( 4763 mut self, 4764 bindings: &'a [DescriptorSetLayoutBinding], 4765 ) -> DescriptorSetLayoutCreateInfoBuilder<'a> { 4766 self.inner.binding_count = bindings.len() as _; 4767 self.inner.p_bindings = bindings.as_ptr(); 4768 self 4769 } 4770 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 4771 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 4772 #[doc = r" valid extension structs can be pushed into the chain."] 4773 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 4774 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsDescriptorSetLayoutCreateInfo>( mut self, next: &'a mut T, ) -> DescriptorSetLayoutCreateInfoBuilder<'a>4775 pub fn push_next<T: ExtendsDescriptorSetLayoutCreateInfo>( 4776 mut self, 4777 next: &'a mut T, 4778 ) -> DescriptorSetLayoutCreateInfoBuilder<'a> { 4779 unsafe { 4780 let next_ptr = next as *mut T as *mut BaseOutStructure; 4781 let last_next = ptr_chain_iter(next).last().unwrap(); 4782 (*last_next).p_next = self.inner.p_next as _; 4783 self.inner.p_next = next_ptr as _; 4784 } 4785 self 4786 } 4787 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4788 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4789 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> DescriptorSetLayoutCreateInfo4790 pub fn build(self) -> DescriptorSetLayoutCreateInfo { 4791 self.inner 4792 } 4793 } 4794 #[repr(C)] 4795 #[derive(Copy, Clone, Default, Debug)] 4796 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPoolSize.html>"] 4797 pub struct DescriptorPoolSize { 4798 pub ty: DescriptorType, 4799 pub descriptor_count: u32, 4800 } 4801 impl DescriptorPoolSize { builder<'a>() -> DescriptorPoolSizeBuilder<'a>4802 pub fn builder<'a>() -> DescriptorPoolSizeBuilder<'a> { 4803 DescriptorPoolSizeBuilder { 4804 inner: DescriptorPoolSize::default(), 4805 marker: ::std::marker::PhantomData, 4806 } 4807 } 4808 } 4809 #[repr(transparent)] 4810 pub struct DescriptorPoolSizeBuilder<'a> { 4811 inner: DescriptorPoolSize, 4812 marker: ::std::marker::PhantomData<&'a ()>, 4813 } 4814 impl<'a> ::std::ops::Deref for DescriptorPoolSizeBuilder<'a> { 4815 type Target = DescriptorPoolSize; deref(&self) -> &Self::Target4816 fn deref(&self) -> &Self::Target { 4817 &self.inner 4818 } 4819 } 4820 impl<'a> ::std::ops::DerefMut for DescriptorPoolSizeBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4821 fn deref_mut(&mut self) -> &mut Self::Target { 4822 &mut self.inner 4823 } 4824 } 4825 impl<'a> DescriptorPoolSizeBuilder<'a> { ty(mut self, ty: DescriptorType) -> DescriptorPoolSizeBuilder<'a>4826 pub fn ty(mut self, ty: DescriptorType) -> DescriptorPoolSizeBuilder<'a> { 4827 self.inner.ty = ty; 4828 self 4829 } descriptor_count(mut self, descriptor_count: u32) -> DescriptorPoolSizeBuilder<'a>4830 pub fn descriptor_count(mut self, descriptor_count: u32) -> DescriptorPoolSizeBuilder<'a> { 4831 self.inner.descriptor_count = descriptor_count; 4832 self 4833 } 4834 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4835 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4836 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> DescriptorPoolSize4837 pub fn build(self) -> DescriptorPoolSize { 4838 self.inner 4839 } 4840 } 4841 #[repr(C)] 4842 #[derive(Copy, Clone, Debug)] 4843 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPoolCreateInfo.html>"] 4844 pub struct DescriptorPoolCreateInfo { 4845 pub s_type: StructureType, 4846 pub p_next: *const c_void, 4847 pub flags: DescriptorPoolCreateFlags, 4848 pub max_sets: u32, 4849 pub pool_size_count: u32, 4850 pub p_pool_sizes: *const DescriptorPoolSize, 4851 } 4852 impl ::std::default::Default for DescriptorPoolCreateInfo { default() -> DescriptorPoolCreateInfo4853 fn default() -> DescriptorPoolCreateInfo { 4854 DescriptorPoolCreateInfo { 4855 s_type: StructureType::DESCRIPTOR_POOL_CREATE_INFO, 4856 p_next: ::std::ptr::null(), 4857 flags: DescriptorPoolCreateFlags::default(), 4858 max_sets: u32::default(), 4859 pool_size_count: u32::default(), 4860 p_pool_sizes: ::std::ptr::null(), 4861 } 4862 } 4863 } 4864 impl DescriptorPoolCreateInfo { builder<'a>() -> DescriptorPoolCreateInfoBuilder<'a>4865 pub fn builder<'a>() -> DescriptorPoolCreateInfoBuilder<'a> { 4866 DescriptorPoolCreateInfoBuilder { 4867 inner: DescriptorPoolCreateInfo::default(), 4868 marker: ::std::marker::PhantomData, 4869 } 4870 } 4871 } 4872 #[repr(transparent)] 4873 pub struct DescriptorPoolCreateInfoBuilder<'a> { 4874 inner: DescriptorPoolCreateInfo, 4875 marker: ::std::marker::PhantomData<&'a ()>, 4876 } 4877 pub unsafe trait ExtendsDescriptorPoolCreateInfo {} 4878 impl<'a> ::std::ops::Deref for DescriptorPoolCreateInfoBuilder<'a> { 4879 type Target = DescriptorPoolCreateInfo; deref(&self) -> &Self::Target4880 fn deref(&self) -> &Self::Target { 4881 &self.inner 4882 } 4883 } 4884 impl<'a> ::std::ops::DerefMut for DescriptorPoolCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4885 fn deref_mut(&mut self) -> &mut Self::Target { 4886 &mut self.inner 4887 } 4888 } 4889 impl<'a> DescriptorPoolCreateInfoBuilder<'a> { flags( mut self, flags: DescriptorPoolCreateFlags, ) -> DescriptorPoolCreateInfoBuilder<'a>4890 pub fn flags( 4891 mut self, 4892 flags: DescriptorPoolCreateFlags, 4893 ) -> DescriptorPoolCreateInfoBuilder<'a> { 4894 self.inner.flags = flags; 4895 self 4896 } max_sets(mut self, max_sets: u32) -> DescriptorPoolCreateInfoBuilder<'a>4897 pub fn max_sets(mut self, max_sets: u32) -> DescriptorPoolCreateInfoBuilder<'a> { 4898 self.inner.max_sets = max_sets; 4899 self 4900 } pool_sizes( mut self, pool_sizes: &'a [DescriptorPoolSize], ) -> DescriptorPoolCreateInfoBuilder<'a>4901 pub fn pool_sizes( 4902 mut self, 4903 pool_sizes: &'a [DescriptorPoolSize], 4904 ) -> DescriptorPoolCreateInfoBuilder<'a> { 4905 self.inner.pool_size_count = pool_sizes.len() as _; 4906 self.inner.p_pool_sizes = pool_sizes.as_ptr(); 4907 self 4908 } 4909 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 4910 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 4911 #[doc = r" valid extension structs can be pushed into the chain."] 4912 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 4913 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsDescriptorPoolCreateInfo>( mut self, next: &'a mut T, ) -> DescriptorPoolCreateInfoBuilder<'a>4914 pub fn push_next<T: ExtendsDescriptorPoolCreateInfo>( 4915 mut self, 4916 next: &'a mut T, 4917 ) -> DescriptorPoolCreateInfoBuilder<'a> { 4918 unsafe { 4919 let next_ptr = next as *mut T as *mut BaseOutStructure; 4920 let last_next = ptr_chain_iter(next).last().unwrap(); 4921 (*last_next).p_next = self.inner.p_next as _; 4922 self.inner.p_next = next_ptr as _; 4923 } 4924 self 4925 } 4926 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 4927 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 4928 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> DescriptorPoolCreateInfo4929 pub fn build(self) -> DescriptorPoolCreateInfo { 4930 self.inner 4931 } 4932 } 4933 #[repr(C)] 4934 #[derive(Copy, Clone, Debug)] 4935 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetAllocateInfo.html>"] 4936 pub struct DescriptorSetAllocateInfo { 4937 pub s_type: StructureType, 4938 pub p_next: *const c_void, 4939 pub descriptor_pool: DescriptorPool, 4940 pub descriptor_set_count: u32, 4941 pub p_set_layouts: *const DescriptorSetLayout, 4942 } 4943 impl ::std::default::Default for DescriptorSetAllocateInfo { default() -> DescriptorSetAllocateInfo4944 fn default() -> DescriptorSetAllocateInfo { 4945 DescriptorSetAllocateInfo { 4946 s_type: StructureType::DESCRIPTOR_SET_ALLOCATE_INFO, 4947 p_next: ::std::ptr::null(), 4948 descriptor_pool: DescriptorPool::default(), 4949 descriptor_set_count: u32::default(), 4950 p_set_layouts: ::std::ptr::null(), 4951 } 4952 } 4953 } 4954 impl DescriptorSetAllocateInfo { builder<'a>() -> DescriptorSetAllocateInfoBuilder<'a>4955 pub fn builder<'a>() -> DescriptorSetAllocateInfoBuilder<'a> { 4956 DescriptorSetAllocateInfoBuilder { 4957 inner: DescriptorSetAllocateInfo::default(), 4958 marker: ::std::marker::PhantomData, 4959 } 4960 } 4961 } 4962 #[repr(transparent)] 4963 pub struct DescriptorSetAllocateInfoBuilder<'a> { 4964 inner: DescriptorSetAllocateInfo, 4965 marker: ::std::marker::PhantomData<&'a ()>, 4966 } 4967 pub unsafe trait ExtendsDescriptorSetAllocateInfo {} 4968 impl<'a> ::std::ops::Deref for DescriptorSetAllocateInfoBuilder<'a> { 4969 type Target = DescriptorSetAllocateInfo; deref(&self) -> &Self::Target4970 fn deref(&self) -> &Self::Target { 4971 &self.inner 4972 } 4973 } 4974 impl<'a> ::std::ops::DerefMut for DescriptorSetAllocateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target4975 fn deref_mut(&mut self) -> &mut Self::Target { 4976 &mut self.inner 4977 } 4978 } 4979 impl<'a> DescriptorSetAllocateInfoBuilder<'a> { descriptor_pool( mut self, descriptor_pool: DescriptorPool, ) -> DescriptorSetAllocateInfoBuilder<'a>4980 pub fn descriptor_pool( 4981 mut self, 4982 descriptor_pool: DescriptorPool, 4983 ) -> DescriptorSetAllocateInfoBuilder<'a> { 4984 self.inner.descriptor_pool = descriptor_pool; 4985 self 4986 } set_layouts( mut self, set_layouts: &'a [DescriptorSetLayout], ) -> DescriptorSetAllocateInfoBuilder<'a>4987 pub fn set_layouts( 4988 mut self, 4989 set_layouts: &'a [DescriptorSetLayout], 4990 ) -> DescriptorSetAllocateInfoBuilder<'a> { 4991 self.inner.descriptor_set_count = set_layouts.len() as _; 4992 self.inner.p_set_layouts = set_layouts.as_ptr(); 4993 self 4994 } 4995 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 4996 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 4997 #[doc = r" valid extension structs can be pushed into the chain."] 4998 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 4999 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsDescriptorSetAllocateInfo>( mut self, next: &'a mut T, ) -> DescriptorSetAllocateInfoBuilder<'a>5000 pub fn push_next<T: ExtendsDescriptorSetAllocateInfo>( 5001 mut self, 5002 next: &'a mut T, 5003 ) -> DescriptorSetAllocateInfoBuilder<'a> { 5004 unsafe { 5005 let next_ptr = next as *mut T as *mut BaseOutStructure; 5006 let last_next = ptr_chain_iter(next).last().unwrap(); 5007 (*last_next).p_next = self.inner.p_next as _; 5008 self.inner.p_next = next_ptr as _; 5009 } 5010 self 5011 } 5012 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5013 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5014 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> DescriptorSetAllocateInfo5015 pub fn build(self) -> DescriptorSetAllocateInfo { 5016 self.inner 5017 } 5018 } 5019 #[repr(C)] 5020 #[derive(Copy, Clone, Default, Debug)] 5021 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSpecializationMapEntry.html>"] 5022 pub struct SpecializationMapEntry { 5023 pub constant_id: u32, 5024 pub offset: u32, 5025 pub size: usize, 5026 } 5027 impl SpecializationMapEntry { builder<'a>() -> SpecializationMapEntryBuilder<'a>5028 pub fn builder<'a>() -> SpecializationMapEntryBuilder<'a> { 5029 SpecializationMapEntryBuilder { 5030 inner: SpecializationMapEntry::default(), 5031 marker: ::std::marker::PhantomData, 5032 } 5033 } 5034 } 5035 #[repr(transparent)] 5036 pub struct SpecializationMapEntryBuilder<'a> { 5037 inner: SpecializationMapEntry, 5038 marker: ::std::marker::PhantomData<&'a ()>, 5039 } 5040 impl<'a> ::std::ops::Deref for SpecializationMapEntryBuilder<'a> { 5041 type Target = SpecializationMapEntry; deref(&self) -> &Self::Target5042 fn deref(&self) -> &Self::Target { 5043 &self.inner 5044 } 5045 } 5046 impl<'a> ::std::ops::DerefMut for SpecializationMapEntryBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5047 fn deref_mut(&mut self) -> &mut Self::Target { 5048 &mut self.inner 5049 } 5050 } 5051 impl<'a> SpecializationMapEntryBuilder<'a> { constant_id(mut self, constant_id: u32) -> SpecializationMapEntryBuilder<'a>5052 pub fn constant_id(mut self, constant_id: u32) -> SpecializationMapEntryBuilder<'a> { 5053 self.inner.constant_id = constant_id; 5054 self 5055 } offset(mut self, offset: u32) -> SpecializationMapEntryBuilder<'a>5056 pub fn offset(mut self, offset: u32) -> SpecializationMapEntryBuilder<'a> { 5057 self.inner.offset = offset; 5058 self 5059 } size(mut self, size: usize) -> SpecializationMapEntryBuilder<'a>5060 pub fn size(mut self, size: usize) -> SpecializationMapEntryBuilder<'a> { 5061 self.inner.size = size; 5062 self 5063 } 5064 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5065 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5066 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SpecializationMapEntry5067 pub fn build(self) -> SpecializationMapEntry { 5068 self.inner 5069 } 5070 } 5071 #[repr(C)] 5072 #[derive(Copy, Clone, Debug)] 5073 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSpecializationInfo.html>"] 5074 pub struct SpecializationInfo { 5075 pub map_entry_count: u32, 5076 pub p_map_entries: *const SpecializationMapEntry, 5077 pub data_size: usize, 5078 pub p_data: *const c_void, 5079 } 5080 impl ::std::default::Default for SpecializationInfo { default() -> SpecializationInfo5081 fn default() -> SpecializationInfo { 5082 SpecializationInfo { 5083 map_entry_count: u32::default(), 5084 p_map_entries: ::std::ptr::null(), 5085 data_size: usize::default(), 5086 p_data: ::std::ptr::null(), 5087 } 5088 } 5089 } 5090 impl SpecializationInfo { builder<'a>() -> SpecializationInfoBuilder<'a>5091 pub fn builder<'a>() -> SpecializationInfoBuilder<'a> { 5092 SpecializationInfoBuilder { 5093 inner: SpecializationInfo::default(), 5094 marker: ::std::marker::PhantomData, 5095 } 5096 } 5097 } 5098 #[repr(transparent)] 5099 pub struct SpecializationInfoBuilder<'a> { 5100 inner: SpecializationInfo, 5101 marker: ::std::marker::PhantomData<&'a ()>, 5102 } 5103 impl<'a> ::std::ops::Deref for SpecializationInfoBuilder<'a> { 5104 type Target = SpecializationInfo; deref(&self) -> &Self::Target5105 fn deref(&self) -> &Self::Target { 5106 &self.inner 5107 } 5108 } 5109 impl<'a> ::std::ops::DerefMut for SpecializationInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5110 fn deref_mut(&mut self) -> &mut Self::Target { 5111 &mut self.inner 5112 } 5113 } 5114 impl<'a> SpecializationInfoBuilder<'a> { map_entries( mut self, map_entries: &'a [SpecializationMapEntry], ) -> SpecializationInfoBuilder<'a>5115 pub fn map_entries( 5116 mut self, 5117 map_entries: &'a [SpecializationMapEntry], 5118 ) -> SpecializationInfoBuilder<'a> { 5119 self.inner.map_entry_count = map_entries.len() as _; 5120 self.inner.p_map_entries = map_entries.as_ptr(); 5121 self 5122 } data(mut self, data: &'a [u8]) -> SpecializationInfoBuilder<'a>5123 pub fn data(mut self, data: &'a [u8]) -> SpecializationInfoBuilder<'a> { 5124 self.inner.data_size = data.len() as _; 5125 self.inner.p_data = data.as_ptr() as *const c_void; 5126 self 5127 } 5128 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5129 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5130 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> SpecializationInfo5131 pub fn build(self) -> SpecializationInfo { 5132 self.inner 5133 } 5134 } 5135 #[repr(C)] 5136 #[derive(Copy, Clone, Debug)] 5137 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineShaderStageCreateInfo.html>"] 5138 pub struct PipelineShaderStageCreateInfo { 5139 pub s_type: StructureType, 5140 pub p_next: *const c_void, 5141 pub flags: PipelineShaderStageCreateFlags, 5142 pub stage: ShaderStageFlags, 5143 pub module: ShaderModule, 5144 pub p_name: *const c_char, 5145 pub p_specialization_info: *const SpecializationInfo, 5146 } 5147 impl ::std::default::Default for PipelineShaderStageCreateInfo { default() -> PipelineShaderStageCreateInfo5148 fn default() -> PipelineShaderStageCreateInfo { 5149 PipelineShaderStageCreateInfo { 5150 s_type: StructureType::PIPELINE_SHADER_STAGE_CREATE_INFO, 5151 p_next: ::std::ptr::null(), 5152 flags: PipelineShaderStageCreateFlags::default(), 5153 stage: ShaderStageFlags::default(), 5154 module: ShaderModule::default(), 5155 p_name: ::std::ptr::null(), 5156 p_specialization_info: ::std::ptr::null(), 5157 } 5158 } 5159 } 5160 impl PipelineShaderStageCreateInfo { builder<'a>() -> PipelineShaderStageCreateInfoBuilder<'a>5161 pub fn builder<'a>() -> PipelineShaderStageCreateInfoBuilder<'a> { 5162 PipelineShaderStageCreateInfoBuilder { 5163 inner: PipelineShaderStageCreateInfo::default(), 5164 marker: ::std::marker::PhantomData, 5165 } 5166 } 5167 } 5168 #[repr(transparent)] 5169 pub struct PipelineShaderStageCreateInfoBuilder<'a> { 5170 inner: PipelineShaderStageCreateInfo, 5171 marker: ::std::marker::PhantomData<&'a ()>, 5172 } 5173 pub unsafe trait ExtendsPipelineShaderStageCreateInfo {} 5174 impl<'a> ::std::ops::Deref for PipelineShaderStageCreateInfoBuilder<'a> { 5175 type Target = PipelineShaderStageCreateInfo; deref(&self) -> &Self::Target5176 fn deref(&self) -> &Self::Target { 5177 &self.inner 5178 } 5179 } 5180 impl<'a> ::std::ops::DerefMut for PipelineShaderStageCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5181 fn deref_mut(&mut self) -> &mut Self::Target { 5182 &mut self.inner 5183 } 5184 } 5185 impl<'a> PipelineShaderStageCreateInfoBuilder<'a> { flags( mut self, flags: PipelineShaderStageCreateFlags, ) -> PipelineShaderStageCreateInfoBuilder<'a>5186 pub fn flags( 5187 mut self, 5188 flags: PipelineShaderStageCreateFlags, 5189 ) -> PipelineShaderStageCreateInfoBuilder<'a> { 5190 self.inner.flags = flags; 5191 self 5192 } stage(mut self, stage: ShaderStageFlags) -> PipelineShaderStageCreateInfoBuilder<'a>5193 pub fn stage(mut self, stage: ShaderStageFlags) -> PipelineShaderStageCreateInfoBuilder<'a> { 5194 self.inner.stage = stage; 5195 self 5196 } module(mut self, module: ShaderModule) -> PipelineShaderStageCreateInfoBuilder<'a>5197 pub fn module(mut self, module: ShaderModule) -> PipelineShaderStageCreateInfoBuilder<'a> { 5198 self.inner.module = module; 5199 self 5200 } name(mut self, name: &'a ::std::ffi::CStr) -> PipelineShaderStageCreateInfoBuilder<'a>5201 pub fn name(mut self, name: &'a ::std::ffi::CStr) -> PipelineShaderStageCreateInfoBuilder<'a> { 5202 self.inner.p_name = name.as_ptr(); 5203 self 5204 } specialization_info( mut self, specialization_info: &'a SpecializationInfo, ) -> PipelineShaderStageCreateInfoBuilder<'a>5205 pub fn specialization_info( 5206 mut self, 5207 specialization_info: &'a SpecializationInfo, 5208 ) -> PipelineShaderStageCreateInfoBuilder<'a> { 5209 self.inner.p_specialization_info = specialization_info; 5210 self 5211 } 5212 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 5213 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 5214 #[doc = r" valid extension structs can be pushed into the chain."] 5215 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 5216 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineShaderStageCreateInfo>( mut self, next: &'a mut T, ) -> PipelineShaderStageCreateInfoBuilder<'a>5217 pub fn push_next<T: ExtendsPipelineShaderStageCreateInfo>( 5218 mut self, 5219 next: &'a mut T, 5220 ) -> PipelineShaderStageCreateInfoBuilder<'a> { 5221 unsafe { 5222 let next_ptr = next as *mut T as *mut BaseOutStructure; 5223 let last_next = ptr_chain_iter(next).last().unwrap(); 5224 (*last_next).p_next = self.inner.p_next as _; 5225 self.inner.p_next = next_ptr as _; 5226 } 5227 self 5228 } 5229 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5230 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5231 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineShaderStageCreateInfo5232 pub fn build(self) -> PipelineShaderStageCreateInfo { 5233 self.inner 5234 } 5235 } 5236 #[repr(C)] 5237 #[derive(Copy, Clone, Debug)] 5238 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkComputePipelineCreateInfo.html>"] 5239 pub struct ComputePipelineCreateInfo { 5240 pub s_type: StructureType, 5241 pub p_next: *const c_void, 5242 pub flags: PipelineCreateFlags, 5243 pub stage: PipelineShaderStageCreateInfo, 5244 pub layout: PipelineLayout, 5245 pub base_pipeline_handle: Pipeline, 5246 pub base_pipeline_index: i32, 5247 } 5248 impl ::std::default::Default for ComputePipelineCreateInfo { default() -> ComputePipelineCreateInfo5249 fn default() -> ComputePipelineCreateInfo { 5250 ComputePipelineCreateInfo { 5251 s_type: StructureType::COMPUTE_PIPELINE_CREATE_INFO, 5252 p_next: ::std::ptr::null(), 5253 flags: PipelineCreateFlags::default(), 5254 stage: PipelineShaderStageCreateInfo::default(), 5255 layout: PipelineLayout::default(), 5256 base_pipeline_handle: Pipeline::default(), 5257 base_pipeline_index: i32::default(), 5258 } 5259 } 5260 } 5261 impl ComputePipelineCreateInfo { builder<'a>() -> ComputePipelineCreateInfoBuilder<'a>5262 pub fn builder<'a>() -> ComputePipelineCreateInfoBuilder<'a> { 5263 ComputePipelineCreateInfoBuilder { 5264 inner: ComputePipelineCreateInfo::default(), 5265 marker: ::std::marker::PhantomData, 5266 } 5267 } 5268 } 5269 #[repr(transparent)] 5270 pub struct ComputePipelineCreateInfoBuilder<'a> { 5271 inner: ComputePipelineCreateInfo, 5272 marker: ::std::marker::PhantomData<&'a ()>, 5273 } 5274 pub unsafe trait ExtendsComputePipelineCreateInfo {} 5275 impl<'a> ::std::ops::Deref for ComputePipelineCreateInfoBuilder<'a> { 5276 type Target = ComputePipelineCreateInfo; deref(&self) -> &Self::Target5277 fn deref(&self) -> &Self::Target { 5278 &self.inner 5279 } 5280 } 5281 impl<'a> ::std::ops::DerefMut for ComputePipelineCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5282 fn deref_mut(&mut self) -> &mut Self::Target { 5283 &mut self.inner 5284 } 5285 } 5286 impl<'a> ComputePipelineCreateInfoBuilder<'a> { flags(mut self, flags: PipelineCreateFlags) -> ComputePipelineCreateInfoBuilder<'a>5287 pub fn flags(mut self, flags: PipelineCreateFlags) -> ComputePipelineCreateInfoBuilder<'a> { 5288 self.inner.flags = flags; 5289 self 5290 } stage( mut self, stage: PipelineShaderStageCreateInfo, ) -> ComputePipelineCreateInfoBuilder<'a>5291 pub fn stage( 5292 mut self, 5293 stage: PipelineShaderStageCreateInfo, 5294 ) -> ComputePipelineCreateInfoBuilder<'a> { 5295 self.inner.stage = stage; 5296 self 5297 } layout(mut self, layout: PipelineLayout) -> ComputePipelineCreateInfoBuilder<'a>5298 pub fn layout(mut self, layout: PipelineLayout) -> ComputePipelineCreateInfoBuilder<'a> { 5299 self.inner.layout = layout; 5300 self 5301 } base_pipeline_handle( mut self, base_pipeline_handle: Pipeline, ) -> ComputePipelineCreateInfoBuilder<'a>5302 pub fn base_pipeline_handle( 5303 mut self, 5304 base_pipeline_handle: Pipeline, 5305 ) -> ComputePipelineCreateInfoBuilder<'a> { 5306 self.inner.base_pipeline_handle = base_pipeline_handle; 5307 self 5308 } base_pipeline_index( mut self, base_pipeline_index: i32, ) -> ComputePipelineCreateInfoBuilder<'a>5309 pub fn base_pipeline_index( 5310 mut self, 5311 base_pipeline_index: i32, 5312 ) -> ComputePipelineCreateInfoBuilder<'a> { 5313 self.inner.base_pipeline_index = base_pipeline_index; 5314 self 5315 } 5316 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 5317 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 5318 #[doc = r" valid extension structs can be pushed into the chain."] 5319 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 5320 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsComputePipelineCreateInfo>( mut self, next: &'a mut T, ) -> ComputePipelineCreateInfoBuilder<'a>5321 pub fn push_next<T: ExtendsComputePipelineCreateInfo>( 5322 mut self, 5323 next: &'a mut T, 5324 ) -> ComputePipelineCreateInfoBuilder<'a> { 5325 unsafe { 5326 let next_ptr = next as *mut T as *mut BaseOutStructure; 5327 let last_next = ptr_chain_iter(next).last().unwrap(); 5328 (*last_next).p_next = self.inner.p_next as _; 5329 self.inner.p_next = next_ptr as _; 5330 } 5331 self 5332 } 5333 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5334 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5335 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> ComputePipelineCreateInfo5336 pub fn build(self) -> ComputePipelineCreateInfo { 5337 self.inner 5338 } 5339 } 5340 #[repr(C)] 5341 #[derive(Copy, Clone, Default, Debug)] 5342 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVertexInputBindingDescription.html>"] 5343 pub struct VertexInputBindingDescription { 5344 pub binding: u32, 5345 pub stride: u32, 5346 pub input_rate: VertexInputRate, 5347 } 5348 impl VertexInputBindingDescription { builder<'a>() -> VertexInputBindingDescriptionBuilder<'a>5349 pub fn builder<'a>() -> VertexInputBindingDescriptionBuilder<'a> { 5350 VertexInputBindingDescriptionBuilder { 5351 inner: VertexInputBindingDescription::default(), 5352 marker: ::std::marker::PhantomData, 5353 } 5354 } 5355 } 5356 #[repr(transparent)] 5357 pub struct VertexInputBindingDescriptionBuilder<'a> { 5358 inner: VertexInputBindingDescription, 5359 marker: ::std::marker::PhantomData<&'a ()>, 5360 } 5361 impl<'a> ::std::ops::Deref for VertexInputBindingDescriptionBuilder<'a> { 5362 type Target = VertexInputBindingDescription; deref(&self) -> &Self::Target5363 fn deref(&self) -> &Self::Target { 5364 &self.inner 5365 } 5366 } 5367 impl<'a> ::std::ops::DerefMut for VertexInputBindingDescriptionBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5368 fn deref_mut(&mut self) -> &mut Self::Target { 5369 &mut self.inner 5370 } 5371 } 5372 impl<'a> VertexInputBindingDescriptionBuilder<'a> { binding(mut self, binding: u32) -> VertexInputBindingDescriptionBuilder<'a>5373 pub fn binding(mut self, binding: u32) -> VertexInputBindingDescriptionBuilder<'a> { 5374 self.inner.binding = binding; 5375 self 5376 } stride(mut self, stride: u32) -> VertexInputBindingDescriptionBuilder<'a>5377 pub fn stride(mut self, stride: u32) -> VertexInputBindingDescriptionBuilder<'a> { 5378 self.inner.stride = stride; 5379 self 5380 } input_rate( mut self, input_rate: VertexInputRate, ) -> VertexInputBindingDescriptionBuilder<'a>5381 pub fn input_rate( 5382 mut self, 5383 input_rate: VertexInputRate, 5384 ) -> VertexInputBindingDescriptionBuilder<'a> { 5385 self.inner.input_rate = input_rate; 5386 self 5387 } 5388 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5389 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5390 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> VertexInputBindingDescription5391 pub fn build(self) -> VertexInputBindingDescription { 5392 self.inner 5393 } 5394 } 5395 #[repr(C)] 5396 #[derive(Copy, Clone, Default, Debug)] 5397 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVertexInputAttributeDescription.html>"] 5398 pub struct VertexInputAttributeDescription { 5399 pub location: u32, 5400 pub binding: u32, 5401 pub format: Format, 5402 pub offset: u32, 5403 } 5404 impl VertexInputAttributeDescription { builder<'a>() -> VertexInputAttributeDescriptionBuilder<'a>5405 pub fn builder<'a>() -> VertexInputAttributeDescriptionBuilder<'a> { 5406 VertexInputAttributeDescriptionBuilder { 5407 inner: VertexInputAttributeDescription::default(), 5408 marker: ::std::marker::PhantomData, 5409 } 5410 } 5411 } 5412 #[repr(transparent)] 5413 pub struct VertexInputAttributeDescriptionBuilder<'a> { 5414 inner: VertexInputAttributeDescription, 5415 marker: ::std::marker::PhantomData<&'a ()>, 5416 } 5417 impl<'a> ::std::ops::Deref for VertexInputAttributeDescriptionBuilder<'a> { 5418 type Target = VertexInputAttributeDescription; deref(&self) -> &Self::Target5419 fn deref(&self) -> &Self::Target { 5420 &self.inner 5421 } 5422 } 5423 impl<'a> ::std::ops::DerefMut for VertexInputAttributeDescriptionBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5424 fn deref_mut(&mut self) -> &mut Self::Target { 5425 &mut self.inner 5426 } 5427 } 5428 impl<'a> VertexInputAttributeDescriptionBuilder<'a> { location(mut self, location: u32) -> VertexInputAttributeDescriptionBuilder<'a>5429 pub fn location(mut self, location: u32) -> VertexInputAttributeDescriptionBuilder<'a> { 5430 self.inner.location = location; 5431 self 5432 } binding(mut self, binding: u32) -> VertexInputAttributeDescriptionBuilder<'a>5433 pub fn binding(mut self, binding: u32) -> VertexInputAttributeDescriptionBuilder<'a> { 5434 self.inner.binding = binding; 5435 self 5436 } format(mut self, format: Format) -> VertexInputAttributeDescriptionBuilder<'a>5437 pub fn format(mut self, format: Format) -> VertexInputAttributeDescriptionBuilder<'a> { 5438 self.inner.format = format; 5439 self 5440 } offset(mut self, offset: u32) -> VertexInputAttributeDescriptionBuilder<'a>5441 pub fn offset(mut self, offset: u32) -> VertexInputAttributeDescriptionBuilder<'a> { 5442 self.inner.offset = offset; 5443 self 5444 } 5445 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5446 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5447 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> VertexInputAttributeDescription5448 pub fn build(self) -> VertexInputAttributeDescription { 5449 self.inner 5450 } 5451 } 5452 #[repr(C)] 5453 #[derive(Copy, Clone, Debug)] 5454 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineVertexInputStateCreateInfo.html>"] 5455 pub struct PipelineVertexInputStateCreateInfo { 5456 pub s_type: StructureType, 5457 pub p_next: *const c_void, 5458 pub flags: PipelineVertexInputStateCreateFlags, 5459 pub vertex_binding_description_count: u32, 5460 pub p_vertex_binding_descriptions: *const VertexInputBindingDescription, 5461 pub vertex_attribute_description_count: u32, 5462 pub p_vertex_attribute_descriptions: *const VertexInputAttributeDescription, 5463 } 5464 impl ::std::default::Default for PipelineVertexInputStateCreateInfo { default() -> PipelineVertexInputStateCreateInfo5465 fn default() -> PipelineVertexInputStateCreateInfo { 5466 PipelineVertexInputStateCreateInfo { 5467 s_type: StructureType::PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, 5468 p_next: ::std::ptr::null(), 5469 flags: PipelineVertexInputStateCreateFlags::default(), 5470 vertex_binding_description_count: u32::default(), 5471 p_vertex_binding_descriptions: ::std::ptr::null(), 5472 vertex_attribute_description_count: u32::default(), 5473 p_vertex_attribute_descriptions: ::std::ptr::null(), 5474 } 5475 } 5476 } 5477 impl PipelineVertexInputStateCreateInfo { builder<'a>() -> PipelineVertexInputStateCreateInfoBuilder<'a>5478 pub fn builder<'a>() -> PipelineVertexInputStateCreateInfoBuilder<'a> { 5479 PipelineVertexInputStateCreateInfoBuilder { 5480 inner: PipelineVertexInputStateCreateInfo::default(), 5481 marker: ::std::marker::PhantomData, 5482 } 5483 } 5484 } 5485 #[repr(transparent)] 5486 pub struct PipelineVertexInputStateCreateInfoBuilder<'a> { 5487 inner: PipelineVertexInputStateCreateInfo, 5488 marker: ::std::marker::PhantomData<&'a ()>, 5489 } 5490 pub unsafe trait ExtendsPipelineVertexInputStateCreateInfo {} 5491 impl<'a> ::std::ops::Deref for PipelineVertexInputStateCreateInfoBuilder<'a> { 5492 type Target = PipelineVertexInputStateCreateInfo; deref(&self) -> &Self::Target5493 fn deref(&self) -> &Self::Target { 5494 &self.inner 5495 } 5496 } 5497 impl<'a> ::std::ops::DerefMut for PipelineVertexInputStateCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5498 fn deref_mut(&mut self) -> &mut Self::Target { 5499 &mut self.inner 5500 } 5501 } 5502 impl<'a> PipelineVertexInputStateCreateInfoBuilder<'a> { flags( mut self, flags: PipelineVertexInputStateCreateFlags, ) -> PipelineVertexInputStateCreateInfoBuilder<'a>5503 pub fn flags( 5504 mut self, 5505 flags: PipelineVertexInputStateCreateFlags, 5506 ) -> PipelineVertexInputStateCreateInfoBuilder<'a> { 5507 self.inner.flags = flags; 5508 self 5509 } vertex_binding_descriptions( mut self, vertex_binding_descriptions: &'a [VertexInputBindingDescription], ) -> PipelineVertexInputStateCreateInfoBuilder<'a>5510 pub fn vertex_binding_descriptions( 5511 mut self, 5512 vertex_binding_descriptions: &'a [VertexInputBindingDescription], 5513 ) -> PipelineVertexInputStateCreateInfoBuilder<'a> { 5514 self.inner.vertex_binding_description_count = vertex_binding_descriptions.len() as _; 5515 self.inner.p_vertex_binding_descriptions = vertex_binding_descriptions.as_ptr(); 5516 self 5517 } vertex_attribute_descriptions( mut self, vertex_attribute_descriptions: &'a [VertexInputAttributeDescription], ) -> PipelineVertexInputStateCreateInfoBuilder<'a>5518 pub fn vertex_attribute_descriptions( 5519 mut self, 5520 vertex_attribute_descriptions: &'a [VertexInputAttributeDescription], 5521 ) -> PipelineVertexInputStateCreateInfoBuilder<'a> { 5522 self.inner.vertex_attribute_description_count = vertex_attribute_descriptions.len() as _; 5523 self.inner.p_vertex_attribute_descriptions = vertex_attribute_descriptions.as_ptr(); 5524 self 5525 } 5526 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 5527 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 5528 #[doc = r" valid extension structs can be pushed into the chain."] 5529 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 5530 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineVertexInputStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineVertexInputStateCreateInfoBuilder<'a>5531 pub fn push_next<T: ExtendsPipelineVertexInputStateCreateInfo>( 5532 mut self, 5533 next: &'a mut T, 5534 ) -> PipelineVertexInputStateCreateInfoBuilder<'a> { 5535 unsafe { 5536 let next_ptr = next as *mut T as *mut BaseOutStructure; 5537 let last_next = ptr_chain_iter(next).last().unwrap(); 5538 (*last_next).p_next = self.inner.p_next as _; 5539 self.inner.p_next = next_ptr as _; 5540 } 5541 self 5542 } 5543 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5544 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5545 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineVertexInputStateCreateInfo5546 pub fn build(self) -> PipelineVertexInputStateCreateInfo { 5547 self.inner 5548 } 5549 } 5550 #[repr(C)] 5551 #[derive(Copy, Clone, Debug)] 5552 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineInputAssemblyStateCreateInfo.html>"] 5553 pub struct PipelineInputAssemblyStateCreateInfo { 5554 pub s_type: StructureType, 5555 pub p_next: *const c_void, 5556 pub flags: PipelineInputAssemblyStateCreateFlags, 5557 pub topology: PrimitiveTopology, 5558 pub primitive_restart_enable: Bool32, 5559 } 5560 impl ::std::default::Default for PipelineInputAssemblyStateCreateInfo { default() -> PipelineInputAssemblyStateCreateInfo5561 fn default() -> PipelineInputAssemblyStateCreateInfo { 5562 PipelineInputAssemblyStateCreateInfo { 5563 s_type: StructureType::PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, 5564 p_next: ::std::ptr::null(), 5565 flags: PipelineInputAssemblyStateCreateFlags::default(), 5566 topology: PrimitiveTopology::default(), 5567 primitive_restart_enable: Bool32::default(), 5568 } 5569 } 5570 } 5571 impl PipelineInputAssemblyStateCreateInfo { builder<'a>() -> PipelineInputAssemblyStateCreateInfoBuilder<'a>5572 pub fn builder<'a>() -> PipelineInputAssemblyStateCreateInfoBuilder<'a> { 5573 PipelineInputAssemblyStateCreateInfoBuilder { 5574 inner: PipelineInputAssemblyStateCreateInfo::default(), 5575 marker: ::std::marker::PhantomData, 5576 } 5577 } 5578 } 5579 #[repr(transparent)] 5580 pub struct PipelineInputAssemblyStateCreateInfoBuilder<'a> { 5581 inner: PipelineInputAssemblyStateCreateInfo, 5582 marker: ::std::marker::PhantomData<&'a ()>, 5583 } 5584 pub unsafe trait ExtendsPipelineInputAssemblyStateCreateInfo {} 5585 impl<'a> ::std::ops::Deref for PipelineInputAssemblyStateCreateInfoBuilder<'a> { 5586 type Target = PipelineInputAssemblyStateCreateInfo; deref(&self) -> &Self::Target5587 fn deref(&self) -> &Self::Target { 5588 &self.inner 5589 } 5590 } 5591 impl<'a> ::std::ops::DerefMut for PipelineInputAssemblyStateCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5592 fn deref_mut(&mut self) -> &mut Self::Target { 5593 &mut self.inner 5594 } 5595 } 5596 impl<'a> PipelineInputAssemblyStateCreateInfoBuilder<'a> { flags( mut self, flags: PipelineInputAssemblyStateCreateFlags, ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a>5597 pub fn flags( 5598 mut self, 5599 flags: PipelineInputAssemblyStateCreateFlags, 5600 ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> { 5601 self.inner.flags = flags; 5602 self 5603 } topology( mut self, topology: PrimitiveTopology, ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a>5604 pub fn topology( 5605 mut self, 5606 topology: PrimitiveTopology, 5607 ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> { 5608 self.inner.topology = topology; 5609 self 5610 } primitive_restart_enable( mut self, primitive_restart_enable: bool, ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a>5611 pub fn primitive_restart_enable( 5612 mut self, 5613 primitive_restart_enable: bool, 5614 ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> { 5615 self.inner.primitive_restart_enable = primitive_restart_enable.into(); 5616 self 5617 } 5618 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 5619 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 5620 #[doc = r" valid extension structs can be pushed into the chain."] 5621 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 5622 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineInputAssemblyStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a>5623 pub fn push_next<T: ExtendsPipelineInputAssemblyStateCreateInfo>( 5624 mut self, 5625 next: &'a mut T, 5626 ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> { 5627 unsafe { 5628 let next_ptr = next as *mut T as *mut BaseOutStructure; 5629 let last_next = ptr_chain_iter(next).last().unwrap(); 5630 (*last_next).p_next = self.inner.p_next as _; 5631 self.inner.p_next = next_ptr as _; 5632 } 5633 self 5634 } 5635 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5636 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5637 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineInputAssemblyStateCreateInfo5638 pub fn build(self) -> PipelineInputAssemblyStateCreateInfo { 5639 self.inner 5640 } 5641 } 5642 #[repr(C)] 5643 #[derive(Copy, Clone, Debug)] 5644 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineTessellationStateCreateInfo.html>"] 5645 pub struct PipelineTessellationStateCreateInfo { 5646 pub s_type: StructureType, 5647 pub p_next: *const c_void, 5648 pub flags: PipelineTessellationStateCreateFlags, 5649 pub patch_control_points: u32, 5650 } 5651 impl ::std::default::Default for PipelineTessellationStateCreateInfo { default() -> PipelineTessellationStateCreateInfo5652 fn default() -> PipelineTessellationStateCreateInfo { 5653 PipelineTessellationStateCreateInfo { 5654 s_type: StructureType::PIPELINE_TESSELLATION_STATE_CREATE_INFO, 5655 p_next: ::std::ptr::null(), 5656 flags: PipelineTessellationStateCreateFlags::default(), 5657 patch_control_points: u32::default(), 5658 } 5659 } 5660 } 5661 impl PipelineTessellationStateCreateInfo { builder<'a>() -> PipelineTessellationStateCreateInfoBuilder<'a>5662 pub fn builder<'a>() -> PipelineTessellationStateCreateInfoBuilder<'a> { 5663 PipelineTessellationStateCreateInfoBuilder { 5664 inner: PipelineTessellationStateCreateInfo::default(), 5665 marker: ::std::marker::PhantomData, 5666 } 5667 } 5668 } 5669 #[repr(transparent)] 5670 pub struct PipelineTessellationStateCreateInfoBuilder<'a> { 5671 inner: PipelineTessellationStateCreateInfo, 5672 marker: ::std::marker::PhantomData<&'a ()>, 5673 } 5674 pub unsafe trait ExtendsPipelineTessellationStateCreateInfo {} 5675 impl<'a> ::std::ops::Deref for PipelineTessellationStateCreateInfoBuilder<'a> { 5676 type Target = PipelineTessellationStateCreateInfo; deref(&self) -> &Self::Target5677 fn deref(&self) -> &Self::Target { 5678 &self.inner 5679 } 5680 } 5681 impl<'a> ::std::ops::DerefMut for PipelineTessellationStateCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5682 fn deref_mut(&mut self) -> &mut Self::Target { 5683 &mut self.inner 5684 } 5685 } 5686 impl<'a> PipelineTessellationStateCreateInfoBuilder<'a> { flags( mut self, flags: PipelineTessellationStateCreateFlags, ) -> PipelineTessellationStateCreateInfoBuilder<'a>5687 pub fn flags( 5688 mut self, 5689 flags: PipelineTessellationStateCreateFlags, 5690 ) -> PipelineTessellationStateCreateInfoBuilder<'a> { 5691 self.inner.flags = flags; 5692 self 5693 } patch_control_points( mut self, patch_control_points: u32, ) -> PipelineTessellationStateCreateInfoBuilder<'a>5694 pub fn patch_control_points( 5695 mut self, 5696 patch_control_points: u32, 5697 ) -> PipelineTessellationStateCreateInfoBuilder<'a> { 5698 self.inner.patch_control_points = patch_control_points; 5699 self 5700 } 5701 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 5702 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 5703 #[doc = r" valid extension structs can be pushed into the chain."] 5704 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 5705 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineTessellationStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineTessellationStateCreateInfoBuilder<'a>5706 pub fn push_next<T: ExtendsPipelineTessellationStateCreateInfo>( 5707 mut self, 5708 next: &'a mut T, 5709 ) -> PipelineTessellationStateCreateInfoBuilder<'a> { 5710 unsafe { 5711 let next_ptr = next as *mut T as *mut BaseOutStructure; 5712 let last_next = ptr_chain_iter(next).last().unwrap(); 5713 (*last_next).p_next = self.inner.p_next as _; 5714 self.inner.p_next = next_ptr as _; 5715 } 5716 self 5717 } 5718 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5719 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5720 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineTessellationStateCreateInfo5721 pub fn build(self) -> PipelineTessellationStateCreateInfo { 5722 self.inner 5723 } 5724 } 5725 #[repr(C)] 5726 #[derive(Copy, Clone, Debug)] 5727 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineViewportStateCreateInfo.html>"] 5728 pub struct PipelineViewportStateCreateInfo { 5729 pub s_type: StructureType, 5730 pub p_next: *const c_void, 5731 pub flags: PipelineViewportStateCreateFlags, 5732 pub viewport_count: u32, 5733 pub p_viewports: *const Viewport, 5734 pub scissor_count: u32, 5735 pub p_scissors: *const Rect2D, 5736 } 5737 impl ::std::default::Default for PipelineViewportStateCreateInfo { default() -> PipelineViewportStateCreateInfo5738 fn default() -> PipelineViewportStateCreateInfo { 5739 PipelineViewportStateCreateInfo { 5740 s_type: StructureType::PIPELINE_VIEWPORT_STATE_CREATE_INFO, 5741 p_next: ::std::ptr::null(), 5742 flags: PipelineViewportStateCreateFlags::default(), 5743 viewport_count: u32::default(), 5744 p_viewports: ::std::ptr::null(), 5745 scissor_count: u32::default(), 5746 p_scissors: ::std::ptr::null(), 5747 } 5748 } 5749 } 5750 impl PipelineViewportStateCreateInfo { builder<'a>() -> PipelineViewportStateCreateInfoBuilder<'a>5751 pub fn builder<'a>() -> PipelineViewportStateCreateInfoBuilder<'a> { 5752 PipelineViewportStateCreateInfoBuilder { 5753 inner: PipelineViewportStateCreateInfo::default(), 5754 marker: ::std::marker::PhantomData, 5755 } 5756 } 5757 } 5758 #[repr(transparent)] 5759 pub struct PipelineViewportStateCreateInfoBuilder<'a> { 5760 inner: PipelineViewportStateCreateInfo, 5761 marker: ::std::marker::PhantomData<&'a ()>, 5762 } 5763 pub unsafe trait ExtendsPipelineViewportStateCreateInfo {} 5764 impl<'a> ::std::ops::Deref for PipelineViewportStateCreateInfoBuilder<'a> { 5765 type Target = PipelineViewportStateCreateInfo; deref(&self) -> &Self::Target5766 fn deref(&self) -> &Self::Target { 5767 &self.inner 5768 } 5769 } 5770 impl<'a> ::std::ops::DerefMut for PipelineViewportStateCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5771 fn deref_mut(&mut self) -> &mut Self::Target { 5772 &mut self.inner 5773 } 5774 } 5775 impl<'a> PipelineViewportStateCreateInfoBuilder<'a> { flags( mut self, flags: PipelineViewportStateCreateFlags, ) -> PipelineViewportStateCreateInfoBuilder<'a>5776 pub fn flags( 5777 mut self, 5778 flags: PipelineViewportStateCreateFlags, 5779 ) -> PipelineViewportStateCreateInfoBuilder<'a> { 5780 self.inner.flags = flags; 5781 self 5782 } viewport_count( mut self, viewport_count: u32, ) -> PipelineViewportStateCreateInfoBuilder<'a>5783 pub fn viewport_count( 5784 mut self, 5785 viewport_count: u32, 5786 ) -> PipelineViewportStateCreateInfoBuilder<'a> { 5787 self.inner.viewport_count = viewport_count; 5788 self 5789 } viewports( mut self, viewports: &'a [Viewport], ) -> PipelineViewportStateCreateInfoBuilder<'a>5790 pub fn viewports( 5791 mut self, 5792 viewports: &'a [Viewport], 5793 ) -> PipelineViewportStateCreateInfoBuilder<'a> { 5794 self.inner.viewport_count = viewports.len() as _; 5795 self.inner.p_viewports = viewports.as_ptr(); 5796 self 5797 } scissor_count( mut self, scissor_count: u32, ) -> PipelineViewportStateCreateInfoBuilder<'a>5798 pub fn scissor_count( 5799 mut self, 5800 scissor_count: u32, 5801 ) -> PipelineViewportStateCreateInfoBuilder<'a> { 5802 self.inner.scissor_count = scissor_count; 5803 self 5804 } scissors( mut self, scissors: &'a [Rect2D], ) -> PipelineViewportStateCreateInfoBuilder<'a>5805 pub fn scissors( 5806 mut self, 5807 scissors: &'a [Rect2D], 5808 ) -> PipelineViewportStateCreateInfoBuilder<'a> { 5809 self.inner.scissor_count = scissors.len() as _; 5810 self.inner.p_scissors = scissors.as_ptr(); 5811 self 5812 } 5813 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 5814 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 5815 #[doc = r" valid extension structs can be pushed into the chain."] 5816 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 5817 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineViewportStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineViewportStateCreateInfoBuilder<'a>5818 pub fn push_next<T: ExtendsPipelineViewportStateCreateInfo>( 5819 mut self, 5820 next: &'a mut T, 5821 ) -> PipelineViewportStateCreateInfoBuilder<'a> { 5822 unsafe { 5823 let next_ptr = next as *mut T as *mut BaseOutStructure; 5824 let last_next = ptr_chain_iter(next).last().unwrap(); 5825 (*last_next).p_next = self.inner.p_next as _; 5826 self.inner.p_next = next_ptr as _; 5827 } 5828 self 5829 } 5830 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5831 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5832 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineViewportStateCreateInfo5833 pub fn build(self) -> PipelineViewportStateCreateInfo { 5834 self.inner 5835 } 5836 } 5837 #[repr(C)] 5838 #[derive(Copy, Clone, Debug)] 5839 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationStateCreateInfo.html>"] 5840 pub struct PipelineRasterizationStateCreateInfo { 5841 pub s_type: StructureType, 5842 pub p_next: *const c_void, 5843 pub flags: PipelineRasterizationStateCreateFlags, 5844 pub depth_clamp_enable: Bool32, 5845 pub rasterizer_discard_enable: Bool32, 5846 pub polygon_mode: PolygonMode, 5847 pub cull_mode: CullModeFlags, 5848 pub front_face: FrontFace, 5849 pub depth_bias_enable: Bool32, 5850 pub depth_bias_constant_factor: f32, 5851 pub depth_bias_clamp: f32, 5852 pub depth_bias_slope_factor: f32, 5853 pub line_width: f32, 5854 } 5855 impl ::std::default::Default for PipelineRasterizationStateCreateInfo { default() -> PipelineRasterizationStateCreateInfo5856 fn default() -> PipelineRasterizationStateCreateInfo { 5857 PipelineRasterizationStateCreateInfo { 5858 s_type: StructureType::PIPELINE_RASTERIZATION_STATE_CREATE_INFO, 5859 p_next: ::std::ptr::null(), 5860 flags: PipelineRasterizationStateCreateFlags::default(), 5861 depth_clamp_enable: Bool32::default(), 5862 rasterizer_discard_enable: Bool32::default(), 5863 polygon_mode: PolygonMode::default(), 5864 cull_mode: CullModeFlags::default(), 5865 front_face: FrontFace::default(), 5866 depth_bias_enable: Bool32::default(), 5867 depth_bias_constant_factor: f32::default(), 5868 depth_bias_clamp: f32::default(), 5869 depth_bias_slope_factor: f32::default(), 5870 line_width: f32::default(), 5871 } 5872 } 5873 } 5874 impl PipelineRasterizationStateCreateInfo { builder<'a>() -> PipelineRasterizationStateCreateInfoBuilder<'a>5875 pub fn builder<'a>() -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5876 PipelineRasterizationStateCreateInfoBuilder { 5877 inner: PipelineRasterizationStateCreateInfo::default(), 5878 marker: ::std::marker::PhantomData, 5879 } 5880 } 5881 } 5882 #[repr(transparent)] 5883 pub struct PipelineRasterizationStateCreateInfoBuilder<'a> { 5884 inner: PipelineRasterizationStateCreateInfo, 5885 marker: ::std::marker::PhantomData<&'a ()>, 5886 } 5887 pub unsafe trait ExtendsPipelineRasterizationStateCreateInfo {} 5888 impl<'a> ::std::ops::Deref for PipelineRasterizationStateCreateInfoBuilder<'a> { 5889 type Target = PipelineRasterizationStateCreateInfo; deref(&self) -> &Self::Target5890 fn deref(&self) -> &Self::Target { 5891 &self.inner 5892 } 5893 } 5894 impl<'a> ::std::ops::DerefMut for PipelineRasterizationStateCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target5895 fn deref_mut(&mut self) -> &mut Self::Target { 5896 &mut self.inner 5897 } 5898 } 5899 impl<'a> PipelineRasterizationStateCreateInfoBuilder<'a> { flags( mut self, flags: PipelineRasterizationStateCreateFlags, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5900 pub fn flags( 5901 mut self, 5902 flags: PipelineRasterizationStateCreateFlags, 5903 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5904 self.inner.flags = flags; 5905 self 5906 } depth_clamp_enable( mut self, depth_clamp_enable: bool, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5907 pub fn depth_clamp_enable( 5908 mut self, 5909 depth_clamp_enable: bool, 5910 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5911 self.inner.depth_clamp_enable = depth_clamp_enable.into(); 5912 self 5913 } rasterizer_discard_enable( mut self, rasterizer_discard_enable: bool, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5914 pub fn rasterizer_discard_enable( 5915 mut self, 5916 rasterizer_discard_enable: bool, 5917 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5918 self.inner.rasterizer_discard_enable = rasterizer_discard_enable.into(); 5919 self 5920 } polygon_mode( mut self, polygon_mode: PolygonMode, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5921 pub fn polygon_mode( 5922 mut self, 5923 polygon_mode: PolygonMode, 5924 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5925 self.inner.polygon_mode = polygon_mode; 5926 self 5927 } cull_mode( mut self, cull_mode: CullModeFlags, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5928 pub fn cull_mode( 5929 mut self, 5930 cull_mode: CullModeFlags, 5931 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5932 self.inner.cull_mode = cull_mode; 5933 self 5934 } front_face( mut self, front_face: FrontFace, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5935 pub fn front_face( 5936 mut self, 5937 front_face: FrontFace, 5938 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5939 self.inner.front_face = front_face; 5940 self 5941 } depth_bias_enable( mut self, depth_bias_enable: bool, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5942 pub fn depth_bias_enable( 5943 mut self, 5944 depth_bias_enable: bool, 5945 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5946 self.inner.depth_bias_enable = depth_bias_enable.into(); 5947 self 5948 } depth_bias_constant_factor( mut self, depth_bias_constant_factor: f32, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5949 pub fn depth_bias_constant_factor( 5950 mut self, 5951 depth_bias_constant_factor: f32, 5952 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5953 self.inner.depth_bias_constant_factor = depth_bias_constant_factor; 5954 self 5955 } depth_bias_clamp( mut self, depth_bias_clamp: f32, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5956 pub fn depth_bias_clamp( 5957 mut self, 5958 depth_bias_clamp: f32, 5959 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5960 self.inner.depth_bias_clamp = depth_bias_clamp; 5961 self 5962 } depth_bias_slope_factor( mut self, depth_bias_slope_factor: f32, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5963 pub fn depth_bias_slope_factor( 5964 mut self, 5965 depth_bias_slope_factor: f32, 5966 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5967 self.inner.depth_bias_slope_factor = depth_bias_slope_factor; 5968 self 5969 } line_width( mut self, line_width: f32, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5970 pub fn line_width( 5971 mut self, 5972 line_width: f32, 5973 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5974 self.inner.line_width = line_width; 5975 self 5976 } 5977 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 5978 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 5979 #[doc = r" valid extension structs can be pushed into the chain."] 5980 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 5981 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineRasterizationStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>5982 pub fn push_next<T: ExtendsPipelineRasterizationStateCreateInfo>( 5983 mut self, 5984 next: &'a mut T, 5985 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { 5986 unsafe { 5987 let next_ptr = next as *mut T as *mut BaseOutStructure; 5988 let last_next = ptr_chain_iter(next).last().unwrap(); 5989 (*last_next).p_next = self.inner.p_next as _; 5990 self.inner.p_next = next_ptr as _; 5991 } 5992 self 5993 } 5994 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 5995 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 5996 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineRasterizationStateCreateInfo5997 pub fn build(self) -> PipelineRasterizationStateCreateInfo { 5998 self.inner 5999 } 6000 } 6001 #[repr(C)] 6002 #[derive(Copy, Clone, Debug)] 6003 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineMultisampleStateCreateInfo.html>"] 6004 pub struct PipelineMultisampleStateCreateInfo { 6005 pub s_type: StructureType, 6006 pub p_next: *const c_void, 6007 pub flags: PipelineMultisampleStateCreateFlags, 6008 pub rasterization_samples: SampleCountFlags, 6009 pub sample_shading_enable: Bool32, 6010 pub min_sample_shading: f32, 6011 pub p_sample_mask: *const SampleMask, 6012 pub alpha_to_coverage_enable: Bool32, 6013 pub alpha_to_one_enable: Bool32, 6014 } 6015 impl ::std::default::Default for PipelineMultisampleStateCreateInfo { default() -> PipelineMultisampleStateCreateInfo6016 fn default() -> PipelineMultisampleStateCreateInfo { 6017 PipelineMultisampleStateCreateInfo { 6018 s_type: StructureType::PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, 6019 p_next: ::std::ptr::null(), 6020 flags: PipelineMultisampleStateCreateFlags::default(), 6021 rasterization_samples: SampleCountFlags::default(), 6022 sample_shading_enable: Bool32::default(), 6023 min_sample_shading: f32::default(), 6024 p_sample_mask: ::std::ptr::null(), 6025 alpha_to_coverage_enable: Bool32::default(), 6026 alpha_to_one_enable: Bool32::default(), 6027 } 6028 } 6029 } 6030 impl PipelineMultisampleStateCreateInfo { builder<'a>() -> PipelineMultisampleStateCreateInfoBuilder<'a>6031 pub fn builder<'a>() -> PipelineMultisampleStateCreateInfoBuilder<'a> { 6032 PipelineMultisampleStateCreateInfoBuilder { 6033 inner: PipelineMultisampleStateCreateInfo::default(), 6034 marker: ::std::marker::PhantomData, 6035 } 6036 } 6037 } 6038 #[repr(transparent)] 6039 pub struct PipelineMultisampleStateCreateInfoBuilder<'a> { 6040 inner: PipelineMultisampleStateCreateInfo, 6041 marker: ::std::marker::PhantomData<&'a ()>, 6042 } 6043 pub unsafe trait ExtendsPipelineMultisampleStateCreateInfo {} 6044 impl<'a> ::std::ops::Deref for PipelineMultisampleStateCreateInfoBuilder<'a> { 6045 type Target = PipelineMultisampleStateCreateInfo; deref(&self) -> &Self::Target6046 fn deref(&self) -> &Self::Target { 6047 &self.inner 6048 } 6049 } 6050 impl<'a> ::std::ops::DerefMut for PipelineMultisampleStateCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target6051 fn deref_mut(&mut self) -> &mut Self::Target { 6052 &mut self.inner 6053 } 6054 } 6055 impl<'a> PipelineMultisampleStateCreateInfoBuilder<'a> { flags( mut self, flags: PipelineMultisampleStateCreateFlags, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>6056 pub fn flags( 6057 mut self, 6058 flags: PipelineMultisampleStateCreateFlags, 6059 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { 6060 self.inner.flags = flags; 6061 self 6062 } rasterization_samples( mut self, rasterization_samples: SampleCountFlags, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>6063 pub fn rasterization_samples( 6064 mut self, 6065 rasterization_samples: SampleCountFlags, 6066 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { 6067 self.inner.rasterization_samples = rasterization_samples; 6068 self 6069 } sample_shading_enable( mut self, sample_shading_enable: bool, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>6070 pub fn sample_shading_enable( 6071 mut self, 6072 sample_shading_enable: bool, 6073 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { 6074 self.inner.sample_shading_enable = sample_shading_enable.into(); 6075 self 6076 } min_sample_shading( mut self, min_sample_shading: f32, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>6077 pub fn min_sample_shading( 6078 mut self, 6079 min_sample_shading: f32, 6080 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { 6081 self.inner.min_sample_shading = min_sample_shading; 6082 self 6083 } sample_mask( mut self, sample_mask: &'a [SampleMask], ) -> PipelineMultisampleStateCreateInfoBuilder<'a>6084 pub fn sample_mask( 6085 mut self, 6086 sample_mask: &'a [SampleMask], 6087 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { 6088 self.inner.p_sample_mask = sample_mask.as_ptr() as *const SampleMask; 6089 self 6090 } alpha_to_coverage_enable( mut self, alpha_to_coverage_enable: bool, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>6091 pub fn alpha_to_coverage_enable( 6092 mut self, 6093 alpha_to_coverage_enable: bool, 6094 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { 6095 self.inner.alpha_to_coverage_enable = alpha_to_coverage_enable.into(); 6096 self 6097 } alpha_to_one_enable( mut self, alpha_to_one_enable: bool, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>6098 pub fn alpha_to_one_enable( 6099 mut self, 6100 alpha_to_one_enable: bool, 6101 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { 6102 self.inner.alpha_to_one_enable = alpha_to_one_enable.into(); 6103 self 6104 } 6105 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 6106 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 6107 #[doc = r" valid extension structs can be pushed into the chain."] 6108 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 6109 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineMultisampleStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>6110 pub fn push_next<T: ExtendsPipelineMultisampleStateCreateInfo>( 6111 mut self, 6112 next: &'a mut T, 6113 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { 6114 unsafe { 6115 let next_ptr = next as *mut T as *mut BaseOutStructure; 6116 let last_next = ptr_chain_iter(next).last().unwrap(); 6117 (*last_next).p_next = self.inner.p_next as _; 6118 self.inner.p_next = next_ptr as _; 6119 } 6120 self 6121 } 6122 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 6123 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 6124 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineMultisampleStateCreateInfo6125 pub fn build(self) -> PipelineMultisampleStateCreateInfo { 6126 self.inner 6127 } 6128 } 6129 #[repr(C)] 6130 #[derive(Copy, Clone, Default, Debug)] 6131 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineColorBlendAttachmentState.html>"] 6132 pub struct PipelineColorBlendAttachmentState { 6133 pub blend_enable: Bool32, 6134 pub src_color_blend_factor: BlendFactor, 6135 pub dst_color_blend_factor: BlendFactor, 6136 pub color_blend_op: BlendOp, 6137 pub src_alpha_blend_factor: BlendFactor, 6138 pub dst_alpha_blend_factor: BlendFactor, 6139 pub alpha_blend_op: BlendOp, 6140 pub color_write_mask: ColorComponentFlags, 6141 } 6142 impl PipelineColorBlendAttachmentState { builder<'a>() -> PipelineColorBlendAttachmentStateBuilder<'a>6143 pub fn builder<'a>() -> PipelineColorBlendAttachmentStateBuilder<'a> { 6144 PipelineColorBlendAttachmentStateBuilder { 6145 inner: PipelineColorBlendAttachmentState::default(), 6146 marker: ::std::marker::PhantomData, 6147 } 6148 } 6149 } 6150 #[repr(transparent)] 6151 pub struct PipelineColorBlendAttachmentStateBuilder<'a> { 6152 inner: PipelineColorBlendAttachmentState, 6153 marker: ::std::marker::PhantomData<&'a ()>, 6154 } 6155 impl<'a> ::std::ops::Deref for PipelineColorBlendAttachmentStateBuilder<'a> { 6156 type Target = PipelineColorBlendAttachmentState; deref(&self) -> &Self::Target6157 fn deref(&self) -> &Self::Target { 6158 &self.inner 6159 } 6160 } 6161 impl<'a> ::std::ops::DerefMut for PipelineColorBlendAttachmentStateBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target6162 fn deref_mut(&mut self) -> &mut Self::Target { 6163 &mut self.inner 6164 } 6165 } 6166 impl<'a> PipelineColorBlendAttachmentStateBuilder<'a> { blend_enable( mut self, blend_enable: bool, ) -> PipelineColorBlendAttachmentStateBuilder<'a>6167 pub fn blend_enable( 6168 mut self, 6169 blend_enable: bool, 6170 ) -> PipelineColorBlendAttachmentStateBuilder<'a> { 6171 self.inner.blend_enable = blend_enable.into(); 6172 self 6173 } src_color_blend_factor( mut self, src_color_blend_factor: BlendFactor, ) -> PipelineColorBlendAttachmentStateBuilder<'a>6174 pub fn src_color_blend_factor( 6175 mut self, 6176 src_color_blend_factor: BlendFactor, 6177 ) -> PipelineColorBlendAttachmentStateBuilder<'a> { 6178 self.inner.src_color_blend_factor = src_color_blend_factor; 6179 self 6180 } dst_color_blend_factor( mut self, dst_color_blend_factor: BlendFactor, ) -> PipelineColorBlendAttachmentStateBuilder<'a>6181 pub fn dst_color_blend_factor( 6182 mut self, 6183 dst_color_blend_factor: BlendFactor, 6184 ) -> PipelineColorBlendAttachmentStateBuilder<'a> { 6185 self.inner.dst_color_blend_factor = dst_color_blend_factor; 6186 self 6187 } color_blend_op( mut self, color_blend_op: BlendOp, ) -> PipelineColorBlendAttachmentStateBuilder<'a>6188 pub fn color_blend_op( 6189 mut self, 6190 color_blend_op: BlendOp, 6191 ) -> PipelineColorBlendAttachmentStateBuilder<'a> { 6192 self.inner.color_blend_op = color_blend_op; 6193 self 6194 } src_alpha_blend_factor( mut self, src_alpha_blend_factor: BlendFactor, ) -> PipelineColorBlendAttachmentStateBuilder<'a>6195 pub fn src_alpha_blend_factor( 6196 mut self, 6197 src_alpha_blend_factor: BlendFactor, 6198 ) -> PipelineColorBlendAttachmentStateBuilder<'a> { 6199 self.inner.src_alpha_blend_factor = src_alpha_blend_factor; 6200 self 6201 } dst_alpha_blend_factor( mut self, dst_alpha_blend_factor: BlendFactor, ) -> PipelineColorBlendAttachmentStateBuilder<'a>6202 pub fn dst_alpha_blend_factor( 6203 mut self, 6204 dst_alpha_blend_factor: BlendFactor, 6205 ) -> PipelineColorBlendAttachmentStateBuilder<'a> { 6206 self.inner.dst_alpha_blend_factor = dst_alpha_blend_factor; 6207 self 6208 } alpha_blend_op( mut self, alpha_blend_op: BlendOp, ) -> PipelineColorBlendAttachmentStateBuilder<'a>6209 pub fn alpha_blend_op( 6210 mut self, 6211 alpha_blend_op: BlendOp, 6212 ) -> PipelineColorBlendAttachmentStateBuilder<'a> { 6213 self.inner.alpha_blend_op = alpha_blend_op; 6214 self 6215 } color_write_mask( mut self, color_write_mask: ColorComponentFlags, ) -> PipelineColorBlendAttachmentStateBuilder<'a>6216 pub fn color_write_mask( 6217 mut self, 6218 color_write_mask: ColorComponentFlags, 6219 ) -> PipelineColorBlendAttachmentStateBuilder<'a> { 6220 self.inner.color_write_mask = color_write_mask; 6221 self 6222 } 6223 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 6224 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 6225 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineColorBlendAttachmentState6226 pub fn build(self) -> PipelineColorBlendAttachmentState { 6227 self.inner 6228 } 6229 } 6230 #[repr(C)] 6231 #[derive(Copy, Clone, Debug)] 6232 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineColorBlendStateCreateInfo.html>"] 6233 pub struct PipelineColorBlendStateCreateInfo { 6234 pub s_type: StructureType, 6235 pub p_next: *const c_void, 6236 pub flags: PipelineColorBlendStateCreateFlags, 6237 pub logic_op_enable: Bool32, 6238 pub logic_op: LogicOp, 6239 pub attachment_count: u32, 6240 pub p_attachments: *const PipelineColorBlendAttachmentState, 6241 pub blend_constants: [f32; 4], 6242 } 6243 impl ::std::default::Default for PipelineColorBlendStateCreateInfo { default() -> PipelineColorBlendStateCreateInfo6244 fn default() -> PipelineColorBlendStateCreateInfo { 6245 PipelineColorBlendStateCreateInfo { 6246 s_type: StructureType::PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, 6247 p_next: ::std::ptr::null(), 6248 flags: PipelineColorBlendStateCreateFlags::default(), 6249 logic_op_enable: Bool32::default(), 6250 logic_op: LogicOp::default(), 6251 attachment_count: u32::default(), 6252 p_attachments: ::std::ptr::null(), 6253 blend_constants: unsafe { ::std::mem::zeroed() }, 6254 } 6255 } 6256 } 6257 impl PipelineColorBlendStateCreateInfo { builder<'a>() -> PipelineColorBlendStateCreateInfoBuilder<'a>6258 pub fn builder<'a>() -> PipelineColorBlendStateCreateInfoBuilder<'a> { 6259 PipelineColorBlendStateCreateInfoBuilder { 6260 inner: PipelineColorBlendStateCreateInfo::default(), 6261 marker: ::std::marker::PhantomData, 6262 } 6263 } 6264 } 6265 #[repr(transparent)] 6266 pub struct PipelineColorBlendStateCreateInfoBuilder<'a> { 6267 inner: PipelineColorBlendStateCreateInfo, 6268 marker: ::std::marker::PhantomData<&'a ()>, 6269 } 6270 pub unsafe trait ExtendsPipelineColorBlendStateCreateInfo {} 6271 impl<'a> ::std::ops::Deref for PipelineColorBlendStateCreateInfoBuilder<'a> { 6272 type Target = PipelineColorBlendStateCreateInfo; deref(&self) -> &Self::Target6273 fn deref(&self) -> &Self::Target { 6274 &self.inner 6275 } 6276 } 6277 impl<'a> ::std::ops::DerefMut for PipelineColorBlendStateCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target6278 fn deref_mut(&mut self) -> &mut Self::Target { 6279 &mut self.inner 6280 } 6281 } 6282 impl<'a> PipelineColorBlendStateCreateInfoBuilder<'a> { flags( mut self, flags: PipelineColorBlendStateCreateFlags, ) -> PipelineColorBlendStateCreateInfoBuilder<'a>6283 pub fn flags( 6284 mut self, 6285 flags: PipelineColorBlendStateCreateFlags, 6286 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> { 6287 self.inner.flags = flags; 6288 self 6289 } logic_op_enable( mut self, logic_op_enable: bool, ) -> PipelineColorBlendStateCreateInfoBuilder<'a>6290 pub fn logic_op_enable( 6291 mut self, 6292 logic_op_enable: bool, 6293 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> { 6294 self.inner.logic_op_enable = logic_op_enable.into(); 6295 self 6296 } logic_op(mut self, logic_op: LogicOp) -> PipelineColorBlendStateCreateInfoBuilder<'a>6297 pub fn logic_op(mut self, logic_op: LogicOp) -> PipelineColorBlendStateCreateInfoBuilder<'a> { 6298 self.inner.logic_op = logic_op; 6299 self 6300 } attachments( mut self, attachments: &'a [PipelineColorBlendAttachmentState], ) -> PipelineColorBlendStateCreateInfoBuilder<'a>6301 pub fn attachments( 6302 mut self, 6303 attachments: &'a [PipelineColorBlendAttachmentState], 6304 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> { 6305 self.inner.attachment_count = attachments.len() as _; 6306 self.inner.p_attachments = attachments.as_ptr(); 6307 self 6308 } blend_constants( mut self, blend_constants: [f32; 4], ) -> PipelineColorBlendStateCreateInfoBuilder<'a>6309 pub fn blend_constants( 6310 mut self, 6311 blend_constants: [f32; 4], 6312 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> { 6313 self.inner.blend_constants = blend_constants; 6314 self 6315 } 6316 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 6317 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 6318 #[doc = r" valid extension structs can be pushed into the chain."] 6319 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 6320 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineColorBlendStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineColorBlendStateCreateInfoBuilder<'a>6321 pub fn push_next<T: ExtendsPipelineColorBlendStateCreateInfo>( 6322 mut self, 6323 next: &'a mut T, 6324 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> { 6325 unsafe { 6326 let next_ptr = next as *mut T as *mut BaseOutStructure; 6327 let last_next = ptr_chain_iter(next).last().unwrap(); 6328 (*last_next).p_next = self.inner.p_next as _; 6329 self.inner.p_next = next_ptr as _; 6330 } 6331 self 6332 } 6333 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 6334 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 6335 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineColorBlendStateCreateInfo6336 pub fn build(self) -> PipelineColorBlendStateCreateInfo { 6337 self.inner 6338 } 6339 } 6340 #[repr(C)] 6341 #[derive(Copy, Clone, Debug)] 6342 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDynamicStateCreateInfo.html>"] 6343 pub struct PipelineDynamicStateCreateInfo { 6344 pub s_type: StructureType, 6345 pub p_next: *const c_void, 6346 pub flags: PipelineDynamicStateCreateFlags, 6347 pub dynamic_state_count: u32, 6348 pub p_dynamic_states: *const DynamicState, 6349 } 6350 impl ::std::default::Default for PipelineDynamicStateCreateInfo { default() -> PipelineDynamicStateCreateInfo6351 fn default() -> PipelineDynamicStateCreateInfo { 6352 PipelineDynamicStateCreateInfo { 6353 s_type: StructureType::PIPELINE_DYNAMIC_STATE_CREATE_INFO, 6354 p_next: ::std::ptr::null(), 6355 flags: PipelineDynamicStateCreateFlags::default(), 6356 dynamic_state_count: u32::default(), 6357 p_dynamic_states: ::std::ptr::null(), 6358 } 6359 } 6360 } 6361 impl PipelineDynamicStateCreateInfo { builder<'a>() -> PipelineDynamicStateCreateInfoBuilder<'a>6362 pub fn builder<'a>() -> PipelineDynamicStateCreateInfoBuilder<'a> { 6363 PipelineDynamicStateCreateInfoBuilder { 6364 inner: PipelineDynamicStateCreateInfo::default(), 6365 marker: ::std::marker::PhantomData, 6366 } 6367 } 6368 } 6369 #[repr(transparent)] 6370 pub struct PipelineDynamicStateCreateInfoBuilder<'a> { 6371 inner: PipelineDynamicStateCreateInfo, 6372 marker: ::std::marker::PhantomData<&'a ()>, 6373 } 6374 pub unsafe trait ExtendsPipelineDynamicStateCreateInfo {} 6375 impl<'a> ::std::ops::Deref for PipelineDynamicStateCreateInfoBuilder<'a> { 6376 type Target = PipelineDynamicStateCreateInfo; deref(&self) -> &Self::Target6377 fn deref(&self) -> &Self::Target { 6378 &self.inner 6379 } 6380 } 6381 impl<'a> ::std::ops::DerefMut for PipelineDynamicStateCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target6382 fn deref_mut(&mut self) -> &mut Self::Target { 6383 &mut self.inner 6384 } 6385 } 6386 impl<'a> PipelineDynamicStateCreateInfoBuilder<'a> { flags( mut self, flags: PipelineDynamicStateCreateFlags, ) -> PipelineDynamicStateCreateInfoBuilder<'a>6387 pub fn flags( 6388 mut self, 6389 flags: PipelineDynamicStateCreateFlags, 6390 ) -> PipelineDynamicStateCreateInfoBuilder<'a> { 6391 self.inner.flags = flags; 6392 self 6393 } dynamic_states( mut self, dynamic_states: &'a [DynamicState], ) -> PipelineDynamicStateCreateInfoBuilder<'a>6394 pub fn dynamic_states( 6395 mut self, 6396 dynamic_states: &'a [DynamicState], 6397 ) -> PipelineDynamicStateCreateInfoBuilder<'a> { 6398 self.inner.dynamic_state_count = dynamic_states.len() as _; 6399 self.inner.p_dynamic_states = dynamic_states.as_ptr(); 6400 self 6401 } 6402 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 6403 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 6404 #[doc = r" valid extension structs can be pushed into the chain."] 6405 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 6406 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineDynamicStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineDynamicStateCreateInfoBuilder<'a>6407 pub fn push_next<T: ExtendsPipelineDynamicStateCreateInfo>( 6408 mut self, 6409 next: &'a mut T, 6410 ) -> PipelineDynamicStateCreateInfoBuilder<'a> { 6411 unsafe { 6412 let next_ptr = next as *mut T as *mut BaseOutStructure; 6413 let last_next = ptr_chain_iter(next).last().unwrap(); 6414 (*last_next).p_next = self.inner.p_next as _; 6415 self.inner.p_next = next_ptr as _; 6416 } 6417 self 6418 } 6419 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 6420 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 6421 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineDynamicStateCreateInfo6422 pub fn build(self) -> PipelineDynamicStateCreateInfo { 6423 self.inner 6424 } 6425 } 6426 #[repr(C)] 6427 #[derive(Copy, Clone, Default, Debug)] 6428 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkStencilOpState.html>"] 6429 pub struct StencilOpState { 6430 pub fail_op: StencilOp, 6431 pub pass_op: StencilOp, 6432 pub depth_fail_op: StencilOp, 6433 pub compare_op: CompareOp, 6434 pub compare_mask: u32, 6435 pub write_mask: u32, 6436 pub reference: u32, 6437 } 6438 impl StencilOpState { builder<'a>() -> StencilOpStateBuilder<'a>6439 pub fn builder<'a>() -> StencilOpStateBuilder<'a> { 6440 StencilOpStateBuilder { 6441 inner: StencilOpState::default(), 6442 marker: ::std::marker::PhantomData, 6443 } 6444 } 6445 } 6446 #[repr(transparent)] 6447 pub struct StencilOpStateBuilder<'a> { 6448 inner: StencilOpState, 6449 marker: ::std::marker::PhantomData<&'a ()>, 6450 } 6451 impl<'a> ::std::ops::Deref for StencilOpStateBuilder<'a> { 6452 type Target = StencilOpState; deref(&self) -> &Self::Target6453 fn deref(&self) -> &Self::Target { 6454 &self.inner 6455 } 6456 } 6457 impl<'a> ::std::ops::DerefMut for StencilOpStateBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target6458 fn deref_mut(&mut self) -> &mut Self::Target { 6459 &mut self.inner 6460 } 6461 } 6462 impl<'a> StencilOpStateBuilder<'a> { fail_op(mut self, fail_op: StencilOp) -> StencilOpStateBuilder<'a>6463 pub fn fail_op(mut self, fail_op: StencilOp) -> StencilOpStateBuilder<'a> { 6464 self.inner.fail_op = fail_op; 6465 self 6466 } pass_op(mut self, pass_op: StencilOp) -> StencilOpStateBuilder<'a>6467 pub fn pass_op(mut self, pass_op: StencilOp) -> StencilOpStateBuilder<'a> { 6468 self.inner.pass_op = pass_op; 6469 self 6470 } depth_fail_op(mut self, depth_fail_op: StencilOp) -> StencilOpStateBuilder<'a>6471 pub fn depth_fail_op(mut self, depth_fail_op: StencilOp) -> StencilOpStateBuilder<'a> { 6472 self.inner.depth_fail_op = depth_fail_op; 6473 self 6474 } compare_op(mut self, compare_op: CompareOp) -> StencilOpStateBuilder<'a>6475 pub fn compare_op(mut self, compare_op: CompareOp) -> StencilOpStateBuilder<'a> { 6476 self.inner.compare_op = compare_op; 6477 self 6478 } compare_mask(mut self, compare_mask: u32) -> StencilOpStateBuilder<'a>6479 pub fn compare_mask(mut self, compare_mask: u32) -> StencilOpStateBuilder<'a> { 6480 self.inner.compare_mask = compare_mask; 6481 self 6482 } write_mask(mut self, write_mask: u32) -> StencilOpStateBuilder<'a>6483 pub fn write_mask(mut self, write_mask: u32) -> StencilOpStateBuilder<'a> { 6484 self.inner.write_mask = write_mask; 6485 self 6486 } reference(mut self, reference: u32) -> StencilOpStateBuilder<'a>6487 pub fn reference(mut self, reference: u32) -> StencilOpStateBuilder<'a> { 6488 self.inner.reference = reference; 6489 self 6490 } 6491 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 6492 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 6493 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> StencilOpState6494 pub fn build(self) -> StencilOpState { 6495 self.inner 6496 } 6497 } 6498 #[repr(C)] 6499 #[derive(Copy, Clone, Debug)] 6500 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDepthStencilStateCreateInfo.html>"] 6501 pub struct PipelineDepthStencilStateCreateInfo { 6502 pub s_type: StructureType, 6503 pub p_next: *const c_void, 6504 pub flags: PipelineDepthStencilStateCreateFlags, 6505 pub depth_test_enable: Bool32, 6506 pub depth_write_enable: Bool32, 6507 pub depth_compare_op: CompareOp, 6508 pub depth_bounds_test_enable: Bool32, 6509 pub stencil_test_enable: Bool32, 6510 pub front: StencilOpState, 6511 pub back: StencilOpState, 6512 pub min_depth_bounds: f32, 6513 pub max_depth_bounds: f32, 6514 } 6515 impl ::std::default::Default for PipelineDepthStencilStateCreateInfo { default() -> PipelineDepthStencilStateCreateInfo6516 fn default() -> PipelineDepthStencilStateCreateInfo { 6517 PipelineDepthStencilStateCreateInfo { 6518 s_type: StructureType::PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, 6519 p_next: ::std::ptr::null(), 6520 flags: PipelineDepthStencilStateCreateFlags::default(), 6521 depth_test_enable: Bool32::default(), 6522 depth_write_enable: Bool32::default(), 6523 depth_compare_op: CompareOp::default(), 6524 depth_bounds_test_enable: Bool32::default(), 6525 stencil_test_enable: Bool32::default(), 6526 front: StencilOpState::default(), 6527 back: StencilOpState::default(), 6528 min_depth_bounds: f32::default(), 6529 max_depth_bounds: f32::default(), 6530 } 6531 } 6532 } 6533 impl PipelineDepthStencilStateCreateInfo { builder<'a>() -> PipelineDepthStencilStateCreateInfoBuilder<'a>6534 pub fn builder<'a>() -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6535 PipelineDepthStencilStateCreateInfoBuilder { 6536 inner: PipelineDepthStencilStateCreateInfo::default(), 6537 marker: ::std::marker::PhantomData, 6538 } 6539 } 6540 } 6541 #[repr(transparent)] 6542 pub struct PipelineDepthStencilStateCreateInfoBuilder<'a> { 6543 inner: PipelineDepthStencilStateCreateInfo, 6544 marker: ::std::marker::PhantomData<&'a ()>, 6545 } 6546 pub unsafe trait ExtendsPipelineDepthStencilStateCreateInfo {} 6547 impl<'a> ::std::ops::Deref for PipelineDepthStencilStateCreateInfoBuilder<'a> { 6548 type Target = PipelineDepthStencilStateCreateInfo; deref(&self) -> &Self::Target6549 fn deref(&self) -> &Self::Target { 6550 &self.inner 6551 } 6552 } 6553 impl<'a> ::std::ops::DerefMut for PipelineDepthStencilStateCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target6554 fn deref_mut(&mut self) -> &mut Self::Target { 6555 &mut self.inner 6556 } 6557 } 6558 impl<'a> PipelineDepthStencilStateCreateInfoBuilder<'a> { flags( mut self, flags: PipelineDepthStencilStateCreateFlags, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6559 pub fn flags( 6560 mut self, 6561 flags: PipelineDepthStencilStateCreateFlags, 6562 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6563 self.inner.flags = flags; 6564 self 6565 } depth_test_enable( mut self, depth_test_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6566 pub fn depth_test_enable( 6567 mut self, 6568 depth_test_enable: bool, 6569 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6570 self.inner.depth_test_enable = depth_test_enable.into(); 6571 self 6572 } depth_write_enable( mut self, depth_write_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6573 pub fn depth_write_enable( 6574 mut self, 6575 depth_write_enable: bool, 6576 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6577 self.inner.depth_write_enable = depth_write_enable.into(); 6578 self 6579 } depth_compare_op( mut self, depth_compare_op: CompareOp, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6580 pub fn depth_compare_op( 6581 mut self, 6582 depth_compare_op: CompareOp, 6583 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6584 self.inner.depth_compare_op = depth_compare_op; 6585 self 6586 } depth_bounds_test_enable( mut self, depth_bounds_test_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6587 pub fn depth_bounds_test_enable( 6588 mut self, 6589 depth_bounds_test_enable: bool, 6590 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6591 self.inner.depth_bounds_test_enable = depth_bounds_test_enable.into(); 6592 self 6593 } stencil_test_enable( mut self, stencil_test_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6594 pub fn stencil_test_enable( 6595 mut self, 6596 stencil_test_enable: bool, 6597 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6598 self.inner.stencil_test_enable = stencil_test_enable.into(); 6599 self 6600 } front( mut self, front: StencilOpState, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6601 pub fn front( 6602 mut self, 6603 front: StencilOpState, 6604 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6605 self.inner.front = front; 6606 self 6607 } back(mut self, back: StencilOpState) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6608 pub fn back(mut self, back: StencilOpState) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6609 self.inner.back = back; 6610 self 6611 } min_depth_bounds( mut self, min_depth_bounds: f32, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6612 pub fn min_depth_bounds( 6613 mut self, 6614 min_depth_bounds: f32, 6615 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6616 self.inner.min_depth_bounds = min_depth_bounds; 6617 self 6618 } max_depth_bounds( mut self, max_depth_bounds: f32, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6619 pub fn max_depth_bounds( 6620 mut self, 6621 max_depth_bounds: f32, 6622 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6623 self.inner.max_depth_bounds = max_depth_bounds; 6624 self 6625 } 6626 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"] 6627 #[doc = r" method only exists on structs that can be passed to a function directly. Only"] 6628 #[doc = r" valid extension structs can be pushed into the chain."] 6629 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"] 6630 #[doc = r" chain will look like `A -> D -> B -> C`."] push_next<T: ExtendsPipelineDepthStencilStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>6631 pub fn push_next<T: ExtendsPipelineDepthStencilStateCreateInfo>( 6632 mut self, 6633 next: &'a mut T, 6634 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { 6635 unsafe { 6636 let next_ptr = next as *mut T as *mut BaseOutStructure; 6637 let last_next = ptr_chain_iter(next).last().unwrap(); 6638 (*last_next).p_next = self.inner.p_next as _; 6639 self.inner.p_next = next_ptr as _; 6640 } 6641 self 6642 } 6643 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"] 6644 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"] 6645 #[doc = r" so references to builders can be passed directly to Vulkan functions."] build(self) -> PipelineDepthStencilStateCreateInfo6646 pub fn build(self) -> PipelineDepthStencilStateCreateInfo { 6647 self.inner 6648 } 6649 } 6650 #[repr(C)] 6651 #[derive(Copy, Clone, Debug)] 6652 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkGraphicsPipelineCreateInfo.html>"] 6653 pub struct GraphicsPipelineCreateInfo { 6654 pub s_type: StructureType, 6655 pub p_next: *const c_void, 6656 pub flags: PipelineCreateFlags, 6657 pub stage_count: u32, 6658 pub p_stages: *const PipelineShaderStageCreateInfo, 6659 pub p_vertex_input_state: *const PipelineVertexInputStateCreateInfo, 6660 pub p_input_assembly_state: *const PipelineInputAssemblyStateCreateInfo, 6661 pub p_tessellation_state: *const PipelineTessellationStateCreateInfo, 6662 pub p_viewport_state: *const PipelineViewportStateCreateInfo, 6663 pub p_rasterization_state: *const PipelineRasterizationStateCreateInfo, 6664 pub p_multisample_state: *const PipelineMultisampleStateCreateInfo, 6665 pub p_depth_stencil_state: *const PipelineDepthStencilStateCreateInfo, 6666 pub p_color_blend_state: *const PipelineColorBlendStateCreateInfo, 6667 pub p_dynamic_state: *const PipelineDynamicStateCreateInfo, 6668 pub layout: PipelineLayout, 6669 pub render_pass: RenderPass, 6670 pub subpass: u32, 6671 pub base_pipeline_handle: Pipeline, 6672 pub base_pipeline_index: i32, 6673 } 6674 impl ::std::default::Default for GraphicsPipelineCreateInfo { default() -> GraphicsPipelineCreateInfo6675 fn default() -> GraphicsPipelineCreateInfo { 6676 GraphicsPipelineCreateInfo { 6677 s_type: StructureType::GRAPHICS_PIPELINE_CREATE_INFO, 6678 p_next: ::std::ptr::null(), 6679 flags: PipelineCreateFlags::default(), 6680 stage_count: u32::default(), 6681 p_stages: ::std::ptr::null(), 6682 p_vertex_input_state: ::std::ptr::null(), 6683 p_input_assembly_state: ::std::ptr::null(), 6684 p_tessellation_state: ::std::ptr::null(), 6685 p_viewport_state: ::std::ptr::null(), 6686 p_rasterization_state: ::std::ptr::null(), 6687 p_multisample_state: ::std::ptr::null(), 6688 p_depth_stencil_state: ::std::ptr::null(), 6689 p_color_blend_state: ::std::ptr::null(), 6690 p_dynamic_state: ::std::ptr::null(), 6691 layout: PipelineLayout::default(), 6692 render_pass: RenderPass::default(), 6693 subpass: u32::default(), 6694 base_pipeline_handle: Pipeline::default(), 6695 base_pipeline_index: i32::default(), 6696 } 6697 } 6698 } 6699 impl GraphicsPipelineCreateInfo { builder<'a>() -> GraphicsPipelineCreateInfoBuilder<'a>6700 pub fn builder<'a>() -> GraphicsPipelineCreateInfoBuilder<'a> { 6701 GraphicsPipelineCreateInfoBuilder { 6702 inner: GraphicsPipelineCreateInfo::default(), 6703 marker: ::std::marker::PhantomData, 6704 } 6705 } 6706 } 6707 #[repr(transparent)] 6708 pub struct GraphicsPipelineCreateInfoBuilder<'a> { 6709 inner: GraphicsPipelineCreateInfo, 6710 marker: ::std::marker::PhantomData<&'a ()>, 6711 } 6712 pub unsafe trait ExtendsGraphicsPipelineCreateInfo {} 6713 impl<'a> ::std::ops::Deref for GraphicsPipelineCreateInfoBuilder<'a> { 6714 type Target = GraphicsPipelineCreateInfo; deref(&self) -> &Self::Target6715 fn deref(&self) -> &Self::Target { 6716 &self.inner 6717 } 6718 } 6719 impl<'a> ::std::ops::DerefMut for GraphicsPipelineCreateInfoBuilder<'a> { deref_mut(&mut self) -> &mut Self::Target6720 fn deref_mut(&mut self) -> &mut Self::Target { 6721 &mut self.inner 6722 } 6723 } 6724 impl<'a> GraphicsPipelineCreateInfoBuilder<'a> { flags(mut self, flags: PipelineCreateFlags) -> GraphicsPipelineCreateInfoBuilder<'a>6725 pub fn flags(mut self, flags: PipelineCreateFlags) -> GraphicsPipelineCreateInfoBuilder<'a> { 6726 self.inner.flags = flags; 6727 self 6728 } stages( mut self, stages: &'a [PipelineShaderStageCreateInfo], ) -> GraphicsPipelineCreateInfoBuilder<'a>6729 pub fn stages( 6730 mut self, 6731 stages: &'a [PipelineShaderStageCreateInfo], 6732 ) -> GraphicsPipelineCreateInfoBuilder<'a> { 6733 self.inner.stage_count = stages.len() as _; 6734 self.inner.p_stages = stages.as_ptr(); 6735 self 6736 } vertex_input_state( mut self, vertex_input_state: &'a PipelineVertexInputStateCreateInfo, ) -> GraphicsPipelineCreateInfoBuilder<'a>6737 pub fn vertex_input_state( 6738 mut self, 6739 vertex_input_state: &'a PipelineVertexInputStateCreateInfo, 6740 ) -> GraphicsPipelineCreateInfoBuilder<'a> { 6741 self.inner.p_vertex_input_state = vertex_input_state; 6742 self 6743 } input_assembly_state( mut self, input_assembly_state: &'a PipelineInputAssemblyStateCreateInfo, ) -> GraphicsPipelineCreateInfoBuilder<'a>6744 pub fn input_assembly_state( 6745 mut self, 6746 input_assembly_state: &'a PipelineInputAssemblyStateCreateInfo, 6747 ) -> GraphicsPipelineCreateInfoBuilder<'a> { 6748 self.inner.p_input_assembly_state = input_assembly_state; 6749 self 6750 } tessellation_state( mut self, tessellation_state: &'a PipelineTessellationStateCreateInfo, ) -> GraphicsPipelineCreateInfoBuilder<'a>6751