scripts: Add dispatch table generator to lvl_genvk.py
authorMark Lobodzinski <mark@lunarg.com>
Tue, 6 Dec 2016 18:30:50 +0000 (11:30 -0700)
committerMark Lobodzinski <mark@lunarg.com>
Thu, 8 Dec 2016 21:51:11 +0000 (14:51 -0700)
Change-Id: I539b8248ef8fb151de702c7d5e1773d149ce5313

scripts/lvl_genvk.py

index 8fa7c1b..63b8bab 100644 (file)
@@ -23,6 +23,7 @@ from generator import write
 from threading_generator import  ThreadGeneratorOptions, ThreadOutputGenerator
 from parameter_validation_generator import ParamCheckerGeneratorOptions, ParamCheckerOutputGenerator
 from unique_objects_generator import UniqueObjectsGeneratorOptions, UniqueObjectsOutputGenerator
+from dispatch_table_generator import DispatchTableOutputGenerator, DispatchTableOutputGeneratorOptions
 
 # Simple timer functions
 startTime = None
@@ -160,6 +161,30 @@ def makeGenOpts(extensions = [], protect = True, directory = '.'):
             alignFuncParam    = 48)
         ]
 
+
+    # Options for dispatch table helper generator
+    genOpts['vk_dispatch_table_helper.h'] = [
+          DispatchTableOutputGenerator,
+          DispatchTableOutputGeneratorOptions(
+            filename          = 'vk_dispatch_table_helper.h',
+            directory         = directory,
+            apiname           = 'vulkan',
+            profile           = None,
+            versions          = allVersions,
+            emitversions      = allVersions,
+            defaultExtensions = 'vulkan',
+            addExtensions     = addExtensions,
+            removeExtensions  = removeExtensions,
+            prefixText        = prefixStrings + vkPrefixStrings,
+            protectFeature    = False,
+            apicall           = 'VKAPI_ATTR ',
+            apientry          = 'VKAPI_CALL ',
+            apientryp         = 'VKAPI_PTR *',
+            alignFuncParam    = 48)
+        ]
+
+
+
 # Generate a target based on the options in the matching genOpts{} object.
 # This is encapsulated in a function so it can be profiled and/or timed.
 # The args parameter is an parsed argument object containing the following