vulkan: utils: handle hexadecimal values in registry
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 6 Jul 2018 10:48:23 +0000 (11:48 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 6 Jul 2018 21:12:00 +0000 (22:12 +0100)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/vulkan/util/gen_enum_to_str.py

index bf883d5cb8ff552fcce63f8917340e231c260c79..fb9ecd65c6d9cc317cd6b5b13a43136a6ed21ab1 100644 (file)
@@ -172,7 +172,7 @@ class VkEnum(object):
     def add_value_from_xml(self, elem, extension=None):
         if 'value' in elem.attrib:
             self.add_value(elem.attrib['name'],
-                           value=int(elem.attrib['value']))
+                           value=int(elem.attrib['value'], base=0))
         elif 'alias' in elem.attrib:
             self.add_value(elem.attrib['name'],
                            value=self.name_to_value[elem.attrib['alias']])