util: Add vk_struct_helper.hpp

Move the vk_typemap_helper.h file in Vulkan-ValidationLayers over to this
repo with a different name to reflect the use of it

Changes from that include:
 * Rename the functions to be more obvious as to what they do
 * Placing them in the `vku` namespace
 * Adding the `InitStructHelper` class which deduces the type based on the
   variable that is being initialized
 * Compiler error if there is no corresponding sType
This commit is contained in:
unknown 2023-09-13 15:06:52 -06:00 committed by Charles Giessen
parent dc1acf9e37
commit 6774c9b24b
8 changed files with 2116 additions and 0 deletions

View file

@ -25,6 +25,7 @@ def RunGenerators(api: str, registry: str, targetFilter: str) -> None:
from generators.dispatch_table_generator import DispatchTableOutputGenerator
from generators.enum_string_helper_generator import EnumStringHelperOutputGenerator
from generators.format_utils_generator import FormatUtilsOutputGenerator
from generators.struct_helper_generator import StructHelperOutputGenerator
# Build up a list of all generators and custom options
generators = {
@ -40,6 +41,10 @@ def RunGenerators(api: str, registry: str, targetFilter: str) -> None:
'generator' : FormatUtilsOutputGenerator,
'directory' : 'include/vulkan/utility',
},
'vk_struct_helper.hpp' : {
'generator' : StructHelperOutputGenerator,
'directory' : 'include/vulkan/utility',
},
}
if (targetFilter and targetFilter not in generators.keys()):