scripts: Use named params for generator options
authordan sinclair <dsinclair@google.com>
Tue, 9 Jun 2020 17:14:55 +0000 (13:14 -0400)
committerLenny Komow <lenny@lunarg.com>
Tue, 9 Jun 2020 22:24:23 +0000 (16:24 -0600)
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
scripts/helper_file_generator.py
scripts/loader_extension_generator.py

index 7aaf17d6dfa822d25fa3c4da713141ef3afda2e5..f7df18c32bb966baec0afc202fd1d3fd03b13947 100644 (file)
@@ -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
index e5f2e3cd2c1f1cf2d8b251780b532bc31bfff304..3545d5b9570b481202145a9a5a853a208d4f186a 100644 (file)
@@ -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
index a241d43ceb02b37d606240af1e28b59d8bd389bf..f76dfd29dca1714fd0664eb8dad3a2df10fc1a34 100644 (file)
@@ -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