diff --git a/README.md b/README.md index a12cfe0..90d0e83 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,10 @@ Here are a few code examples: // Accept std::vector as source for updateBuffer commandBuffer.updateBuffer(buffer, 0, {some values}); // update buffer with std::vector + + // Sometimes it's necessary to pass a nullptr to a struct. For this case we've added T& null() to all structs T as replacement for nullptr. + device.allocateMemory(allocateInfo, vk::AllocationCallbacks::null()); + } catch (vk::Exception e) { diff --git a/VkCppGenerator.cpp b/VkCppGenerator.cpp index 5b43566..dc1ba69 100644 --- a/VkCppGenerator.cpp +++ b/VkCppGenerator.cpp @@ -2584,6 +2584,13 @@ void writeTypeStruct( std::ofstream & ofs, DependencyData const& dependencyData, } } + // null handle + ofs << " static " << dependencyData.name << "& null()" << std::endl + << " {" << std::endl + << " return *((" << dependencyData.name << "*)(nullptr));" << std::endl + << " }" << std::endl + << std::endl; + // the cast-operator to the wrapped struct, and the struct itself as a private member variable ofs << " operator const Vk" << dependencyData.name << "&() const" << std::endl << " {" << std::endl diff --git a/vulkan/vk_cpp.h b/vulkan/vk_cpp.h index 12bffd1..6047c7e 100644 --- a/vulkan/vk_cpp.h +++ b/vulkan/vk_cpp.h @@ -1712,6 +1712,11 @@ namespace vk return *this; } + static Offset2D& null() + { + return *((Offset2D*)(nullptr)); + } + operator const VkOffset2D&() const { return m_offset2D; @@ -1795,6 +1800,11 @@ namespace vk return *this; } + static Offset3D& null() + { + return *((Offset3D*)(nullptr)); + } + operator const VkOffset3D&() const { return m_offset3D; @@ -1861,6 +1871,11 @@ namespace vk return *this; } + static Extent2D& null() + { + return *((Extent2D*)(nullptr)); + } + operator const VkExtent2D&() const { return m_extent2D; @@ -1944,6 +1959,11 @@ namespace vk return *this; } + static Extent3D& null() + { + return *((Extent3D*)(nullptr)); + } + operator const VkExtent3D&() const { return m_extent3D; @@ -2078,6 +2098,11 @@ namespace vk return *this; } + static Viewport& null() + { + return *((Viewport*)(nullptr)); + } + operator const VkViewport&() const { return m_viewport; @@ -2144,6 +2169,11 @@ namespace vk return *this; } + static Rect2D& null() + { + return *((Rect2D*)(nullptr)); + } + operator const VkRect2D&() const { return m_rect2D; @@ -2227,6 +2257,11 @@ namespace vk return *this; } + static ClearRect& null() + { + return *((ClearRect*)(nullptr)); + } + operator const VkClearRect&() const { return m_clearRect; @@ -2250,6 +2285,11 @@ namespace vk return m_extensionProperties.specVersion; } + static ExtensionProperties& null() + { + return *((ExtensionProperties*)(nullptr)); + } + operator const VkExtensionProperties&() const { return m_extensionProperties; @@ -2283,6 +2323,11 @@ namespace vk return reinterpret_cast( m_layerProperties.description ); } + static LayerProperties& null() + { + return *((LayerProperties*)(nullptr)); + } + operator const VkLayerProperties&() const { return m_layerProperties; @@ -2413,6 +2458,11 @@ namespace vk return *this; } + static AllocationCallbacks& null() + { + return *((AllocationCallbacks*)(nullptr)); + } + operator const VkAllocationCallbacks&() const { return m_allocationCallbacks; @@ -2441,6 +2491,11 @@ namespace vk return m_memoryRequirements.memoryTypeBits; } + static MemoryRequirements& null() + { + return *((MemoryRequirements*)(nullptr)); + } + operator const VkMemoryRequirements&() const { return m_memoryRequirements; @@ -2524,6 +2579,11 @@ namespace vk return *this; } + static DescriptorBufferInfo& null() + { + return *((DescriptorBufferInfo*)(nullptr)); + } + operator const VkDescriptorBufferInfo&() const { return m_descriptorBufferInfo; @@ -2641,6 +2701,11 @@ namespace vk return *this; } + static SubresourceLayout& null() + { + return *((SubresourceLayout*)(nullptr)); + } + operator const VkSubresourceLayout&() const { return m_subresourceLayout; @@ -2724,6 +2789,11 @@ namespace vk return *this; } + static BufferCopy& null() + { + return *((BufferCopy*)(nullptr)); + } + operator const VkBufferCopy&() const { return m_bufferCopy; @@ -2807,6 +2877,11 @@ namespace vk return *this; } + static SpecializationMapEntry& null() + { + return *((SpecializationMapEntry*)(nullptr)); + } + operator const VkSpecializationMapEntry&() const { return m_specializationMapEntry; @@ -2907,6 +2982,11 @@ namespace vk return *this; } + static SpecializationInfo& null() + { + return *((SpecializationInfo*)(nullptr)); + } + operator const VkSpecializationInfo&() const { return m_specializationInfo; @@ -3048,6 +3128,11 @@ namespace vk return *this; } + static ClearDepthStencilValue& null() + { + return *((ClearDepthStencilValue*)(nullptr)); + } + operator const VkClearDepthStencilValue&() const { return m_clearDepthStencilValue; @@ -4069,6 +4154,11 @@ namespace vk return *this; } + static PhysicalDeviceFeatures& null() + { + return *((PhysicalDeviceFeatures*)(nullptr)); + } + operator const VkPhysicalDeviceFeatures&() const { return m_physicalDeviceFeatures; @@ -4107,6 +4197,11 @@ namespace vk return m_physicalDeviceSparseProperties.residencyNonResidentStrict; } + static PhysicalDeviceSparseProperties& null() + { + return *((PhysicalDeviceSparseProperties*)(nullptr)); + } + operator const VkPhysicalDeviceSparseProperties&() const { return m_physicalDeviceSparseProperties; @@ -4207,6 +4302,11 @@ namespace vk return *this; } + static DrawIndirectCommand& null() + { + return *((DrawIndirectCommand*)(nullptr)); + } + operator const VkDrawIndirectCommand&() const { return m_drawIndirectCommand; @@ -4324,6 +4424,11 @@ namespace vk return *this; } + static DrawIndexedIndirectCommand& null() + { + return *((DrawIndexedIndirectCommand*)(nullptr)); + } + operator const VkDrawIndexedIndirectCommand&() const { return m_drawIndexedIndirectCommand; @@ -4407,6 +4512,11 @@ namespace vk return *this; } + static DispatchIndirectCommand& null() + { + return *((DispatchIndirectCommand*)(nullptr)); + } + operator const VkDispatchIndirectCommand&() const { return m_dispatchIndirectCommand; @@ -4473,6 +4583,11 @@ namespace vk return *this; } + static DisplayPlanePropertiesKHR& null() + { + return *((DisplayPlanePropertiesKHR*)(nullptr)); + } + operator const VkDisplayPlanePropertiesKHR&() const { return m_displayPlanePropertiesKHR; @@ -4539,6 +4654,11 @@ namespace vk return *this; } + static DisplayModeParametersKHR& null() + { + return *((DisplayModeParametersKHR*)(nullptr)); + } + operator const VkDisplayModeParametersKHR&() const { return m_displayModeParametersKHR; @@ -4605,6 +4725,11 @@ namespace vk return *this; } + static DisplayModePropertiesKHR& null() + { + return *((DisplayModePropertiesKHR*)(nullptr)); + } + operator const VkDisplayModePropertiesKHR&() const { return m_displayModePropertiesKHR; @@ -4702,6 +4827,11 @@ namespace vk return *this; } + static DescriptorImageInfo& null() + { + return *((DescriptorImageInfo*)(nullptr)); + } + operator const VkDescriptorImageInfo&() const { return m_descriptorImageInfo; @@ -4768,6 +4898,11 @@ namespace vk return *this; } + static AttachmentReference& null() + { + return *((AttachmentReference*)(nullptr)); + } + operator const VkAttachmentReference&() const { return m_attachmentReference; @@ -4922,6 +5057,11 @@ namespace vk return *this; } + static ComponentMapping& null() + { + return *((ComponentMapping*)(nullptr)); + } + operator const VkComponentMapping&() const { return m_componentMapping; @@ -5003,6 +5143,11 @@ namespace vk return *this; } + static DescriptorPoolSize& null() + { + return *((DescriptorPoolSize*)(nullptr)); + } + operator const VkDescriptorPoolSize&() const { return m_descriptorPoolSize; @@ -5228,6 +5373,11 @@ namespace vk return *this; } + static SubpassDescription& null() + { + return *((SubpassDescription*)(nullptr)); + } + operator const VkSubpassDescription&() const { return m_subpassDescription; @@ -5516,6 +5666,11 @@ namespace vk return *this; } + static StencilOpState& null() + { + return *((StencilOpState*)(nullptr)); + } + operator const VkStencilOpState&() const { return m_stencilOpState; @@ -5648,6 +5803,11 @@ namespace vk return *this; } + static VertexInputBindingDescription& null() + { + return *((VertexInputBindingDescription*)(nullptr)); + } + operator const VkVertexInputBindingDescription&() const { return m_vertexInputBindingDescription; @@ -5937,6 +6097,11 @@ namespace vk return *this; } + static VertexInputAttributeDescription& null() + { + return *((VertexInputAttributeDescription*)(nullptr)); + } + operator const VkVertexInputAttributeDescription&() const { return m_vertexInputAttributeDescription; @@ -6153,6 +6318,11 @@ namespace vk return *this; } + static ApplicationInfo& null() + { + return *((ApplicationInfo*)(nullptr)); + } + operator const VkApplicationInfo&() const { return m_applicationInfo; @@ -6287,6 +6457,11 @@ namespace vk return *this; } + static DeviceQueueCreateInfo& null() + { + return *((DeviceQueueCreateInfo*)(nullptr)); + } + operator const VkDeviceQueueCreateInfo&() const { return m_deviceQueueCreateInfo; @@ -6489,6 +6664,11 @@ namespace vk return *this; } + static DeviceCreateInfo& null() + { + return *((DeviceCreateInfo*)(nullptr)); + } + operator const VkDeviceCreateInfo&() const { return m_deviceCreateInfo; @@ -6657,6 +6837,11 @@ namespace vk return *this; } + static InstanceCreateInfo& null() + { + return *((InstanceCreateInfo*)(nullptr)); + } + operator const VkInstanceCreateInfo&() const { return m_instanceCreateInfo; @@ -6757,6 +6942,11 @@ namespace vk return *this; } + static MemoryAllocateInfo& null() + { + return *((MemoryAllocateInfo*)(nullptr)); + } + operator const VkMemoryAllocateInfo&() const { return m_memoryAllocateInfo; @@ -6874,6 +7064,11 @@ namespace vk return *this; } + static MappedMemoryRange& null() + { + return *((MappedMemoryRange*)(nullptr)); + } + operator const VkMappedMemoryRange&() const { return m_mappedMemoryRange; @@ -7076,6 +7271,11 @@ namespace vk return *this; } + static WriteDescriptorSet& null() + { + return *((WriteDescriptorSet*)(nullptr)); + } + operator const VkWriteDescriptorSet&() const { return m_writeDescriptorSet; @@ -7261,6 +7461,11 @@ namespace vk return *this; } + static CopyDescriptorSet& null() + { + return *((CopyDescriptorSet*)(nullptr)); + } + operator const VkCopyDescriptorSet&() const { return m_copyDescriptorSet; @@ -7412,6 +7617,11 @@ namespace vk return *this; } + static BufferViewCreateInfo& null() + { + return *((BufferViewCreateInfo*)(nullptr)); + } + operator const VkBufferViewCreateInfo&() const { return m_bufferViewCreateInfo; @@ -7529,6 +7739,11 @@ namespace vk return *this; } + static ShaderModuleCreateInfo& null() + { + return *((ShaderModuleCreateInfo*)(nullptr)); + } + operator const VkShaderModuleCreateInfo&() const { return m_shaderModuleCreateInfo; @@ -7646,6 +7861,11 @@ namespace vk return *this; } + static DescriptorSetAllocateInfo& null() + { + return *((DescriptorSetAllocateInfo*)(nullptr)); + } + operator const VkDescriptorSetAllocateInfo&() const { return m_descriptorSetAllocateInfo; @@ -7797,6 +8017,11 @@ namespace vk return *this; } + static PipelineVertexInputStateCreateInfo& null() + { + return *((PipelineVertexInputStateCreateInfo*)(nullptr)); + } + operator const VkPipelineVertexInputStateCreateInfo&() const { return m_pipelineVertexInputStateCreateInfo; @@ -7914,6 +8139,11 @@ namespace vk return *this; } + static PipelineInputAssemblyStateCreateInfo& null() + { + return *((PipelineInputAssemblyStateCreateInfo*)(nullptr)); + } + operator const VkPipelineInputAssemblyStateCreateInfo&() const { return m_pipelineInputAssemblyStateCreateInfo; @@ -8014,6 +8244,11 @@ namespace vk return *this; } + static PipelineTessellationStateCreateInfo& null() + { + return *((PipelineTessellationStateCreateInfo*)(nullptr)); + } + operator const VkPipelineTessellationStateCreateInfo&() const { return m_pipelineTessellationStateCreateInfo; @@ -8165,6 +8400,11 @@ namespace vk return *this; } + static PipelineViewportStateCreateInfo& null() + { + return *((PipelineViewportStateCreateInfo*)(nullptr)); + } + operator const VkPipelineViewportStateCreateInfo&() const { return m_pipelineViewportStateCreateInfo; @@ -8418,6 +8658,11 @@ namespace vk return *this; } + static PipelineRasterizationStateCreateInfo& null() + { + return *((PipelineRasterizationStateCreateInfo*)(nullptr)); + } + operator const VkPipelineRasterizationStateCreateInfo&() const { return m_pipelineRasterizationStateCreateInfo; @@ -8654,6 +8899,11 @@ namespace vk return *this; } + static PipelineDepthStencilStateCreateInfo& null() + { + return *((PipelineDepthStencilStateCreateInfo*)(nullptr)); + } + operator const VkPipelineDepthStencilStateCreateInfo&() const { return m_pipelineDepthStencilStateCreateInfo; @@ -8771,6 +9021,11 @@ namespace vk return *this; } + static PipelineCacheCreateInfo& null() + { + return *((PipelineCacheCreateInfo*)(nullptr)); + } + operator const VkPipelineCacheCreateInfo&() const { return m_pipelineCacheCreateInfo; @@ -9109,6 +9364,11 @@ namespace vk return *this; } + static SamplerCreateInfo& null() + { + return *((SamplerCreateInfo*)(nullptr)); + } + operator const VkSamplerCreateInfo&() const { return m_samplerCreateInfo; @@ -9226,6 +9486,11 @@ namespace vk return *this; } + static CommandBufferAllocateInfo& null() + { + return *((CommandBufferAllocateInfo*)(nullptr)); + } + operator const VkCommandBufferAllocateInfo&() const { return m_commandBufferAllocateInfo; @@ -9377,6 +9642,11 @@ namespace vk return *this; } + static RenderPassBeginInfo& null() + { + return *((RenderPassBeginInfo*)(nullptr)); + } + operator const VkRenderPassBeginInfo&() const { return m_renderPassBeginInfo; @@ -9460,6 +9730,11 @@ namespace vk return *this; } + static EventCreateInfo& null() + { + return *((EventCreateInfo*)(nullptr)); + } + operator const VkEventCreateInfo&() const { return m_eventCreateInfo; @@ -9543,6 +9818,11 @@ namespace vk return *this; } + static SemaphoreCreateInfo& null() + { + return *((SemaphoreCreateInfo*)(nullptr)); + } + operator const VkSemaphoreCreateInfo&() const { return m_semaphoreCreateInfo; @@ -9728,6 +10008,11 @@ namespace vk return *this; } + static FramebufferCreateInfo& null() + { + return *((FramebufferCreateInfo*)(nullptr)); + } + operator const VkFramebufferCreateInfo&() const { return m_framebufferCreateInfo; @@ -9828,6 +10113,11 @@ namespace vk return *this; } + static DisplayModeCreateInfoKHR& null() + { + return *((DisplayModeCreateInfoKHR*)(nullptr)); + } + operator const VkDisplayModeCreateInfoKHR&() const { return m_displayModeCreateInfoKHR; @@ -9945,6 +10235,11 @@ namespace vk return *this; } + static DisplayPresentInfoKHR& null() + { + return *((DisplayPresentInfoKHR*)(nullptr)); + } + operator const VkDisplayPresentInfoKHR&() const { return m_displayPresentInfoKHR; @@ -10046,6 +10341,11 @@ namespace vk return *this; } + static AndroidSurfaceCreateInfoKHR& null() + { + return *((AndroidSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkAndroidSurfaceCreateInfoKHR&() const { return m_androidSurfaceCreateInfoKHR; @@ -10165,6 +10465,11 @@ namespace vk return *this; } + static MirSurfaceCreateInfoKHR& null() + { + return *((MirSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkMirSurfaceCreateInfoKHR&() const { return m_mirSurfaceCreateInfoKHR; @@ -10284,6 +10589,11 @@ namespace vk return *this; } + static WaylandSurfaceCreateInfoKHR& null() + { + return *((WaylandSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkWaylandSurfaceCreateInfoKHR&() const { return m_waylandSurfaceCreateInfoKHR; @@ -10403,6 +10713,11 @@ namespace vk return *this; } + static Win32SurfaceCreateInfoKHR& null() + { + return *((Win32SurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkWin32SurfaceCreateInfoKHR&() const { return m_win32SurfaceCreateInfoKHR; @@ -10522,6 +10837,11 @@ namespace vk return *this; } + static XlibSurfaceCreateInfoKHR& null() + { + return *((XlibSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkXlibSurfaceCreateInfoKHR&() const { return m_xlibSurfaceCreateInfoKHR; @@ -10641,6 +10961,11 @@ namespace vk return *this; } + static XcbSurfaceCreateInfoKHR& null() + { + return *((XcbSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkXcbSurfaceCreateInfoKHR&() const { return m_xcbSurfaceCreateInfoKHR; @@ -10843,6 +11168,11 @@ namespace vk return *this; } + static PresentInfoKHR& null() + { + return *((PresentInfoKHR*)(nullptr)); + } + operator const VkPresentInfoKHR&() const { return m_presentInfoKHR; @@ -10973,6 +11303,11 @@ namespace vk return *this; } + static PipelineDynamicStateCreateInfo& null() + { + return *((PipelineDynamicStateCreateInfo*)(nullptr)); + } + operator const VkPipelineDynamicStateCreateInfo&() const { return m_pipelineDynamicStateCreateInfo; @@ -11021,6 +11356,11 @@ namespace vk return reinterpret_cast( m_queueFamilyProperties.minImageTransferGranularity ); } + static QueueFamilyProperties& null() + { + return *((QueueFamilyProperties*)(nullptr)); + } + operator const VkQueueFamilyProperties&() const { return m_queueFamilyProperties; @@ -11060,6 +11400,11 @@ namespace vk return m_memoryType.heapIndex; } + static MemoryType& null() + { + return *((MemoryType*)(nullptr)); + } + operator const VkMemoryType&() const { return m_memoryType; @@ -11095,6 +11440,11 @@ namespace vk return reinterpret_cast( m_memoryHeap.flags ); } + static MemoryHeap& null() + { + return *((MemoryHeap*)(nullptr)); + } + operator const VkMemoryHeap&() const { return m_memoryHeap; @@ -11128,6 +11478,11 @@ namespace vk return reinterpret_cast( m_physicalDeviceMemoryProperties.memoryHeaps ); } + static PhysicalDeviceMemoryProperties& null() + { + return *((PhysicalDeviceMemoryProperties*)(nullptr)); + } + operator const VkPhysicalDeviceMemoryProperties&() const { return m_physicalDeviceMemoryProperties; @@ -11256,6 +11611,11 @@ namespace vk return *this; } + static MemoryBarrier& null() + { + return *((MemoryBarrier*)(nullptr)); + } + operator const VkMemoryBarrier&() const { return m_memoryBarrier; @@ -11441,6 +11801,11 @@ namespace vk return *this; } + static BufferMemoryBarrier& null() + { + return *((BufferMemoryBarrier*)(nullptr)); + } + operator const VkBufferMemoryBarrier&() const { return m_bufferMemoryBarrier; @@ -11643,6 +12008,11 @@ namespace vk return *this; } + static BufferCreateInfo& null() + { + return *((BufferCreateInfo*)(nullptr)); + } + operator const VkBufferCreateInfo&() const { return m_bufferCreateInfo; @@ -11779,6 +12149,11 @@ namespace vk return *this; } + static DescriptorSetLayoutBinding& null() + { + return *((DescriptorSetLayoutBinding*)(nullptr)); + } + operator const VkDescriptorSetLayoutBinding&() const { return m_descriptorSetLayoutBinding; @@ -11896,6 +12271,11 @@ namespace vk return *this; } + static DescriptorSetLayoutCreateInfo& null() + { + return *((DescriptorSetLayoutCreateInfo*)(nullptr)); + } + operator const VkDescriptorSetLayoutCreateInfo&() const { return m_descriptorSetLayoutCreateInfo; @@ -12047,6 +12427,11 @@ namespace vk return *this; } + static PipelineShaderStageCreateInfo& null() + { + return *((PipelineShaderStageCreateInfo*)(nullptr)); + } + operator const VkPipelineShaderStageCreateInfo&() const { return m_pipelineShaderStageCreateInfo; @@ -12130,6 +12515,11 @@ namespace vk return *this; } + static PushConstantRange& null() + { + return *((PushConstantRange*)(nullptr)); + } + operator const VkPushConstantRange&() const { return m_pushConstantRange; @@ -12281,6 +12671,11 @@ namespace vk return *this; } + static PipelineLayoutCreateInfo& null() + { + return *((PipelineLayoutCreateInfo*)(nullptr)); + } + operator const VkPipelineLayoutCreateInfo&() const { return m_pipelineLayoutCreateInfo; @@ -12481,6 +12876,11 @@ namespace vk return *this; } + static ComputePipelineCreateInfo& null() + { + return *((ComputePipelineCreateInfo*)(nullptr)); + } + operator const VkComputePipelineCreateInfo&() const { return m_computePipelineCreateInfo; @@ -12664,6 +13064,11 @@ namespace vk return *this; } + static PipelineColorBlendAttachmentState& null() + { + return *((PipelineColorBlendAttachmentState*)(nullptr)); + } + operator const VkPipelineColorBlendAttachmentState&() const { return m_pipelineColorBlendAttachmentState; @@ -12832,6 +13237,11 @@ namespace vk return *this; } + static PipelineColorBlendStateCreateInfo& null() + { + return *((PipelineColorBlendStateCreateInfo*)(nullptr)); + } + operator const VkPipelineColorBlendStateCreateInfo&() const { return m_pipelineColorBlendStateCreateInfo; @@ -12927,6 +13337,11 @@ namespace vk return *this; } + static FenceCreateInfo& null() + { + return *((FenceCreateInfo*)(nullptr)); + } + operator const VkFenceCreateInfo&() const { return m_fenceCreateInfo; @@ -12979,6 +13394,11 @@ namespace vk return reinterpret_cast( m_formatProperties.bufferFeatures ); } + static FormatProperties& null() + { + return *((FormatProperties*)(nullptr)); + } + operator const VkFormatProperties&() const { return m_formatProperties; @@ -13210,6 +13630,11 @@ namespace vk return *this; } + static CommandBufferInheritanceInfo& null() + { + return *((CommandBufferInheritanceInfo*)(nullptr)); + } + operator const VkCommandBufferInheritanceInfo&() const { return m_commandBufferInheritanceInfo; @@ -13310,6 +13735,11 @@ namespace vk return *this; } + static CommandBufferBeginInfo& null() + { + return *((CommandBufferBeginInfo*)(nullptr)); + } + operator const VkCommandBufferBeginInfo&() const { return m_commandBufferBeginInfo; @@ -13444,6 +13874,11 @@ namespace vk return *this; } + static QueryPoolCreateInfo& null() + { + return *((QueryPoolCreateInfo*)(nullptr)); + } + operator const VkQueryPoolCreateInfo&() const { return m_queryPoolCreateInfo; @@ -13542,6 +13977,11 @@ namespace vk return *this; } + static ImageSubresource& null() + { + return *((ImageSubresource*)(nullptr)); + } + operator const VkImageSubresource&() const { return m_imageSubresource; @@ -13642,6 +14082,11 @@ namespace vk return *this; } + static ImageSubresourceLayers& null() + { + return *((ImageSubresourceLayers*)(nullptr)); + } + operator const VkImageSubresourceLayers&() const { return m_imageSubresourceLayers; @@ -13759,6 +14204,11 @@ namespace vk return *this; } + static ImageSubresourceRange& null() + { + return *((ImageSubresourceRange*)(nullptr)); + } + operator const VkImageSubresourceRange&() const { return m_imageSubresourceRange; @@ -13961,6 +14411,11 @@ namespace vk return *this; } + static ImageMemoryBarrier& null() + { + return *((ImageMemoryBarrier*)(nullptr)); + } + operator const VkImageMemoryBarrier&() const { return m_imageMemoryBarrier; @@ -14129,6 +14584,11 @@ namespace vk return *this; } + static ImageViewCreateInfo& null() + { + return *((ImageViewCreateInfo*)(nullptr)); + } + operator const VkImageViewCreateInfo&() const { return m_imageViewCreateInfo; @@ -14246,6 +14706,11 @@ namespace vk return *this; } + static ImageCopy& null() + { + return *((ImageCopy*)(nullptr)); + } + operator const VkImageCopy&() const { return m_imageCopy; @@ -14346,6 +14811,11 @@ namespace vk return *this; } + static ImageBlit& null() + { + return *((ImageBlit*)(nullptr)); + } + operator const VkImageBlit&() const { return m_imageBlit; @@ -14480,6 +14950,11 @@ namespace vk return *this; } + static BufferImageCopy& null() + { + return *((BufferImageCopy*)(nullptr)); + } + operator const VkBufferImageCopy&() const { return m_bufferImageCopy; @@ -14597,6 +15072,11 @@ namespace vk return *this; } + static ImageResolve& null() + { + return *((ImageResolve*)(nullptr)); + } + operator const VkImageResolve&() const { return m_imageResolve; @@ -14680,6 +15160,11 @@ namespace vk return *this; } + static ClearAttachment& null() + { + return *((ClearAttachment*)(nullptr)); + } + operator const VkClearAttachment&() const { return m_clearAttachment; @@ -14722,6 +15207,11 @@ namespace vk return reinterpret_cast( m_sparseImageFormatProperties.flags ); } + static SparseImageFormatProperties& null() + { + return *((SparseImageFormatProperties*)(nullptr)); + } + operator const VkSparseImageFormatProperties&() const { return m_sparseImageFormatProperties; @@ -14760,6 +15250,11 @@ namespace vk return m_sparseImageMemoryRequirements.imageMipTailStride; } + static SparseImageMemoryRequirements& null() + { + return *((SparseImageMemoryRequirements*)(nullptr)); + } + operator const VkSparseImageMemoryRequirements&() const { return m_sparseImageMemoryRequirements; @@ -14889,6 +15384,11 @@ namespace vk return *this; } + static SparseMemoryBind& null() + { + return *((SparseMemoryBind*)(nullptr)); + } + operator const VkSparseMemoryBind&() const { return m_sparseMemoryBind; @@ -15023,6 +15523,11 @@ namespace vk return *this; } + static SparseImageMemoryBind& null() + { + return *((SparseImageMemoryBind*)(nullptr)); + } + operator const VkSparseImageMemoryBind&() const { return m_sparseImageMemoryBind; @@ -15106,6 +15611,11 @@ namespace vk return *this; } + static SparseBufferMemoryBindInfo& null() + { + return *((SparseBufferMemoryBindInfo*)(nullptr)); + } + operator const VkSparseBufferMemoryBindInfo&() const { return m_sparseBufferMemoryBindInfo; @@ -15189,6 +15699,11 @@ namespace vk return *this; } + static SparseImageOpaqueMemoryBindInfo& null() + { + return *((SparseImageOpaqueMemoryBindInfo*)(nullptr)); + } + operator const VkSparseImageOpaqueMemoryBindInfo&() const { return m_sparseImageOpaqueMemoryBindInfo; @@ -15272,6 +15787,11 @@ namespace vk return *this; } + static SparseImageMemoryBindInfo& null() + { + return *((SparseImageMemoryBindInfo*)(nullptr)); + } + operator const VkSparseImageMemoryBindInfo&() const { return m_sparseImageMemoryBindInfo; @@ -15508,6 +16028,11 @@ namespace vk return *this; } + static BindSparseInfo& null() + { + return *((BindSparseInfo*)(nullptr)); + } + operator const VkBindSparseInfo&() const { return m_bindSparseInfo; @@ -15649,6 +16174,11 @@ namespace vk return *this; } + static CommandPoolCreateInfo& null() + { + return *((CommandPoolCreateInfo*)(nullptr)); + } + operator const VkCommandPoolCreateInfo&() const { return m_commandPoolCreateInfo; @@ -15729,6 +16259,11 @@ namespace vk return m_imageFormatProperties.maxResourceSize; } + static ImageFormatProperties& null() + { + return *((ImageFormatProperties*)(nullptr)); + } + operator const VkImageFormatProperties&() const { return m_imageFormatProperties; @@ -16016,6 +16551,11 @@ namespace vk return *this; } + static ImageCreateInfo& null() + { + return *((ImageCreateInfo*)(nullptr)); + } + operator const VkImageCreateInfo&() const { return m_imageCreateInfo; @@ -16201,6 +16741,11 @@ namespace vk return *this; } + static PipelineMultisampleStateCreateInfo& null() + { + return *((PipelineMultisampleStateCreateInfo*)(nullptr)); + } + operator const VkPipelineMultisampleStateCreateInfo&() const { return m_pipelineMultisampleStateCreateInfo; @@ -16556,6 +17101,11 @@ namespace vk return *this; } + static GraphicsPipelineCreateInfo& null() + { + return *((GraphicsPipelineCreateInfo*)(nullptr)); + } + operator const VkGraphicsPipelineCreateInfo&() const { return m_graphicsPipelineCreateInfo; @@ -17099,6 +17649,11 @@ namespace vk return m_physicalDeviceLimits.nonCoherentAtomSize; } + static PhysicalDeviceLimits& null() + { + return *((PhysicalDeviceLimits*)(nullptr)); + } + operator const VkPhysicalDeviceLimits&() const { return m_physicalDeviceLimits; @@ -17157,6 +17712,11 @@ namespace vk return reinterpret_cast( m_physicalDeviceProperties.sparseProperties ); } + static PhysicalDeviceProperties& null() + { + return *((PhysicalDeviceProperties*)(nullptr)); + } + operator const VkPhysicalDeviceProperties&() const { return m_physicalDeviceProperties; @@ -17354,6 +17914,11 @@ namespace vk return *this; } + static AttachmentDescription& null() + { + return *((AttachmentDescription*)(nullptr)); + } + operator const VkAttachmentDescription&() const { return m_attachmentDescription; @@ -17514,6 +18079,11 @@ namespace vk return *this; } + static DescriptorPoolCreateInfo& null() + { + return *((DescriptorPoolCreateInfo*)(nullptr)); + } + operator const VkDescriptorPoolCreateInfo&() const { return m_descriptorPoolCreateInfo; @@ -17974,6 +18544,11 @@ namespace vk return *this; } + static SubpassDependency& null() + { + return *((SubpassDependency*)(nullptr)); + } + operator const VkSubpassDependency&() const { return m_subpassDependency; @@ -18159,6 +18734,11 @@ namespace vk return *this; } + static RenderPassCreateInfo& null() + { + return *((RenderPassCreateInfo*)(nullptr)); + } + operator const VkRenderPassCreateInfo&() const { return m_renderPassCreateInfo; @@ -18344,6 +18924,11 @@ namespace vk return *this; } + static SubmitInfo& null() + { + return *((SubmitInfo*)(nullptr)); + } + operator const VkSubmitInfo&() const { return m_submitInfo; @@ -18504,6 +19089,11 @@ namespace vk return *this; } + static SurfaceFormatKHR& null() + { + return *((SurfaceFormatKHR*)(nullptr)); + } + operator const VkSurfaceFormatKHR&() const { return m_surfaceFormatKHR; @@ -18704,6 +19294,11 @@ namespace vk return *this; } + static DisplayPlaneCapabilitiesKHR& null() + { + return *((DisplayPlaneCapabilitiesKHR*)(nullptr)); + } + operator const VkDisplayPlaneCapabilitiesKHR&() const { return m_displayPlaneCapabilitiesKHR; @@ -18890,6 +19485,11 @@ namespace vk return *this; } + static DisplayPropertiesKHR& null() + { + return *((DisplayPropertiesKHR*)(nullptr)); + } + operator const VkDisplayPropertiesKHR&() const { return m_displayPropertiesKHR; @@ -19092,6 +19692,11 @@ namespace vk return *this; } + static DisplaySurfaceCreateInfoKHR& null() + { + return *((DisplaySurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkDisplaySurfaceCreateInfoKHR&() const { return m_displaySurfaceCreateInfoKHR; @@ -19294,6 +19899,11 @@ namespace vk return *this; } + static SurfaceCapabilitiesKHR& null() + { + return *((SurfaceCapabilitiesKHR*)(nullptr)); + } + operator const VkSurfaceCapabilitiesKHR&() const { return m_surfaceCapabilitiesKHR; @@ -19632,6 +20242,11 @@ namespace vk return *this; } + static SwapchainCreateInfoKHR& null() + { + return *((SwapchainCreateInfoKHR*)(nullptr)); + } + operator const VkSwapchainCreateInfoKHR&() const { return m_swapchainCreateInfoKHR; @@ -20779,6 +21394,11 @@ namespace vk return *this; } + static DebugReportCallbackCreateInfoEXT& null() + { + return *((DebugReportCallbackCreateInfoEXT*)(nullptr)); + } + operator const VkDebugReportCallbackCreateInfoEXT&() const { return m_debugReportCallbackCreateInfoEXT;