winevulkan: Add --xml argument to make_vulkan.

This eases development and of Vulkan extensions by allowing developers
to locally override the specification XML file used by winevulkan.

Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Piers Daniell <pdaniell@nvidia.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Liam Middlebrook 2020-09-29 15:45:49 -07:00 committed by Alexandre Julliard
parent fd21557bd1
commit 844dbbffb3
1 changed files with 7 additions and 2 deletions

View File

@ -3137,6 +3137,7 @@ def download_vk_xml(filename):
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--verbose", action="count", default=0, help="increase output verbosity")
parser.add_argument("-x", "--xml", default=None, type=str, help="path to specification XML file")
args = parser.parse_args()
if args.verbose == 0:
@ -3148,8 +3149,12 @@ def main():
set_working_directory()
vk_xml = "vk-{0}.xml".format(VK_XML_VERSION)
download_vk_xml(vk_xml)
if args.xml:
vk_xml = args.xml
else:
vk_xml = "vk-{0}.xml".format(VK_XML_VERSION)
download_vk_xml(vk_xml)
registry = VkRegistry(vk_xml)
generator = VkGenerator(registry)