From a09970273cd197d9ea98154e42b4d37fee9253e2 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 9 Jun 2020 13:14:55 -0400 Subject: [PATCH] scripts: Use named params for generator options When calling in the vulkan header python generator the options have changed in 1.2.142 which causes the options passed by the loader to be off by one. This ends up setting the emitExtensions to the value of the sortProcedure and eventually causes the script to fail. This CL updates the loader to used named parameters for the generator so that the addition of the genpath does not throw off the parameter positioning. Change-Id: I14fda7e90be985216c5243457a22fdcb01b5c82b --- scripts/dispatch_table_helper_generator.py | 16 +++++++++++++--- scripts/helper_file_generator.py | 16 +++++++++++++--- scripts/loader_extension_generator.py | 16 +++++++++++++--- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/scripts/dispatch_table_helper_generator.py b/scripts/dispatch_table_helper_generator.py index 7aaf17d6..f7df18c3 100644 --- a/scripts/dispatch_table_helper_generator.py +++ b/scripts/dispatch_table_helper_generator.py @@ -53,9 +53,19 @@ class DispatchTableHelperOutputGeneratorOptions(GeneratorOptions): apientryp = '', alignFuncParam = 0, expandEnumerants = True): - GeneratorOptions.__init__(self, conventions, filename, directory, apiname, profile, - versions, emitversions, defaultExtensions, - addExtensions, removeExtensions, emitExtensions, sortProcedure) + GeneratorOptions.__init__(self, + conventions = conventions, + filename = filename, + directory = directory, + apiname = apiname, + profile = profile, + versions = versions, + emitversions = emitversions, + defaultExtensions = defaultExtensions, + addExtensions = addExtensions, + removeExtensions = removeExtensions, + emitExtensions = emitExtensions, + sortProcedure = sortProcedure) self.prefixText = prefixText self.genFuncPointers = genFuncPointers self.prefixText = None diff --git a/scripts/helper_file_generator.py b/scripts/helper_file_generator.py index e5f2e3cd..3545d5b9 100644 --- a/scripts/helper_file_generator.py +++ b/scripts/helper_file_generator.py @@ -54,9 +54,19 @@ class HelperFileOutputGeneratorOptions(GeneratorOptions): library_name = '', expandEnumerants = True, helper_file_type = ''): - GeneratorOptions.__init__(self, conventions, filename, directory, apiname, profile, - versions, emitversions, defaultExtensions, - addExtensions, removeExtensions, emitExtensions, sortProcedure) + GeneratorOptions.__init__(self, + conventions = conventions, + filename = filename, + directory = directory, + apiname = apiname, + profile = profile, + versions = versions, + emitversions = emitversions, + defaultExtensions = defaultExtensions, + addExtensions = addExtensions, + removeExtensions = removeExtensions, + emitExtensions = emitExtensions, + sortProcedure = sortProcedure) self.prefixText = prefixText self.genFuncPointers = genFuncPointers self.protectFile = protectFile diff --git a/scripts/loader_extension_generator.py b/scripts/loader_extension_generator.py index a241d43c..f76dfd29 100644 --- a/scripts/loader_extension_generator.py +++ b/scripts/loader_extension_generator.py @@ -120,9 +120,19 @@ class LoaderExtensionGeneratorOptions(GeneratorOptions): indentFuncPointer = False, alignFuncParam = 0, expandEnumerants = True): - GeneratorOptions.__init__(self, conventions, filename, directory, apiname, profile, - versions, emitversions, defaultExtensions, - addExtensions, removeExtensions, emitExtensions, sortProcedure) + GeneratorOptions.__init__(self, + conventions = conventions, + filename = filename, + directory = directory, + apiname = apiname, + profile = profile, + versions = versions, + emitversions = emitversions, + defaultExtensions = defaultExtensions, + addExtensions = addExtensions, + removeExtensions = removeExtensions, + emitExtensions = emitExtensions, + sortProcedure = sortProcedure) self.prefixText = prefixText self.prefixText = None self.apicall = apicall -- 2.34.1