zeux/volk

FYI - we will be making use of 'api' attribute in Vulkan XML, you will need a small change

oddhack opened this issue · 3 comments

This has been part of the schema for a while, but we will start using it soon to allow combining the Vulkan and Vulkan SC XML in a single file. You will need to adapt your loading code to this new use.

The simplest way is to globally pre-filter the XML to remove all tags with explicit 'api' elements not matching the API being generated, as the Vulkan-Docs scripts already do. For this you can either use the scripts/stripAPI.py script that's provided, or do the equivalent

import reg
keepAPI = 'vulkan'
reg.stripNonmatchingAPIs(tree.getroot(), keepAPI, actuallyDelete=True)

after loading your ElementTree from the XML, where 'reg' is scripts/reg.py from the Vulkan-Docs repository.

Let me know if there are any questions. There isn't a specific timescale for this, but probably will appear starting sometime in February.

zeux commented

Thanks for the heads up!

FYI, the XML changes have been published in Vulkan-Docs in the v1.3.241 tag. Please check that things are still working for you. It's possible that you will need to alter how you process the 'supported' attribute of '<extension>' tags as well, since these can now contain patterns like

supported="vulkansc"
supported="vulkan,vulkansc"

and you would not want to process the first extension unless you're targeting Vulkan SC specifically.

zeux commented

Thanks! My filtering code should probably take this into account already:

	supported = ext.get('supported')
	if 'vulkan' not in supported.split(','):
		continue

But I'll watch out for the spec update effects.