Made StructureType sType private, as nobody should need to access that.

This commit is contained in:
Andreas Süßenbach 2016-06-15 15:22:09 +02:00
parent 82841a9751
commit 6056e66a77
2 changed files with 192 additions and 4 deletions

View File

@ -2735,6 +2735,16 @@ void writeTypeStruct( std::ofstream & ofs, VkData const& vkData, DependencyData
// the member variables
for (size_t i = 0; i < it->second.members.size(); i++)
{
if (it->second.members[i].type == "StructureType")
{
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())
@ -2743,6 +2753,7 @@ void writeTypeStruct( std::ofstream & ofs, VkData const& vkData, DependencyData
}
ofs << ";" << std::endl;
}
}
ofs << " };" << std::endl;
#if 1
ofs << " static_assert( sizeof( " << dependencyData.name << " ) == sizeof( Vk" << dependencyData.name << " ), \"struct and wrapper have different size!\" );" << std::endl;

View File

@ -4736,7 +4736,10 @@ namespace vk
return *reinterpret_cast<const VkApplicationInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
const char* pApplicationName;
uint32_t applicationVersion;
@ -4814,7 +4817,10 @@ namespace vk
return *reinterpret_cast<const VkDeviceQueueCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DeviceQueueCreateFlags flags;
uint32_t queueFamilyIndex;
@ -4919,7 +4925,10 @@ namespace vk
return *reinterpret_cast<const VkDeviceCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DeviceCreateFlags flags;
uint32_t queueCreateInfoCount;
@ -5014,7 +5023,10 @@ namespace vk
return *reinterpret_cast<const VkInstanceCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
InstanceCreateFlags flags;
const ApplicationInfo* pApplicationInfo;
@ -5079,7 +5091,10 @@ namespace vk
return *reinterpret_cast<const VkMemoryAllocateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DeviceSize allocationSize;
uint32_t memoryTypeIndex;
@ -5147,7 +5162,10 @@ namespace vk
return *reinterpret_cast<const VkMappedMemoryRange*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DeviceMemory memory;
DeviceSize offset;
@ -5251,7 +5269,10 @@ namespace vk
return *reinterpret_cast<const VkWriteDescriptorSet*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DescriptorSet dstSet;
uint32_t dstBinding;
@ -5353,7 +5374,10 @@ namespace vk
return *reinterpret_cast<const VkCopyDescriptorSet*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DescriptorSet srcSet;
uint32_t srcBinding;
@ -5440,7 +5464,10 @@ namespace vk
return *reinterpret_cast<const VkBufferViewCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
BufferViewCreateFlags flags;
Buffer buffer;
@ -5511,7 +5538,10 @@ namespace vk
return *reinterpret_cast<const VkShaderModuleCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
ShaderModuleCreateFlags flags;
size_t codeSize;
@ -5580,7 +5610,10 @@ namespace vk
return *reinterpret_cast<const VkDescriptorSetAllocateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DescriptorPool descriptorPool;
uint32_t descriptorSetCount;
@ -5663,7 +5696,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineVertexInputStateCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineVertexInputStateCreateFlags flags;
uint32_t vertexBindingDescriptionCount;
@ -5734,7 +5770,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineInputAssemblyStateCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineInputAssemblyStateCreateFlags flags;
PrimitiveTopology topology;
@ -5796,7 +5835,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineTessellationStateCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineTessellationStateCreateFlags flags;
uint32_t patchControlPoints;
@ -5878,7 +5920,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineViewportStateCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineViewportStateCreateFlags flags;
uint32_t viewportCount;
@ -6005,7 +6050,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineRasterizationStateCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineRasterizationStateCreateFlags flags;
Bool32 depthClampEnable;
@ -6131,7 +6179,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineDepthStencilStateCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineDepthStencilStateCreateFlags flags;
Bool32 depthTestEnable;
@ -6207,7 +6258,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineCacheCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineCacheCreateFlags flags;
size_t initialDataSize;
@ -6367,7 +6421,10 @@ namespace vk
return *reinterpret_cast<const VkSamplerCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
SamplerCreateFlags flags;
Filter magFilter;
@ -6449,7 +6506,10 @@ namespace vk
return *reinterpret_cast<const VkCommandBufferAllocateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
CommandPool commandPool;
CommandBufferLevel level;
@ -6532,7 +6592,10 @@ namespace vk
return *reinterpret_cast<const VkRenderPassBeginInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
RenderPass renderPass;
Framebuffer framebuffer;
@ -6589,7 +6652,10 @@ namespace vk
return *reinterpret_cast<const VkEventCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
EventCreateFlags flags;
};
@ -6642,7 +6708,10 @@ namespace vk
return *reinterpret_cast<const VkSemaphoreCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
SemaphoreCreateFlags flags;
};
@ -6737,7 +6806,10 @@ namespace vk
return *reinterpret_cast<const VkFramebufferCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
FramebufferCreateFlags flags;
RenderPass renderPass;
@ -6803,7 +6875,10 @@ namespace vk
return *reinterpret_cast<const VkDisplayModeCreateInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DisplayModeCreateFlagsKHR flags;
DisplayModeParametersKHR parameters;
@ -6871,7 +6946,10 @@ namespace vk
return *reinterpret_cast<const VkDisplayPresentInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
Rect2D srcRect;
Rect2D dstRect;
@ -6934,7 +7012,10 @@ namespace vk
return *reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
AndroidSurfaceCreateFlagsKHR flags;
ANativeWindow* window;
@ -7004,7 +7085,10 @@ namespace vk
return *reinterpret_cast<const VkMirSurfaceCreateInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
MirSurfaceCreateFlagsKHR flags;
MirConnection* connection;
@ -7075,7 +7159,10 @@ namespace vk
return *reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
WaylandSurfaceCreateFlagsKHR flags;
struct wl_display* display;
@ -7146,7 +7233,10 @@ namespace vk
return *reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
Win32SurfaceCreateFlagsKHR flags;
HINSTANCE hinstance;
@ -7217,7 +7307,10 @@ namespace vk
return *reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
XlibSurfaceCreateFlagsKHR flags;
Display* dpy;
@ -7288,7 +7381,10 @@ namespace vk
return *reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
XcbSurfaceCreateFlagsKHR flags;
xcb_connection_t* connection;
@ -7385,7 +7481,10 @@ namespace vk
return *reinterpret_cast<const VkPresentInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
uint32_t waitSemaphoreCount;
const Semaphore* pWaitSemaphores;
@ -7470,7 +7569,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineDynamicStateCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineDynamicStateCreateFlags flags;
uint32_t dynamicStateCount;
@ -7655,7 +7757,10 @@ namespace vk
return *reinterpret_cast<const VkMemoryBarrier*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
AccessFlags srcAccessMask;
AccessFlags dstAccessMask;
@ -7751,7 +7856,10 @@ namespace vk
return *reinterpret_cast<const VkBufferMemoryBarrier*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
AccessFlags srcAccessMask;
AccessFlags dstAccessMask;
@ -7879,7 +7987,10 @@ namespace vk
return *reinterpret_cast<const VkBufferCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
BufferCreateFlags flags;
DeviceSize size;
@ -8039,7 +8150,10 @@ namespace vk
return *reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DescriptorSetLayoutCreateFlags flags;
uint32_t bindingCount;
@ -8122,7 +8236,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineShaderStageCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineShaderStageCreateFlags flags;
ShaderStageFlagBits stage;
@ -8260,7 +8377,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineLayoutCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineLayoutCreateFlags flags;
uint32_t setLayoutCount;
@ -8394,7 +8514,10 @@ namespace vk
return *reinterpret_cast<const VkComputePipelineCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineCreateFlags flags;
PipelineShaderStageCreateInfo stage;
@ -8594,7 +8717,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineColorBlendStateCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineColorBlendStateCreateFlags flags;
Bool32 logicOpEnable;
@ -8664,7 +8790,10 @@ namespace vk
return *reinterpret_cast<const VkFenceCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
FenceCreateFlags flags;
};
@ -8853,7 +8982,10 @@ namespace vk
return *reinterpret_cast<const VkCommandBufferInheritanceInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
RenderPass renderPass;
uint32_t subpass;
@ -8918,7 +9050,10 @@ namespace vk
return *reinterpret_cast<const VkCommandBufferBeginInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
CommandBufferUsageFlags flags;
const CommandBufferInheritanceInfo* pInheritanceInfo;
@ -8993,7 +9128,10 @@ namespace vk
return *reinterpret_cast<const VkQueryPoolCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
QueryPoolCreateFlags flags;
QueryType queryType;
@ -9296,7 +9434,10 @@ namespace vk
return *reinterpret_cast<const VkImageMemoryBarrier*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
AccessFlags srcAccessMask;
AccessFlags dstAccessMask;
@ -9391,7 +9532,10 @@ namespace vk
return *reinterpret_cast<const VkImageViewCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
ImageViewCreateFlags flags;
Image image;
@ -10200,7 +10344,10 @@ namespace vk
return *reinterpret_cast<const VkBindSparseInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
uint32_t waitSemaphoreCount;
const Semaphore* pWaitSemaphores;
@ -10310,7 +10457,10 @@ namespace vk
return *reinterpret_cast<const VkCommandPoolCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
CommandPoolCreateFlags flags;
uint32_t queueFamilyIndex;
@ -10505,7 +10655,10 @@ namespace vk
return *reinterpret_cast<const VkImageCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
ImageCreateFlags flags;
ImageType imageType;
@ -10612,7 +10765,10 @@ namespace vk
return *reinterpret_cast<const VkPipelineMultisampleStateCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineMultisampleStateCreateFlags flags;
SampleCountFlagBits rasterizationSamples;
@ -10783,7 +10939,10 @@ namespace vk
return *reinterpret_cast<const VkGraphicsPipelineCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
PipelineCreateFlags flags;
uint32_t stageCount;
@ -11147,7 +11306,10 @@ namespace vk
return *reinterpret_cast<const VkDescriptorPoolCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DescriptorPoolCreateFlags flags;
uint32_t maxSets;
@ -12016,7 +12178,10 @@ namespace vk
return *reinterpret_cast<const VkRenderPassCreateInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
RenderPassCreateFlags flags;
uint32_t attachmentCount;
@ -12117,7 +12282,10 @@ namespace vk
return *reinterpret_cast<const VkSubmitInfo*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
uint32_t waitSemaphoreCount;
const Semaphore* pWaitSemaphores;
@ -12615,7 +12783,10 @@ namespace vk
return *reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DisplaySurfaceCreateFlagsKHR flags;
DisplayModeKHR displayMode;
@ -12889,7 +13060,10 @@ namespace vk
return *reinterpret_cast<const VkSwapchainCreateInfoKHR*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
SwapchainCreateFlagsKHR flags;
SurfaceKHR surface;
@ -14573,7 +14747,10 @@ namespace vk
return *reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>(this);
}
private:
StructureType sType;
public:
const void* pNext;
DebugReportFlagsEXT flags;
PFN_vkDebugReportCallbackEXT pfnCallback;