genxml/pack: Allow hex values in the XML
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 19 Apr 2017 23:20:44 +0000 (16:20 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 20 Apr 2017 22:24:06 +0000 (15:24 -0700)
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
src/intel/genxml/gen_pack_header.py

index 2a709454af3061a584bb7cfac121d80461c67a36..5228f30bd05f2cb2cd7549763de1eef388077562 100644 (file)
@@ -3,6 +3,7 @@
 from __future__ import (
     absolute_import, division, print_function, unicode_literals
 )
+import ast
 import xml.parsers.expat
 import re
 import sys
@@ -476,7 +477,7 @@ class Group(object):
 class Value(object):
     def __init__(self, attrs):
         self.name = safe_name(attrs["name"])
-        self.value = int(attrs["value"])
+        self.value = ast.literal_eval(attrs["value"])
 
 class Parser(object):
     def __init__(self):