In Vulkan, some functions require you pass a struct containing various parameters. One of the fields is named stype
and needs to be set to the type of struct it is.
An example of stype
's usage:
VkInstanceCreateInfo info;
info.stype = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
...
VkInstance instance;
vkCreateInstance(&info, nullptr, &instance);
The function vkCreateInstance
takes a const VkInstanceCreateInfo*
as a parameter, so what's the point of the stype
field? What was the issue that existed that they fixed by adding the field?