util: Fixup and add Dispatch Table header

Fixes the vk_layer_dispatch_table.h header file so that they can be used
in other projects. The contents of this header and
 vk_dispatch_table_helper.h have been moved into a new header
 vul_dispatch_table.h.

The structs VulDeviceDispatchTable and VulInstanceDispatchTable
struct contain function pointers for the device and instance, respectively.

The functions vul_init_device_dispatch_table and
vul_init_instance_dispatch_table fill out the aforementioned structs,
making the task of setting up the disptach table in a layer much simpler.
This commit is contained in:
Charles Giessen 2023-08-22 14:32:01 -06:00 committed by Juan Ramos
parent 8ea7803544
commit 2bd0e0d438
15 changed files with 2006 additions and 212 deletions

View file

@ -22,23 +22,15 @@ def RunGenerators(api: str, registry: str, targetFilter: str) -> None:
from reg import Registry
from generators.base_generator import BaseGeneratorOptions
from generators.dispatch_table_helper_generator import DispatchTableHelperOutputGenerator
from generators.layer_dispatch_table_generator import LayerDispatchTableOutputGenerator
from generators.dispatch_table_generator import DispatchTableOutputGenerator
from generators.enum_string_helper_generator import EnumStringHelperOutputGenerator
# Build up a list of all generators and custom options
generators = {
# TODO: vk_dispatch_table_helper.h doesn't compile.
# 'vk_dispatch_table_helper.h' : {
# 'generator' : DispatchTableHelperOutputGenerator,
# 'directory' : 'include/vulkan',
#},
# TODO: vk_layer_dispatch_table.h doesn't compile.
#
#'vk_layer_dispatch_table.h' : {
# 'generator' : LayerDispatchTableOutputGenerator,
# 'directory' : 'include/vulkan',
#},
'vul_dispatch_table.h' : {
'generator' : DispatchTableOutputGenerator,
'directory' : 'include/vulkan/utility',
},
'vk_enum_string_helper.h' : {
'generator' : EnumStringHelperOutputGenerator,
'directory' : 'include/vulkan',