diff options
| author | Mun, Gwan-gyeong <kk.moon@samsung.com> | 2016-02-22 20:23:59 +0900 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-02-29 08:27:10 -0700 |
| commit | 58501b67c7f8e48c5e83e7e9bd886f6904f6596b (patch) | |
| tree | 220295bba90f1c0523366ec074c934b769dffe76 | |
| parent | 041fd95ce9ff0ff9cff00a719412172d4801a9f2 (diff) | |
| download | usermoji-58501b67c7f8e48c5e83e7e9bd886f6904f6596b.tar.xz | |
layers: GH PR17, Add WSI argument passing to vk-generate.py
| -rwxr-xr-x | vk-generate.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/vk-generate.py b/vk-generate.py index b255d7f3..6f478a6f 100755 --- a/vk-generate.py +++ b/vk-generate.py @@ -27,6 +27,7 @@ # Author: Chia-I Wu <olv@lunarg.com> # Author: Courtney Goeltzenleuchter <courtney@LunarG.com> # Author: Jon Ashburn <jon@lunarg.com> +# Author: Gwan-gyeong Mun <kk.moon@samsung.com> import sys @@ -241,18 +242,26 @@ class WinDefFileSubcommand(Subcommand): return "\n".join(body) def main(): + wsi = { + "Win32", + "Android", + "Xcb", + "Xlib", + "Wayland", + "Mir" + } subcommands = { "dispatch-table-ops": DispatchTableOpsSubcommand, "win-def-file": WinDefFileSubcommand, } - if len(sys.argv) < 2 or sys.argv[1] not in subcommands: - print("Usage: %s <subcommand> [options]" % sys.argv[0]) + if len(sys.argv) < 3 or sys.argv[1] not in wsi or sys.argv[2] not in subcommands: + print("Usage: %s <wsi> <subcommand> [options]" % sys.argv[0]) print print("Available sucommands are: %s" % " ".join(subcommands)) exit(1) - subcmd = subcommands[sys.argv[1]](sys.argv[2:]) + subcmd = subcommands[sys.argv[2]](sys.argv[3:]) subcmd.run() if __name__ == "__main__": |
