{
{VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, ~0u},
{VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, ~0u, true},
- {VK_KHR_MAINTENANCE1_EXTENSION_NAME, VK_API_VERSION_1_1, true},
+ {VK_KHR_MAINTENANCE_1_EXTENSION_NAME, VK_API_VERSION_1_1, true},
{VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME,VK_API_VERSION_1_2},
{VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, VK_API_VERSION_1_1, true},
{VK_KHR_SWAPCHAIN_EXTENSION_NAME, ~0u, true},
if (conv and self.needs_conversion()) or self.needs_unwrapping():
if self.is_dynamic_array():
if direction == Direction.OUTPUT:
- LOGGER.warn("TODO: implement copying of returnedonly dynamic array for {0}.{1}".format(self.type, self.name))
+ LOGGER.warning("TODO: implement copying of returnedonly dynamic array for {0}.{1}".format(self.type, self.name))
else:
# Array length is either a variable name (string) or an int.
count = self.dyn_array_len if isinstance(self.dyn_array_len, int) else "{0}{1}".format(input, self.dyn_array_len)
return "convert_{0}_static_array_host_to_win({2}{1}, {3}{1}, {4});\n".format(self.type, self.name, input, output, count)
else:
# Nothing needed this yet.
- LOGGER.warn("TODO: implement copying of static array for {0}.{1}".format(self.type, self.name))
+ LOGGER.warning("TODO: implement copying of static array for {0}.{1}".format(self.type, self.name))
elif self.is_handle() and self.needs_unwrapping():
if direction == Direction.OUTPUT:
LOGGER.err("OUTPUT parameter {0}.{1} cannot be unwrapped".format(self.type, self.name))
# Since we have parsed all types before hand, this should not happen.
type_info = types.get(type_elem.text, None)
if type_info is None:
- LOGGER.err("type info not found for: {0}".format(type_elem.text))
+ LOGGER.error("type info not found for: {0}".format(type_elem.text))
return VkParam(type_info, const=const, pointer=pointer, name=name, array_len=array_len, dyn_array_len=dyn_array_len, object_type=object_type)
# Don't care about specific types for non-Windows platforms.
self.format_str = ""
else:
- LOGGER.warn("Unhandled type: {0}".format(self.type_info))
+ LOGGER.warning("Unhandled type: {0}".format(self.type_info))
def copy(self, direction, prefix=""):
if direction == Direction.INPUT:
elif isinstance(self.operand, VkHandle) and self.direction == Direction.INPUT:
body += " out[i] = " + self.operand.driver_handle("in[i]") + ";\n"
else:
- LOGGER.warn("Unhandled conversion operand type")
+ LOGGER.warning("Unhandled conversion operand type")
body += " out[i] = in[i];\n"
body += " }\n\n"
elif isinstance(self.operand, VkHandle) and self.direction == Direction.INPUT:
body += " out[i] = " + self.operand.driver_handle("in[i]") + ";\n"
else:
- LOGGER.warn("Unhandled conversion operand type")
+ LOGGER.warning("Unhandled conversion operand type")
body += " out[i] = in[i];\n"
body += " }\n"
def _generate_copyright(self, f, spec_file=False):
f.write("# " if spec_file else "/* ")
- f.write("Automatically generated from Vulkan vk.xml; DO NOT EDIT!\n")
+ f.write("Automatically generated from ")
+ f.write(self.registry._filename)
+ f.write("; DO NOT EDIT!\n")
lines = ["", "This file is generated from Vulkan vk.xml file covered",
"by the following copyright and permission notice:"]
lines.extend([l.rstrip(" ") for l in self.registry.copyright.splitlines()])
self.funcpointers = None
self.handles = None
self.structs = None
+ self._filename = reg_filename
# We aggregate all types in here for cross-referencing.
self.funcs = {}
path = os.path.dirname(path)
os.chdir(path)
-def download_vk_xml(filename):
- url = "https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/v{0}/xml/vk.xml".format(VK_XML_VERSION)
- if not os.path.isfile(filename):
- urllib.request.urlretrieve(url, filename)
-
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--verbose", action="count", default=0, help="increase output verbosity")
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)