anv/extensions: Fix VkVersion::c_vk_version for patch == None
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 17 Jan 2018 02:08:33 +0000 (18:08 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 23 Jan 2018 08:15:40 +0000 (00:15 -0800)
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/intel/vulkan/anv_extensions.py

index ae30ec99dc7de8a82f856d171192b9259e5fea40..581921e62a1170e32ed3a986f79e30eae8790379 100644 (file)
@@ -112,7 +112,8 @@ class VkVersion:
         return '.'.join(ver_list)
 
     def c_vk_version(self):
-        ver_list = [str(self.major), str(self.minor), str(self.patch)]
+        patch = self.patch if self.patch is not None else 0
+        ver_list = [str(self.major), str(self.minor), str(patch)]
         return 'VK_MAKE_VERSION(' + ', '.join(ver_list) + ')'
 
     def __int_ver(self):