From f0902f7bb8357edddf3ba50c00b0ef39d36f95de Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Tue, 6 Dec 2016 11:30:50 -0700 Subject: [PATCH] scripts: Add dispatch table generator to lvl_genvk.py Change-Id: I539b8248ef8fb151de702c7d5e1773d149ce5313 --- scripts/lvl_genvk.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/scripts/lvl_genvk.py b/scripts/lvl_genvk.py index 8fa7c1b..63b8bab 100644 --- a/scripts/lvl_genvk.py +++ b/scripts/lvl_genvk.py @@ -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 -- 2.7.4