From 9c6888edf3c78c334a4b16a6e9d24e1b82e94067 Mon Sep 17 00:00:00 2001 From: Markus Tavenrath Date: Fri, 26 Feb 2016 11:41:21 +0100 Subject: [PATCH] Fix issue #34, provide null() references for structs --- README.md | 4 + VkCppGenerator.cpp | 7 + vulkan/vk_cpp.h | 620 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 631 insertions(+) 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 02060fc..6485920 100644 --- a/VkCppGenerator.cpp +++ b/VkCppGenerator.cpp @@ -2555,6 +2555,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 3e973a6..ba5903d 100644 --- a/vulkan/vk_cpp.h +++ b/vulkan/vk_cpp.h @@ -1702,6 +1702,11 @@ namespace vk return *this; } + static Offset2D& null() + { + return *((Offset2D*)(nullptr)); + } + operator const VkOffset2D&() const { return m_offset2D; @@ -1770,6 +1775,11 @@ namespace vk return *this; } + static Offset3D& null() + { + return *((Offset3D*)(nullptr)); + } + operator const VkOffset3D&() const { return m_offset3D; @@ -1826,6 +1836,11 @@ namespace vk return *this; } + static Extent2D& null() + { + return *((Extent2D*)(nullptr)); + } + operator const VkExtent2D&() const { return m_extent2D; @@ -1894,6 +1909,11 @@ namespace vk return *this; } + static Extent3D& null() + { + return *((Extent3D*)(nullptr)); + } + operator const VkExtent3D&() const { return m_extent3D; @@ -1998,6 +2018,11 @@ namespace vk return *this; } + static Viewport& null() + { + return *((Viewport*)(nullptr)); + } + operator const VkViewport&() const { return m_viewport; @@ -2054,6 +2079,11 @@ namespace vk return *this; } + static Rect2D& null() + { + return *((Rect2D*)(nullptr)); + } + operator const VkRect2D&() const { return m_rect2D; @@ -2122,6 +2152,11 @@ namespace vk return *this; } + static ClearRect& null() + { + return *((ClearRect*)(nullptr)); + } + operator const VkClearRect&() const { return m_clearRect; @@ -2145,6 +2180,11 @@ namespace vk return m_extensionProperties.specVersion; } + static ExtensionProperties& null() + { + return *((ExtensionProperties*)(nullptr)); + } + operator const VkExtensionProperties&() const { return m_extensionProperties; @@ -2178,6 +2218,11 @@ namespace vk return reinterpret_cast( m_layerProperties.description ); } + static LayerProperties& null() + { + return *((LayerProperties*)(nullptr)); + } + operator const VkLayerProperties&() const { return m_layerProperties; @@ -2278,6 +2323,11 @@ namespace vk return *this; } + static AllocationCallbacks& null() + { + return *((AllocationCallbacks*)(nullptr)); + } + operator const VkAllocationCallbacks&() const { return m_allocationCallbacks; @@ -2306,6 +2356,11 @@ namespace vk return m_memoryRequirements.memoryTypeBits; } + static MemoryRequirements& null() + { + return *((MemoryRequirements*)(nullptr)); + } + operator const VkMemoryRequirements&() const { return m_memoryRequirements; @@ -2374,6 +2429,11 @@ namespace vk return *this; } + static DescriptorBufferInfo& null() + { + return *((DescriptorBufferInfo*)(nullptr)); + } + operator const VkDescriptorBufferInfo&() const { return m_descriptorBufferInfo; @@ -2466,6 +2526,11 @@ namespace vk return *this; } + static SubresourceLayout& null() + { + return *((SubresourceLayout*)(nullptr)); + } + operator const VkSubresourceLayout&() const { return m_subresourceLayout; @@ -2534,6 +2599,11 @@ namespace vk return *this; } + static BufferCopy& null() + { + return *((BufferCopy*)(nullptr)); + } + operator const VkBufferCopy&() const { return m_bufferCopy; @@ -2602,6 +2672,11 @@ namespace vk return *this; } + static SpecializationMapEntry& null() + { + return *((SpecializationMapEntry*)(nullptr)); + } + operator const VkSpecializationMapEntry&() const { return m_specializationMapEntry; @@ -2682,6 +2757,11 @@ namespace vk return *this; } + static SpecializationInfo& null() + { + return *((SpecializationInfo*)(nullptr)); + } + operator const VkSpecializationInfo&() const { return m_specializationInfo; @@ -2798,6 +2878,11 @@ namespace vk return *this; } + static ClearDepthStencilValue& null() + { + return *((ClearDepthStencilValue*)(nullptr)); + } + operator const VkClearDepthStencilValue&() const { return m_clearDepthStencilValue; @@ -3534,6 +3619,11 @@ namespace vk return *this; } + static PhysicalDeviceFeatures& null() + { + return *((PhysicalDeviceFeatures*)(nullptr)); + } + operator const VkPhysicalDeviceFeatures&() const { return m_physicalDeviceFeatures; @@ -3572,6 +3662,11 @@ namespace vk return m_physicalDeviceSparseProperties.residencyNonResidentStrict; } + static PhysicalDeviceSparseProperties& null() + { + return *((PhysicalDeviceSparseProperties*)(nullptr)); + } + operator const VkPhysicalDeviceSparseProperties&() const { return m_physicalDeviceSparseProperties; @@ -3652,6 +3747,11 @@ namespace vk return *this; } + static DrawIndirectCommand& null() + { + return *((DrawIndirectCommand*)(nullptr)); + } + operator const VkDrawIndirectCommand&() const { return m_drawIndirectCommand; @@ -3744,6 +3844,11 @@ namespace vk return *this; } + static DrawIndexedIndirectCommand& null() + { + return *((DrawIndexedIndirectCommand*)(nullptr)); + } + operator const VkDrawIndexedIndirectCommand&() const { return m_drawIndexedIndirectCommand; @@ -3812,6 +3917,11 @@ namespace vk return *this; } + static DispatchIndirectCommand& null() + { + return *((DispatchIndirectCommand*)(nullptr)); + } + operator const VkDispatchIndirectCommand&() const { return m_dispatchIndirectCommand; @@ -3868,6 +3978,11 @@ namespace vk return *this; } + static DisplayPlanePropertiesKHR& null() + { + return *((DisplayPlanePropertiesKHR*)(nullptr)); + } + operator const VkDisplayPlanePropertiesKHR&() const { return m_displayPlanePropertiesKHR; @@ -3924,6 +4039,11 @@ namespace vk return *this; } + static DisplayModeParametersKHR& null() + { + return *((DisplayModeParametersKHR*)(nullptr)); + } + operator const VkDisplayModeParametersKHR&() const { return m_displayModeParametersKHR; @@ -3980,6 +4100,11 @@ namespace vk return *this; } + static DisplayModePropertiesKHR& null() + { + return *((DisplayModePropertiesKHR*)(nullptr)); + } + operator const VkDisplayModePropertiesKHR&() const { return m_displayModePropertiesKHR; @@ -4062,6 +4187,11 @@ namespace vk return *this; } + static DescriptorImageInfo& null() + { + return *((DescriptorImageInfo*)(nullptr)); + } + operator const VkDescriptorImageInfo&() const { return m_descriptorImageInfo; @@ -4118,6 +4248,11 @@ namespace vk return *this; } + static AttachmentReference& null() + { + return *((AttachmentReference*)(nullptr)); + } + operator const VkAttachmentReference&() const { return m_attachmentReference; @@ -4252,6 +4387,11 @@ namespace vk return *this; } + static ComponentMapping& null() + { + return *((ComponentMapping*)(nullptr)); + } + operator const VkComponentMapping&() const { return m_componentMapping; @@ -4323,6 +4463,11 @@ namespace vk return *this; } + static DescriptorPoolSize& null() + { + return *((DescriptorPoolSize*)(nullptr)); + } + operator const VkDescriptorPoolSize&() const { return m_descriptorPoolSize; @@ -4498,6 +4643,11 @@ namespace vk return *this; } + static SubpassDescription& null() + { + return *((SubpassDescription*)(nullptr)); + } + operator const VkSubpassDescription&() const { return m_subpassDescription; @@ -4751,6 +4901,11 @@ namespace vk return *this; } + static StencilOpState& null() + { + return *((StencilOpState*)(nullptr)); + } + operator const VkStencilOpState&() const { return m_stencilOpState; @@ -4868,6 +5023,11 @@ namespace vk return *this; } + static VertexInputBindingDescription& null() + { + return *((VertexInputBindingDescription*)(nullptr)); + } + operator const VkVertexInputBindingDescription&() const { return m_vertexInputBindingDescription; @@ -5137,6 +5297,11 @@ namespace vk return *this; } + static VertexInputAttributeDescription& null() + { + return *((VertexInputAttributeDescription*)(nullptr)); + } + operator const VkVertexInputAttributeDescription&() const { return m_vertexInputAttributeDescription; @@ -5318,6 +5483,11 @@ namespace vk return *this; } + static ApplicationInfo& null() + { + return *((ApplicationInfo*)(nullptr)); + } + operator const VkApplicationInfo&() const { return m_applicationInfo; @@ -5422,6 +5592,11 @@ namespace vk return *this; } + static DeviceQueueCreateInfo& null() + { + return *((DeviceQueueCreateInfo*)(nullptr)); + } + operator const VkDeviceQueueCreateInfo&() const { return m_deviceQueueCreateInfo; @@ -5574,6 +5749,11 @@ namespace vk return *this; } + static DeviceCreateInfo& null() + { + return *((DeviceCreateInfo*)(nullptr)); + } + operator const VkDeviceCreateInfo&() const { return m_deviceCreateInfo; @@ -5702,6 +5882,11 @@ namespace vk return *this; } + static InstanceCreateInfo& null() + { + return *((InstanceCreateInfo*)(nullptr)); + } + operator const VkInstanceCreateInfo&() const { return m_instanceCreateInfo; @@ -5782,6 +5967,11 @@ namespace vk return *this; } + static MemoryAllocateInfo& null() + { + return *((MemoryAllocateInfo*)(nullptr)); + } + operator const VkMemoryAllocateInfo&() const { return m_memoryAllocateInfo; @@ -5874,6 +6064,11 @@ namespace vk return *this; } + static MappedMemoryRange& null() + { + return *((MappedMemoryRange*)(nullptr)); + } + operator const VkMappedMemoryRange&() const { return m_mappedMemoryRange; @@ -6026,6 +6221,11 @@ namespace vk return *this; } + static WriteDescriptorSet& null() + { + return *((WriteDescriptorSet*)(nullptr)); + } + operator const VkWriteDescriptorSet&() const { return m_writeDescriptorSet; @@ -6166,6 +6366,11 @@ namespace vk return *this; } + static CopyDescriptorSet& null() + { + return *((CopyDescriptorSet*)(nullptr)); + } + operator const VkCopyDescriptorSet&() const { return m_copyDescriptorSet; @@ -6282,6 +6487,11 @@ namespace vk return *this; } + static BufferViewCreateInfo& null() + { + return *((BufferViewCreateInfo*)(nullptr)); + } + operator const VkBufferViewCreateInfo&() const { return m_bufferViewCreateInfo; @@ -6374,6 +6584,11 @@ namespace vk return *this; } + static ShaderModuleCreateInfo& null() + { + return *((ShaderModuleCreateInfo*)(nullptr)); + } + operator const VkShaderModuleCreateInfo&() const { return m_shaderModuleCreateInfo; @@ -6466,6 +6681,11 @@ namespace vk return *this; } + static DescriptorSetAllocateInfo& null() + { + return *((DescriptorSetAllocateInfo*)(nullptr)); + } + operator const VkDescriptorSetAllocateInfo&() const { return m_descriptorSetAllocateInfo; @@ -6582,6 +6802,11 @@ namespace vk return *this; } + static PipelineVertexInputStateCreateInfo& null() + { + return *((PipelineVertexInputStateCreateInfo*)(nullptr)); + } + operator const VkPipelineVertexInputStateCreateInfo&() const { return m_pipelineVertexInputStateCreateInfo; @@ -6674,6 +6899,11 @@ namespace vk return *this; } + static PipelineInputAssemblyStateCreateInfo& null() + { + return *((PipelineInputAssemblyStateCreateInfo*)(nullptr)); + } + operator const VkPipelineInputAssemblyStateCreateInfo&() const { return m_pipelineInputAssemblyStateCreateInfo; @@ -6754,6 +6984,11 @@ namespace vk return *this; } + static PipelineTessellationStateCreateInfo& null() + { + return *((PipelineTessellationStateCreateInfo*)(nullptr)); + } + operator const VkPipelineTessellationStateCreateInfo&() const { return m_pipelineTessellationStateCreateInfo; @@ -6870,6 +7105,11 @@ namespace vk return *this; } + static PipelineViewportStateCreateInfo& null() + { + return *((PipelineViewportStateCreateInfo*)(nullptr)); + } + operator const VkPipelineViewportStateCreateInfo&() const { return m_pipelineViewportStateCreateInfo; @@ -7058,6 +7298,11 @@ namespace vk return *this; } + static PipelineRasterizationStateCreateInfo& null() + { + return *((PipelineRasterizationStateCreateInfo*)(nullptr)); + } + operator const VkPipelineRasterizationStateCreateInfo&() const { return m_pipelineRasterizationStateCreateInfo; @@ -7234,6 +7479,11 @@ namespace vk return *this; } + static PipelineDepthStencilStateCreateInfo& null() + { + return *((PipelineDepthStencilStateCreateInfo*)(nullptr)); + } + operator const VkPipelineDepthStencilStateCreateInfo&() const { return m_pipelineDepthStencilStateCreateInfo; @@ -7326,6 +7576,11 @@ namespace vk return *this; } + static PipelineCacheCreateInfo& null() + { + return *((PipelineCacheCreateInfo*)(nullptr)); + } + operator const VkPipelineCacheCreateInfo&() const { return m_pipelineCacheCreateInfo; @@ -7574,6 +7829,11 @@ namespace vk return *this; } + static SamplerCreateInfo& null() + { + return *((SamplerCreateInfo*)(nullptr)); + } + operator const VkSamplerCreateInfo&() const { return m_samplerCreateInfo; @@ -7666,6 +7926,11 @@ namespace vk return *this; } + static CommandBufferAllocateInfo& null() + { + return *((CommandBufferAllocateInfo*)(nullptr)); + } + operator const VkCommandBufferAllocateInfo&() const { return m_commandBufferAllocateInfo; @@ -7782,6 +8047,11 @@ namespace vk return *this; } + static RenderPassBeginInfo& null() + { + return *((RenderPassBeginInfo*)(nullptr)); + } + operator const VkRenderPassBeginInfo&() const { return m_renderPassBeginInfo; @@ -7850,6 +8120,11 @@ namespace vk return *this; } + static EventCreateInfo& null() + { + return *((EventCreateInfo*)(nullptr)); + } + operator const VkEventCreateInfo&() const { return m_eventCreateInfo; @@ -7918,6 +8193,11 @@ namespace vk return *this; } + static SemaphoreCreateInfo& null() + { + return *((SemaphoreCreateInfo*)(nullptr)); + } + operator const VkSemaphoreCreateInfo&() const { return m_semaphoreCreateInfo; @@ -8058,6 +8338,11 @@ namespace vk return *this; } + static FramebufferCreateInfo& null() + { + return *((FramebufferCreateInfo*)(nullptr)); + } + operator const VkFramebufferCreateInfo&() const { return m_framebufferCreateInfo; @@ -8138,6 +8423,11 @@ namespace vk return *this; } + static DisplayModeCreateInfoKHR& null() + { + return *((DisplayModeCreateInfoKHR*)(nullptr)); + } + operator const VkDisplayModeCreateInfoKHR&() const { return m_displayModeCreateInfoKHR; @@ -8230,6 +8520,11 @@ namespace vk return *this; } + static DisplayPresentInfoKHR& null() + { + return *((DisplayPresentInfoKHR*)(nullptr)); + } + operator const VkDisplayPresentInfoKHR&() const { return m_displayPresentInfoKHR; @@ -8311,6 +8606,11 @@ namespace vk return *this; } + static AndroidSurfaceCreateInfoKHR& null() + { + return *((AndroidSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkAndroidSurfaceCreateInfoKHR&() const { return m_androidSurfaceCreateInfoKHR; @@ -8405,6 +8705,11 @@ namespace vk return *this; } + static MirSurfaceCreateInfoKHR& null() + { + return *((MirSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkMirSurfaceCreateInfoKHR&() const { return m_mirSurfaceCreateInfoKHR; @@ -8499,6 +8804,11 @@ namespace vk return *this; } + static WaylandSurfaceCreateInfoKHR& null() + { + return *((WaylandSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkWaylandSurfaceCreateInfoKHR&() const { return m_waylandSurfaceCreateInfoKHR; @@ -8593,6 +8903,11 @@ namespace vk return *this; } + static Win32SurfaceCreateInfoKHR& null() + { + return *((Win32SurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkWin32SurfaceCreateInfoKHR&() const { return m_win32SurfaceCreateInfoKHR; @@ -8687,6 +9002,11 @@ namespace vk return *this; } + static XlibSurfaceCreateInfoKHR& null() + { + return *((XlibSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkXlibSurfaceCreateInfoKHR&() const { return m_xlibSurfaceCreateInfoKHR; @@ -8781,6 +9101,11 @@ namespace vk return *this; } + static XcbSurfaceCreateInfoKHR& null() + { + return *((XcbSurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkXcbSurfaceCreateInfoKHR&() const { return m_xcbSurfaceCreateInfoKHR; @@ -8943,6 +9268,11 @@ namespace vk return *this; } + static PresentInfoKHR& null() + { + return *((PresentInfoKHR*)(nullptr)); + } + operator const VkPresentInfoKHR&() const { return m_presentInfoKHR; @@ -9048,6 +9378,11 @@ namespace vk return *this; } + static PipelineDynamicStateCreateInfo& null() + { + return *((PipelineDynamicStateCreateInfo*)(nullptr)); + } + operator const VkPipelineDynamicStateCreateInfo&() const { return m_pipelineDynamicStateCreateInfo; @@ -9096,6 +9431,11 @@ namespace vk return reinterpret_cast( m_queueFamilyProperties.minImageTransferGranularity ); } + static QueueFamilyProperties& null() + { + return *((QueueFamilyProperties*)(nullptr)); + } + operator const VkQueueFamilyProperties&() const { return m_queueFamilyProperties; @@ -9135,6 +9475,11 @@ namespace vk return m_memoryType.heapIndex; } + static MemoryType& null() + { + return *((MemoryType*)(nullptr)); + } + operator const VkMemoryType&() const { return m_memoryType; @@ -9170,6 +9515,11 @@ namespace vk return reinterpret_cast( m_memoryHeap.flags ); } + static MemoryHeap& null() + { + return *((MemoryHeap*)(nullptr)); + } + operator const VkMemoryHeap&() const { return m_memoryHeap; @@ -9203,6 +9553,11 @@ namespace vk return reinterpret_cast( m_physicalDeviceMemoryProperties.memoryHeaps ); } + static PhysicalDeviceMemoryProperties& null() + { + return *((PhysicalDeviceMemoryProperties*)(nullptr)); + } + operator const VkPhysicalDeviceMemoryProperties&() const { return m_physicalDeviceMemoryProperties; @@ -9311,6 +9666,11 @@ namespace vk return *this; } + static MemoryBarrier& null() + { + return *((MemoryBarrier*)(nullptr)); + } + operator const VkMemoryBarrier&() const { return m_memoryBarrier; @@ -9451,6 +9811,11 @@ namespace vk return *this; } + static BufferMemoryBarrier& null() + { + return *((BufferMemoryBarrier*)(nullptr)); + } + operator const VkBufferMemoryBarrier&() const { return m_bufferMemoryBarrier; @@ -9613,6 +9978,11 @@ namespace vk return *this; } + static BufferCreateInfo& null() + { + return *((BufferCreateInfo*)(nullptr)); + } + operator const VkBufferCreateInfo&() const { return m_bufferCreateInfo; @@ -9724,6 +10094,11 @@ namespace vk return *this; } + static DescriptorSetLayoutBinding& null() + { + return *((DescriptorSetLayoutBinding*)(nullptr)); + } + operator const VkDescriptorSetLayoutBinding&() const { return m_descriptorSetLayoutBinding; @@ -9816,6 +10191,11 @@ namespace vk return *this; } + static DescriptorSetLayoutCreateInfo& null() + { + return *((DescriptorSetLayoutCreateInfo*)(nullptr)); + } + operator const VkDescriptorSetLayoutCreateInfo&() const { return m_descriptorSetLayoutCreateInfo; @@ -9932,6 +10312,11 @@ namespace vk return *this; } + static PipelineShaderStageCreateInfo& null() + { + return *((PipelineShaderStageCreateInfo*)(nullptr)); + } + operator const VkPipelineShaderStageCreateInfo&() const { return m_pipelineShaderStageCreateInfo; @@ -10000,6 +10385,11 @@ namespace vk return *this; } + static PushConstantRange& null() + { + return *((PushConstantRange*)(nullptr)); + } + operator const VkPushConstantRange&() const { return m_pushConstantRange; @@ -10116,6 +10506,11 @@ namespace vk return *this; } + static PipelineLayoutCreateInfo& null() + { + return *((PipelineLayoutCreateInfo*)(nullptr)); + } + operator const VkPipelineLayoutCreateInfo&() const { return m_pipelineLayoutCreateInfo; @@ -10281,6 +10676,11 @@ namespace vk return *this; } + static ComputePipelineCreateInfo& null() + { + return *((ComputePipelineCreateInfo*)(nullptr)); + } + operator const VkComputePipelineCreateInfo&() const { return m_computePipelineCreateInfo; @@ -10424,6 +10824,11 @@ namespace vk return *this; } + static PipelineColorBlendAttachmentState& null() + { + return *((PipelineColorBlendAttachmentState*)(nullptr)); + } + operator const VkPipelineColorBlendAttachmentState&() const { return m_pipelineColorBlendAttachmentState; @@ -10552,6 +10957,11 @@ namespace vk return *this; } + static PipelineColorBlendStateCreateInfo& null() + { + return *((PipelineColorBlendStateCreateInfo*)(nullptr)); + } + operator const VkPipelineColorBlendStateCreateInfo&() const { return m_pipelineColorBlendStateCreateInfo; @@ -10632,6 +11042,11 @@ namespace vk return *this; } + static FenceCreateInfo& null() + { + return *((FenceCreateInfo*)(nullptr)); + } + operator const VkFenceCreateInfo&() const { return m_fenceCreateInfo; @@ -10684,6 +11099,11 @@ namespace vk return reinterpret_cast( m_formatProperties.bufferFeatures ); } + static FormatProperties& null() + { + return *((FormatProperties*)(nullptr)); + } + operator const VkFormatProperties&() const { return m_formatProperties; @@ -10875,6 +11295,11 @@ namespace vk return *this; } + static CommandBufferInheritanceInfo& null() + { + return *((CommandBufferInheritanceInfo*)(nullptr)); + } + operator const VkCommandBufferInheritanceInfo&() const { return m_commandBufferInheritanceInfo; @@ -10955,6 +11380,11 @@ namespace vk return *this; } + static CommandBufferBeginInfo& null() + { + return *((CommandBufferBeginInfo*)(nullptr)); + } + operator const VkCommandBufferBeginInfo&() const { return m_commandBufferBeginInfo; @@ -11059,6 +11489,11 @@ namespace vk return *this; } + static QueryPoolCreateInfo& null() + { + return *((QueryPoolCreateInfo*)(nullptr)); + } + operator const VkQueryPoolCreateInfo&() const { return m_queryPoolCreateInfo; @@ -11142,6 +11577,11 @@ namespace vk return *this; } + static ImageSubresource& null() + { + return *((ImageSubresource*)(nullptr)); + } + operator const VkImageSubresource&() const { return m_imageSubresource; @@ -11222,6 +11662,11 @@ namespace vk return *this; } + static ImageSubresourceLayers& null() + { + return *((ImageSubresourceLayers*)(nullptr)); + } + operator const VkImageSubresourceLayers&() const { return m_imageSubresourceLayers; @@ -11314,6 +11759,11 @@ namespace vk return *this; } + static ImageSubresourceRange& null() + { + return *((ImageSubresourceRange*)(nullptr)); + } + operator const VkImageSubresourceRange&() const { return m_imageSubresourceRange; @@ -11466,6 +11916,11 @@ namespace vk return *this; } + static ImageMemoryBarrier& null() + { + return *((ImageMemoryBarrier*)(nullptr)); + } + operator const VkImageMemoryBarrier&() const { return m_imageMemoryBarrier; @@ -11594,6 +12049,11 @@ namespace vk return *this; } + static ImageViewCreateInfo& null() + { + return *((ImageViewCreateInfo*)(nullptr)); + } + operator const VkImageViewCreateInfo&() const { return m_imageViewCreateInfo; @@ -11686,6 +12146,11 @@ namespace vk return *this; } + static ImageCopy& null() + { + return *((ImageCopy*)(nullptr)); + } + operator const VkImageCopy&() const { return m_imageCopy; @@ -11766,6 +12231,11 @@ namespace vk return *this; } + static ImageBlit& null() + { + return *((ImageBlit*)(nullptr)); + } + operator const VkImageBlit&() const { return m_imageBlit; @@ -11870,6 +12340,11 @@ namespace vk return *this; } + static BufferImageCopy& null() + { + return *((BufferImageCopy*)(nullptr)); + } + operator const VkBufferImageCopy&() const { return m_bufferImageCopy; @@ -11962,6 +12437,11 @@ namespace vk return *this; } + static ImageResolve& null() + { + return *((ImageResolve*)(nullptr)); + } + operator const VkImageResolve&() const { return m_imageResolve; @@ -12030,6 +12510,11 @@ namespace vk return *this; } + static ClearAttachment& null() + { + return *((ClearAttachment*)(nullptr)); + } + operator const VkClearAttachment&() const { return m_clearAttachment; @@ -12072,6 +12557,11 @@ namespace vk return reinterpret_cast( m_sparseImageFormatProperties.flags ); } + static SparseImageFormatProperties& null() + { + return *((SparseImageFormatProperties*)(nullptr)); + } + operator const VkSparseImageFormatProperties&() const { return m_sparseImageFormatProperties; @@ -12110,6 +12600,11 @@ namespace vk return m_sparseImageMemoryRequirements.imageMipTailStride; } + static SparseImageMemoryRequirements& null() + { + return *((SparseImageMemoryRequirements*)(nullptr)); + } + operator const VkSparseImageMemoryRequirements&() const { return m_sparseImageMemoryRequirements; @@ -12214,6 +12709,11 @@ namespace vk return *this; } + static SparseMemoryBind& null() + { + return *((SparseMemoryBind*)(nullptr)); + } + operator const VkSparseMemoryBind&() const { return m_sparseMemoryBind; @@ -12318,6 +12818,11 @@ namespace vk return *this; } + static SparseImageMemoryBind& null() + { + return *((SparseImageMemoryBind*)(nullptr)); + } + operator const VkSparseImageMemoryBind&() const { return m_sparseImageMemoryBind; @@ -12386,6 +12891,11 @@ namespace vk return *this; } + static SparseBufferMemoryBindInfo& null() + { + return *((SparseBufferMemoryBindInfo*)(nullptr)); + } + operator const VkSparseBufferMemoryBindInfo&() const { return m_sparseBufferMemoryBindInfo; @@ -12454,6 +12964,11 @@ namespace vk return *this; } + static SparseImageOpaqueMemoryBindInfo& null() + { + return *((SparseImageOpaqueMemoryBindInfo*)(nullptr)); + } + operator const VkSparseImageOpaqueMemoryBindInfo&() const { return m_sparseImageOpaqueMemoryBindInfo; @@ -12522,6 +13037,11 @@ namespace vk return *this; } + static SparseImageMemoryBindInfo& null() + { + return *((SparseImageMemoryBindInfo*)(nullptr)); + } + operator const VkSparseImageMemoryBindInfo&() const { return m_sparseImageMemoryBindInfo; @@ -12698,6 +13218,11 @@ namespace vk return *this; } + static BindSparseInfo& null() + { + return *((BindSparseInfo*)(nullptr)); + } + operator const VkBindSparseInfo&() const { return m_bindSparseInfo; @@ -12819,6 +13344,11 @@ namespace vk return *this; } + static CommandPoolCreateInfo& null() + { + return *((CommandPoolCreateInfo*)(nullptr)); + } + operator const VkCommandPoolCreateInfo&() const { return m_commandPoolCreateInfo; @@ -12899,6 +13429,11 @@ namespace vk return m_imageFormatProperties.maxResourceSize; } + static ImageFormatProperties& null() + { + return *((ImageFormatProperties*)(nullptr)); + } + operator const VkImageFormatProperties&() const { return m_imageFormatProperties; @@ -13111,6 +13646,11 @@ namespace vk return *this; } + static ImageCreateInfo& null() + { + return *((ImageCreateInfo*)(nullptr)); + } + operator const VkImageCreateInfo&() const { return m_imageCreateInfo; @@ -13251,6 +13791,11 @@ namespace vk return *this; } + static PipelineMultisampleStateCreateInfo& null() + { + return *((PipelineMultisampleStateCreateInfo*)(nullptr)); + } + operator const VkPipelineMultisampleStateCreateInfo&() const { return m_pipelineMultisampleStateCreateInfo; @@ -13511,6 +14056,11 @@ namespace vk return *this; } + static GraphicsPipelineCreateInfo& null() + { + return *((GraphicsPipelineCreateInfo*)(nullptr)); + } + operator const VkGraphicsPipelineCreateInfo&() const { return m_graphicsPipelineCreateInfo; @@ -14054,6 +14604,11 @@ namespace vk return m_physicalDeviceLimits.nonCoherentAtomSize; } + static PhysicalDeviceLimits& null() + { + return *((PhysicalDeviceLimits*)(nullptr)); + } + operator const VkPhysicalDeviceLimits&() const { return m_physicalDeviceLimits; @@ -14112,6 +14667,11 @@ namespace vk return reinterpret_cast( m_physicalDeviceProperties.sparseProperties ); } + static PhysicalDeviceProperties& null() + { + return *((PhysicalDeviceProperties*)(nullptr)); + } + operator const VkPhysicalDeviceProperties&() const { return m_physicalDeviceProperties; @@ -14264,6 +14824,11 @@ namespace vk return *this; } + static AttachmentDescription& null() + { + return *((AttachmentDescription*)(nullptr)); + } + operator const VkAttachmentDescription&() const { return m_attachmentDescription; @@ -14394,6 +14959,11 @@ namespace vk return *this; } + static DescriptorPoolCreateInfo& null() + { + return *((DescriptorPoolCreateInfo*)(nullptr)); + } + operator const VkDescriptorPoolCreateInfo&() const { return m_descriptorPoolCreateInfo; @@ -14819,6 +15389,11 @@ namespace vk return *this; } + static SubpassDependency& null() + { + return *((SubpassDependency*)(nullptr)); + } + operator const VkSubpassDependency&() const { return m_subpassDependency; @@ -14959,6 +15534,11 @@ namespace vk return *this; } + static RenderPassCreateInfo& null() + { + return *((RenderPassCreateInfo*)(nullptr)); + } + operator const VkRenderPassCreateInfo&() const { return m_renderPassCreateInfo; @@ -15099,6 +15679,11 @@ namespace vk return *this; } + static SubmitInfo& null() + { + return *((SubmitInfo*)(nullptr)); + } + operator const VkSubmitInfo&() const { return m_submitInfo; @@ -15249,6 +15834,11 @@ namespace vk return *this; } + static SurfaceFormatKHR& null() + { + return *((SurfaceFormatKHR*)(nullptr)); + } + operator const VkSurfaceFormatKHR&() const { return m_surfaceFormatKHR; @@ -15404,6 +15994,11 @@ namespace vk return *this; } + static DisplayPlaneCapabilitiesKHR& null() + { + return *((DisplayPlaneCapabilitiesKHR*)(nullptr)); + } + operator const VkDisplayPlaneCapabilitiesKHR&() const { return m_displayPlaneCapabilitiesKHR; @@ -15555,6 +16150,11 @@ namespace vk return *this; } + static DisplayPropertiesKHR& null() + { + return *((DisplayPropertiesKHR*)(nullptr)); + } + operator const VkDisplayPropertiesKHR&() const { return m_displayPropertiesKHR; @@ -15707,6 +16307,11 @@ namespace vk return *this; } + static DisplaySurfaceCreateInfoKHR& null() + { + return *((DisplaySurfaceCreateInfoKHR*)(nullptr)); + } + operator const VkDisplaySurfaceCreateInfoKHR&() const { return m_displaySurfaceCreateInfoKHR; @@ -15859,6 +16464,11 @@ namespace vk return *this; } + static SurfaceCapabilitiesKHR& null() + { + return *((SurfaceCapabilitiesKHR*)(nullptr)); + } + operator const VkSurfaceCapabilitiesKHR&() const { return m_surfaceCapabilitiesKHR; @@ -16107,6 +16717,11 @@ namespace vk return *this; } + static SwapchainCreateInfoKHR& null() + { + return *((SwapchainCreateInfoKHR*)(nullptr)); + } + operator const VkSwapchainCreateInfoKHR&() const { return m_swapchainCreateInfoKHR; @@ -17229,6 +17844,11 @@ namespace vk return *this; } + static DebugReportCallbackCreateInfoEXT& null() + { + return *((DebugReportCallbackCreateInfoEXT*)(nullptr)); + } + operator const VkDebugReportCallbackCreateInfoEXT&() const { return m_debugReportCallbackCreateInfoEXT;