diff options
author | Mark Lobodzinski <mark@lunarg.com> | 2018-06-13 11:33:15 -0600 |
---|---|---|
committer | Mark Lobodzinski <mark@lunarg.com> | 2018-06-14 08:40:41 -0600 |
commit | 27cbc185c20454ab3beb40bf4cec35a9ad96b11f (patch) | |
tree | e3a78135eff051e760f8bcf67202aa3396550276 /scripts | |
parent | e59e0f6c8412c1a927ac21d2b83a6aa8bb457bb6 (diff) | |
download | vulkan-tools-27cbc185c20454ab3beb40bf4cec35a9ad96b11f.tar.gz |
build: Use registry files from vulkan-headers
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kvt_genvk.py | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/kvt_genvk.py b/scripts/kvt_genvk.py index 428d845d..92d69398 100644 --- a/scripts/kvt_genvk.py +++ b/scripts/kvt_genvk.py @@ -14,13 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import argparse, cProfile, pdb, string, sys, time -from reg import * -from generator import write -from cgenerator import CGeneratorOptions, COutputGenerator -# Generator Modifications -from mock_icd_generator import MockICDGeneratorOptions, MockICDOutputGenerator -from vulkan_tools_helper_file_generator import HelperFileOutputGenerator, HelperFileOutputGeneratorOptions +import argparse, cProfile, pdb, string, sys, time, os # Simple timer functions startTime = None @@ -283,8 +277,24 @@ if __name__ == '__main__': parser.add_argument('-verbose', action='store_false', dest='quiet', default=True, help='Enable script output during normal execution.') + # This argument tells us where to load the script from the Vulkan-Headers registry + parser.add_argument('-scripts', action='store', + help='Find additional scripts in this directory') + args = parser.parse_args() + scripts_directory_path = os.path.dirname(os.path.abspath(__file__)) + registry_headers_path = os.path.join(scripts_directory_path, args.scripts) + sys.path.insert(0, registry_headers_path) + + from reg import * + from generator import write + from cgenerator import CGeneratorOptions, COutputGenerator + + # Generator Modifications + from mock_icd_generator import MockICDGeneratorOptions, MockICDOutputGenerator + from vulkan_tools_helper_file_generator import HelperFileOutputGenerator, HelperFileOutputGeneratorOptions + # This splits arguments which are space-separated lists args.feature = [name for arg in args.feature for name in arg.split()] args.extension = [name for arg in args.extension for name in arg.split()] |