From 6056e66a77b23debf4f22a2084203c1cbc0f66c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Wed, 15 Jun 2016 15:22:09 +0200 Subject: [PATCH] Made StructureType sType private, as nobody should need to access that. --- VkCppGenerator.cpp | 19 ++++- vulkan/vk_cpp.hpp | 177 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+), 4 deletions(-) diff --git a/VkCppGenerator.cpp b/VkCppGenerator.cpp index 55f8ad9..6f911ac 100644 --- a/VkCppGenerator.cpp +++ b/VkCppGenerator.cpp @@ -2736,12 +2736,23 @@ void writeTypeStruct( std::ofstream & ofs, VkData const& vkData, DependencyData // the member variables for (size_t i = 0; i < it->second.members.size(); i++) { - ofs << " " << it->second.members[i].type << " " << it->second.members[i].name; - if (!it->second.members[i].arraySize.empty()) + if (it->second.members[i].type == "StructureType") { - ofs << "[" << it->second.members[i].arraySize << "]"; + assert((i == 0) && (it->second.members[i].name == "sType")); + ofs << " private:" << std::endl + << " StructureType sType;" << std::endl + << std::endl + << " public:" << std::endl; + } + else + { + ofs << " " << it->second.members[i].type << " " << it->second.members[i].name; + if (!it->second.members[i].arraySize.empty()) + { + ofs << "[" << it->second.members[i].arraySize << "]"; + } + ofs << ";" << std::endl; } - ofs << ";" << std::endl; } ofs << " };" << std::endl; #if 1 diff --git a/vulkan/vk_cpp.hpp b/vulkan/vk_cpp.hpp index 5e4588e..d3a5708 100644 --- a/vulkan/vk_cpp.hpp +++ b/vulkan/vk_cpp.hpp @@ -4736,7 +4736,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; const char* pApplicationName; uint32_t applicationVersion; @@ -4814,7 +4817,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DeviceQueueCreateFlags flags; uint32_t queueFamilyIndex; @@ -4919,7 +4925,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DeviceCreateFlags flags; uint32_t queueCreateInfoCount; @@ -5014,7 +5023,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; InstanceCreateFlags flags; const ApplicationInfo* pApplicationInfo; @@ -5079,7 +5091,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DeviceSize allocationSize; uint32_t memoryTypeIndex; @@ -5147,7 +5162,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DeviceMemory memory; DeviceSize offset; @@ -5251,7 +5269,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DescriptorSet dstSet; uint32_t dstBinding; @@ -5353,7 +5374,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DescriptorSet srcSet; uint32_t srcBinding; @@ -5440,7 +5464,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; BufferViewCreateFlags flags; Buffer buffer; @@ -5511,7 +5538,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; ShaderModuleCreateFlags flags; size_t codeSize; @@ -5580,7 +5610,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DescriptorPool descriptorPool; uint32_t descriptorSetCount; @@ -5663,7 +5696,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineVertexInputStateCreateFlags flags; uint32_t vertexBindingDescriptionCount; @@ -5734,7 +5770,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineInputAssemblyStateCreateFlags flags; PrimitiveTopology topology; @@ -5796,7 +5835,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineTessellationStateCreateFlags flags; uint32_t patchControlPoints; @@ -5878,7 +5920,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineViewportStateCreateFlags flags; uint32_t viewportCount; @@ -6005,7 +6050,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineRasterizationStateCreateFlags flags; Bool32 depthClampEnable; @@ -6131,7 +6179,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineDepthStencilStateCreateFlags flags; Bool32 depthTestEnable; @@ -6207,7 +6258,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineCacheCreateFlags flags; size_t initialDataSize; @@ -6367,7 +6421,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; SamplerCreateFlags flags; Filter magFilter; @@ -6449,7 +6506,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; CommandPool commandPool; CommandBufferLevel level; @@ -6532,7 +6592,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; RenderPass renderPass; Framebuffer framebuffer; @@ -6589,7 +6652,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; EventCreateFlags flags; }; @@ -6642,7 +6708,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; SemaphoreCreateFlags flags; }; @@ -6737,7 +6806,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; FramebufferCreateFlags flags; RenderPass renderPass; @@ -6803,7 +6875,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DisplayModeCreateFlagsKHR flags; DisplayModeParametersKHR parameters; @@ -6871,7 +6946,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; Rect2D srcRect; Rect2D dstRect; @@ -6934,7 +7012,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; AndroidSurfaceCreateFlagsKHR flags; ANativeWindow* window; @@ -7004,7 +7085,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; MirSurfaceCreateFlagsKHR flags; MirConnection* connection; @@ -7075,7 +7159,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; WaylandSurfaceCreateFlagsKHR flags; struct wl_display* display; @@ -7146,7 +7233,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; Win32SurfaceCreateFlagsKHR flags; HINSTANCE hinstance; @@ -7217,7 +7307,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; XlibSurfaceCreateFlagsKHR flags; Display* dpy; @@ -7288,7 +7381,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; XcbSurfaceCreateFlagsKHR flags; xcb_connection_t* connection; @@ -7385,7 +7481,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; uint32_t waitSemaphoreCount; const Semaphore* pWaitSemaphores; @@ -7470,7 +7569,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineDynamicStateCreateFlags flags; uint32_t dynamicStateCount; @@ -7655,7 +7757,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; AccessFlags srcAccessMask; AccessFlags dstAccessMask; @@ -7751,7 +7856,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; AccessFlags srcAccessMask; AccessFlags dstAccessMask; @@ -7879,7 +7987,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; BufferCreateFlags flags; DeviceSize size; @@ -8039,7 +8150,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DescriptorSetLayoutCreateFlags flags; uint32_t bindingCount; @@ -8122,7 +8236,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineShaderStageCreateFlags flags; ShaderStageFlagBits stage; @@ -8260,7 +8377,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineLayoutCreateFlags flags; uint32_t setLayoutCount; @@ -8394,7 +8514,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineCreateFlags flags; PipelineShaderStageCreateInfo stage; @@ -8594,7 +8717,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineColorBlendStateCreateFlags flags; Bool32 logicOpEnable; @@ -8664,7 +8790,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; FenceCreateFlags flags; }; @@ -8853,7 +8982,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; RenderPass renderPass; uint32_t subpass; @@ -8918,7 +9050,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; CommandBufferUsageFlags flags; const CommandBufferInheritanceInfo* pInheritanceInfo; @@ -8993,7 +9128,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; QueryPoolCreateFlags flags; QueryType queryType; @@ -9296,7 +9434,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; AccessFlags srcAccessMask; AccessFlags dstAccessMask; @@ -9391,7 +9532,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; ImageViewCreateFlags flags; Image image; @@ -10200,7 +10344,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; uint32_t waitSemaphoreCount; const Semaphore* pWaitSemaphores; @@ -10310,7 +10457,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; CommandPoolCreateFlags flags; uint32_t queueFamilyIndex; @@ -10505,7 +10655,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; ImageCreateFlags flags; ImageType imageType; @@ -10612,7 +10765,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineMultisampleStateCreateFlags flags; SampleCountFlagBits rasterizationSamples; @@ -10783,7 +10939,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; PipelineCreateFlags flags; uint32_t stageCount; @@ -11147,7 +11306,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DescriptorPoolCreateFlags flags; uint32_t maxSets; @@ -12016,7 +12178,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; RenderPassCreateFlags flags; uint32_t attachmentCount; @@ -12117,7 +12282,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; uint32_t waitSemaphoreCount; const Semaphore* pWaitSemaphores; @@ -12615,7 +12783,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DisplaySurfaceCreateFlagsKHR flags; DisplayModeKHR displayMode; @@ -12889,7 +13060,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; SwapchainCreateFlagsKHR flags; SurfaceKHR surface; @@ -14573,7 +14747,10 @@ namespace vk return *reinterpret_cast(this); } + private: StructureType sType; + + public: const void* pNext; DebugReportFlagsEXT flags; PFN_vkDebugReportCallbackEXT pfnCallback;